Over 10 Million Study Resources Now at Your Fingertips


Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Language:EN
Pages: 2

The build function webuilt

}

} // Next Child
// Success!
return true;

Note how quickly we were able to create new tree behavior. In the case of the Y-variant quad-tree, it meant overriding a single method. That is all the code we need to cover for the YV Quad-tree.

Although CBaseTree provides the leaf structure that all our trees will use, the node structure is dependant on the tree being

quad-tree that examining its code will be trivial for the most part. The only real difference in each version of the method implemented for the oct-tree is that each node has eight children to visit/create instead of four. In the Build function we

14.19.1 COctTreeNode – The Source Code

Each node in our oct-tree will be represented by an object of type COctTreeNode which is declared and implemented in COctTree.h and COctTree.cpp. It contains the same SetVisible member function as its quad-tree counterpart and also stores the same members. It stores a pointer to a CBaseLeaf object that will be used only by terminal nodes and contains two vectors describing the extents of the node’s bounding volume. It also contains the same LastFrustumPlane member which we will discuss in the following lesson as it is used to speed up visibility processing. Finally, you will notice that the only difference (except the name) between this object and the CQuadTreeNode object is that each node stores an array of 8 COctTreeNode pointers instead of an array of 4 CQuadTreeNode pointers.

D3DXVECTOR3 BoundsMin; // Minimum bounding box extents D3DXVECTOR3 BoundsMax; // Maximum bounding box extents signed char LastFrustumPlane; // 'last plane' index.

};

TeamLRN

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Payment
Make payment
Document download
Download File
PageId: ELICEC3C41
img
Uploaded by :
qXd61NOD
Page 1 Preview
the build function webuilt
Sell Your Old Documents & Earn Wallet Balance