VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOctreeNode.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
12 
14 
15 namespace makVrv {
16 
19  template<class T>
21  {
22  public:
23 
25  DtOctreeNode();
26 
28  ~DtOctreeNode();
29 
31  void setOctant(DtOctree<T>*);
33  DtOctree<T>* getOctant(void);
34 
36  bool isIn(const DtAxisAlignedBoundingBox<T>& box);
37 
39  const DtAxisAlignedBoundingBox<T>& worldAABB(void) const;
40 
43 
45  void setUserData(void* pUserData){ myUserData = pUserData; }
47  void* userData() const { return myUserData; }
49  private:
51  void* myUserData;
52  };
53 
56 
57 } //namespace makVrv
58 
59 #include "DtOctreeNode.inl"
OctreeNode class.
Definition: DtOctreeNode.h:20
void setOctant(DtOctree< T > *)
Set the octant which this node is in.
DtVector3< T > myCenter
Definition: DtOctreeNode.h:42
Template for 32/64 bit Axis Aligned bounding boxesnot virtual because its stored as is on the GPU...
Definition: DtAxisAlignedBoundingBox.h:27
DtOctreeNode< float32 > OctreeNode_32
Definition: DtOctreeNode.h:54
DtAxisAlignedBoundingBox< T > myWorldAABB
Definition: DtOctreeNode.h:41
Axis Aligned Bounding Box class.
Octree datastructure for managing scene nodes. This is a loose octree implementation, meaning that each octant child of the octree actually overlaps it&#39;s siblings by a factor of .5. This guarantees that any thing that is half the size of the parent will fit completely into a child, with no splitting necessary.
Definition: DtOctree.h:27
bool isIn(const DtAxisAlignedBoundingBox< T > &box)
Determine whether a box is inside this node.
OctreeNode forward declarations.
2 dimensional vector
Definition: DtMath.h:21
const DtAxisAlignedBoundingBox< T > & worldAABB(void) const
Get the AABB of this node in world space.
void * myUserData
Definition: DtOctreeNode.h:51
void * userData() const
User Data.
Definition: DtOctreeNode.h:47
DtOctreeNode< float64 > OctreeNode_64
Definition: DtOctreeNode.h:55
DtOctree< T > * getOctant(void)
Get the octant which this node is in.
DtOctree< T > * myOctant
Definition: DtOctreeNode.h:50
void setUserData(void *pUserData)
User Data.
Definition: DtOctreeNode.h:46

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)