#include <quad_grid_clip_cluster.h>
Nevrax France
Definition at line 118 of file quad_grid_clip_cluster.h.
Public Member Functions | |
void | addModel (const NLMISC::CAABBox &worldBBox, CTransformShape *model) |
void | clip (CClipTrav *clipTrav) |
CQuadGridClipCluster (uint numDist, float distMax, const NLMISC::CAABBox &pivot) | |
Constructor. | |
const NLMISC::CAABBox & | getBBox () const |
bool | isEmpty () const |
sint | profileNumChildren (uint distLevel) const |
void | removeModel (CTransformShape *model) |
void | resetSons (CClipTrav *clipTrav) |
~CQuadGridClipCluster () | |
Data Fields | |
CFastPtrListNode | ListNode |
Protected Attributes | |
float | _DistMax |
uint | _NumDist |
uint | _NumDistTotal |
CQuadGridClipClusterQTreeNode | _Root |
Friends | |
class | CQuadGridClipClusterQTreeNode |
|
Constructor.
Definition at line 399 of file quad_grid_clip_cluster.cpp. References _DistMax, _NumDist, _NumDistTotal, NL3D::CQuadGridClipClusterQTreeNode::init(), NL3D_QUADGRID_CLIP_CLUSTER_DEPTH, and uint.
00400 { 00401 _DistMax= distMax; 00402 _NumDist= numDist; 00403 _NumDistTotal= _NumDist+1; 00404 00405 _Root.init(this, NL3D_QUADGRID_CLIP_CLUSTER_DEPTH, true, pivot); 00406 } |
|
Definition at line 409 of file quad_grid_clip_cluster.cpp.
00410 { 00411 } |
|
Definition at line 414 of file quad_grid_clip_cluster.cpp. References _DistMax, _NumDist, NL3D::CTransformShape::_QuadClusterListNode, NLMISC::clamp(), NL3D::CTransformShape::getDistMax(), NL3D::CQuadGridClipClusterQTreeNode::insertModel(), NL3D::CFastPtrListNode::isLinked(), nlassert, and sint. Referenced by NL3D::CQuadGridClipManager::linkModel().
00415 { 00416 // check not already inserted 00417 nlassert(!model->_QuadClusterListNode.isLinked()); 00418 00419 // Add the model to the good distance list 00420 float modelDistMax= model->getDistMax(); 00421 sint distSetup; 00422 if(modelDistMax<0) 00423 distSetup= _NumDist; 00424 else 00425 { 00426 distSetup= (sint)floor(_NumDist*modelDistMax/_DistMax); 00427 // NB: if >=_DistMax, then distSetup==_NumDist, meaning infinite distance (never dist clipped) 00428 clamp(distSetup, 0, (sint)_NumDist); 00429 } 00430 00431 // add / recurs to the quadtree 00432 _Root.insertModel(worldBBox, distSetup, model); 00433 } |
|
Definition at line 444 of file quad_grid_clip_cluster.cpp. References NL3D::CQuadGridClipClusterQTreeNode::clip(), and H_AUTO_USE.
00445 { 00446 H_AUTO_USE( NL3D_QuadClip_ClusterClip ); 00447 00448 // clip the quadtree 00449 _Root.clip(clipTrav); 00450 } |
|
Definition at line 138 of file quad_grid_clip_cluster.h. References NL3D::CQuadGridClipClusterQTreeNode::BBox. Referenced by NL3D::CQuadGridClipManager::profile().
00138 {return _Root.BBox;} |
|
Definition at line 137 of file quad_grid_clip_cluster.h. References NL3D::CQuadGridClipClusterQTreeNode::Empty. Referenced by NL3D::CQuadGridClipManager::linkModel(), and NL3D::CQuadGridClipManager::profile().
00137 {return _Root.Empty;} |
|
Definition at line 460 of file quad_grid_clip_cluster.cpp. References NL3D::CQuadGridClipClusterQTreeNode::profileNumChildren(), sint, and uint. Referenced by NL3D::CQuadGridClipManager::profile().
|
|
Definition at line 437 of file quad_grid_clip_cluster.cpp. References NL3D::CTransformShape::_QuadClusterListNode, and NL3D::CFastPtrListNode::unlink().
00438 { 00439 model->_QuadClusterListNode.unlink(); 00440 } |
|
Definition at line 453 of file quad_grid_clip_cluster.cpp. References NL3D::CQuadGridClipClusterQTreeNode::resetSons(). Referenced by NL3D::CQuadGridClipManager::deleteCaseModels().
00454 { 00455 _Root.resetSons(clipTrav); 00456 } |
|
Definition at line 144 of file quad_grid_clip_cluster.h. |
|
Definition at line 147 of file quad_grid_clip_cluster.h. Referenced by addModel(), NL3D::CQuadGridClipClusterQTreeNode::clip(), CQuadGridClipCluster(), and NL3D::CQuadGridClipClusterQTreeNode::noFrustumClip(). |
|
Definition at line 149 of file quad_grid_clip_cluster.h. Referenced by addModel(), NL3D::CQuadGridClipClusterQTreeNode::clip(), CQuadGridClipCluster(), and NL3D::CQuadGridClipClusterQTreeNode::noFrustumClip(). |
|
Definition at line 151 of file quad_grid_clip_cluster.h. Referenced by CQuadGridClipCluster(), and NL3D::CQuadGridClipClusterQTreeNode::init(). |
|
Definition at line 154 of file quad_grid_clip_cluster.h. |
|
Definition at line 122 of file quad_grid_clip_cluster.h. Referenced by NL3D::CQuadGridClipManager::linkModel(). |