From 3214d4fd5aa803237637da2eee5d1b9e0006ae26 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 24 Mar 2014 13:21:58 +1100 Subject: Code Cleanup: PBVH, avoid sqrt and use bool for raycast functions --- source/blender/blenkernel/BKE_pbvh.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/BKE_pbvh.h') diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 3601ff1ce04..7517a931c76 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -94,12 +94,14 @@ void BKE_pbvh_raycast(PBVH *bvh, BKE_pbvh_HitOccludedCallback cb, void *data, const float ray_start[3], const float ray_normal[3], int original); -int BKE_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3], int use_origco, +bool BKE_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3], int use_origco, const float ray_start[3], const float ray_normal[3], float *dist); -int BKE_pbvh_bmesh_node_raycast_detail(PBVHNode *node, const float ray_start[3], - const float ray_normal[3], float *detail, float *dist); +bool BKE_pbvh_bmesh_node_raycast_detail( + PBVHNode *node, + const float ray_start[3], const float ray_normal[3], + float *detail, float *dist); /* for orthographic cameras, project the far away ray segment points to the root node so * we can have better precision. */ -- cgit v1.2.3