From 9892736206676c5b7fabc8d1184f9655511ff2dd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 12 May 2012 20:39:39 +0000 Subject: code cleanup: header cleanup and remove some duplicate defines. --- source/blender/blenkernel/BKE_bvhutils.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'source/blender/blenkernel/BKE_bvhutils.h') diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index ab3d751cc8e..eff5019a49c 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -44,20 +44,19 @@ struct MFace; /* * struct that kepts basic information about a BVHTree build from a mesh */ -typedef struct BVHTreeFromMesh -{ +typedef struct BVHTreeFromMesh { struct BVHTree *tree; /* default callbacks to bvh nearest and raycast */ BVHTree_NearestPointCallback nearest_callback; - BVHTree_RayCastCallback raycast_callback; + BVHTree_RayCastCallback raycast_callback; /* Mesh represented on this BVHTree */ struct DerivedMesh *mesh; /* Vertex array, so that callbacks have instante access to data */ struct MVert *vert; - struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */ + struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */ struct MFace *face; /* radius for raycast */ @@ -65,7 +64,7 @@ typedef struct BVHTreeFromMesh /* Private data */ int cached; - void *em_evil; /* var only for snapping */ + void *em_evil; /* var only for snapping */ } BVHTreeFromMesh; @@ -80,7 +79,7 @@ typedef struct BVHTreeFromMesh * * free_bvhtree_from_mesh should be called when the tree is no longer needed. */ -BVHTree* bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis); +BVHTree *bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis); /* * Builds a bvh tree where nodes are the faces of the given mesh. @@ -96,9 +95,9 @@ BVHTree* bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMes * * free_bvhtree_from_mesh should be called when the tree is no longer needed. */ -BVHTree* bvhtree_from_mesh_faces(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis); +BVHTree *bvhtree_from_mesh_faces(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis); -BVHTree* bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis); +BVHTree *bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis); /* * Frees data allocated by a call to bvhtree_from_mesh_*. @@ -116,11 +115,11 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f */ //Using local coordinates -#define BVHTREE_FROM_FACES 0 -#define BVHTREE_FROM_VERTICES 1 -#define BVHTREE_FROM_EDGES 2 +#define BVHTREE_FROM_FACES 0 +#define BVHTREE_FROM_VERTICES 1 +#define BVHTREE_FROM_EDGES 2 -typedef struct LinkNode* BVHCache; +typedef struct LinkNode *BVHCache; /* -- cgit v1.2.3