Logo Search packages:      
Sourcecode: blender version File versions  Download package

ntlTree Class Reference

#include <ntl_bsptree.h>

List of all members.


Detailed Description

Class for a bsp tree for triangles.

Definition at line 34 of file ntl_bsptree.h.


Public Member Functions

int getCurrentNodes (void)
 Returns number of nodes.
void intersect (const ntlRay &ray, gfxReal &distance, ntlVec3Gfx &normal, ntlTriangle *&tri, int flags, bool forceNonsmooth) const
 intersect ray with BSPtree
void intersectX (const ntlRay &ray, gfxReal &distance, ntlVec3Gfx &normal, ntlTriangle *&tri, int flags, bool forceNonsmooth) const
 intersect along +X ray
 ntlTree (int depth, int objnum, ntlScene *scene, int triFlagMask)
 Constructor with init.
 ntlTree ()
 Default constructor.
void subdivide (BSPNode *node, int depth, int axis)
 subdivide tree
 ~ntlTree ()
 Destructor.

Protected Member Functions

bool checkAABBTriangle (ntlVec3Gfx &min, ntlVec3Gfx &max, ntlTriangle *tri)
void deleteNode (BSPNode *curr)
 delete a node of the tree with all sub nodes, dont delete root members
gfxReal distanceToPlane (BSPNode *curr, ntlVec3Gfx plane, ntlRay ray) const
 distance to plane function for nodes
void getChildren (BSPNode *curr, ntlVec3Gfx origin, BSPNode *&node_near, BSPNode *&node_far) const
 return ordering of children nodes relatice to origin point

Protected Attributes

int mAbortSubdiv
int mCurrentDepth
 Status vars (max depth, # of current nodes).
int mCurrentNodes
ntlVec3Gfx mEnd
int mMaxDepth
 maximum depth of tree
int mMaxListLength
 maximum number of objects in one node
int mNumNodes
 count no. of node
BSPStackmpNodeStack
 stack for the node pointers
vector< ntlTriangle * > * mppTriangles
BSPNodempRoot
 root node pointer
TriangleBBoxmpTBB
 temporary array for triangle bounding boxes
vector< ntlTriangle > * mpTriangles
 vector for all the triangles
char * mpTriDist
 temporary array for triangle distribution to nodes
vector< ntlVec3Gfx > * mpVertices
 pointer to vertex array
vector< ntlVec3Gfx > * mpVertNormals
 pointer to vertex array
ntlVec3Gfx mStart
 AABB for tree.
int mTriangleMask
 triangle mask - include only triangles that match mask
int mTriDoubles
 duplicated triangles, inited during subdivide

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index