diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-05-30 16:53:13 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-05-30 16:53:13 +0400 |
commit | be21080cb66194c3ccfe5a6b3ca9853b2b9601de (patch) | |
tree | 5fd5de4669e614da9099410f8bf4c3f264d1daac /source/blender/blenlib/BLI_kdopbvh.h | |
parent | 8ae1f3881263a92e58872b78418230297c70a76a (diff) |
Provide ray hit/nearest information on which side of the quad the ray hit.
Patch by MiikaH.
Diffstat (limited to 'source/blender/blenlib/BLI_kdopbvh.h')
-rw-r--r-- | source/blender/blenlib/BLI_kdopbvh.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h index 7041c122ff9..5ec8247c03a 100644 --- a/source/blender/blenlib/BLI_kdopbvh.h +++ b/source/blender/blenlib/BLI_kdopbvh.h @@ -49,11 +49,15 @@ typedef struct BVHTreeOverlap { int indexB; } BVHTreeOverlap; +/* flags */ +#define BVH_ONQUAD (1<<0) + typedef struct BVHTreeNearest { int index; /* the index of the nearest found (untouched if none is found within a dist radius from the given coordinates) */ float co[3]; /* nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */ float no[3]; /* normal at nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */ float dist; /* squared distance to search arround */ + int flags; } BVHTreeNearest; typedef struct BVHTreeRay { @@ -67,6 +71,7 @@ typedef struct BVHTreeRayHit { float co[3]; /* coordinates of the hit point */ float no[3]; /* normal on hit point */ float dist; /* distance to the hit point */ + int flags; } BVHTreeRayHit; /* callback must update nearest in case it finds a nearest result */ |