VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAxisAlignedBoundingBox.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include <vrvMath/DtMatrix4.h>
12 
13 namespace makVrv
14 {
15  // typedef for extents of an AABB
16  enum Extent
17  {
21  };
22 
26  template <class T>
28  {
29  public:
32 
35  , const DtVector3<T>& vMax);
36 
38  template <class RHS>
40 
42  template <class RHS>
44 
47  public:
48 
50  const DtVector3<T>& min(void) const;
51 
53  const DtVector3<T>& max(void) const;
54 
56  DtVector3<T> center(void) const;
57 
59  T boundingSphereRadius(void) const;
60 
62  DtVector3<T> halfSize(void) const;
63 
65  DtVector3<T> size(void) const;
66 
68  Extent extent(void) const;
69 
71  void setMinMax(const DtVector3<T>& vMin, const DtVector3<T>& vMax);
72 
74  void setNull(void);
75 
77  void setInfinite(void);
78 
80  void merge(const DtAxisAlignedBoundingBox<T>& rhs);
81 
83  void transformAffine(const DtMatrix4<T>& m);
84 
86  bool isInfinite(void) const;
87 
89  bool isFinite(void) const;
90 
92  bool isNull(void) const;
93 
95  void GetCorners(DtVector3<T> corners[8]) const;
96  protected:
100  };
101 
104 
105 } //namespace makVrv
106 
107 #include "DtAxisAlignedBoundingBox.inl"
DtVector3< T > center(void) const
get the center
DtVector3< T > myVectorMin
Definition: DtAxisAlignedBoundingBox.h:97
void GetCorners(DtVector3< T > corners[8]) const
get the 8 corners
Definition: DtAxisAlignedBoundingBox.h:20
Extent extent(void) const
get the extents
DtVector3< T > size(void) const
full size
bool isNull(void) const
is null?
DtAxisAlignedBoundingBox< float32 > AxisAlignedBoundingBox_32
Definition: DtAxisAlignedBoundingBox.h:102
void setMinMax(const DtVector3< T > &vMin, const DtVector3< T > &vMax)
set the min max values
T boundingSphereRadius(void) const
get the bounding sphere radius
Extent myExtent
Definition: DtAxisAlignedBoundingBox.h:99
Definition: DtAxisAlignedBoundingBox.h:18
Template for 32/64 bit Axis Aligned bounding boxesnot virtual because its stored as is on the GPU...
Definition: DtAxisAlignedBoundingBox.h:27
DtVector3< T > myVectorMax
Definition: DtAxisAlignedBoundingBox.h:98
void setNull(void)
set it to a null (unitiliazed value)
void merge(const DtAxisAlignedBoundingBox< T > &rhs)
merge with rhs
DtAxisAlignedBoundingBox & operator=(const DtAxisAlignedBoundingBox< RHS > &rhs)
Assignment Operator.
DtVector3< T > halfSize(void) const
half size
Definition: DtAxisAlignedBoundingBox.h:19
void setInfinite(void)
set it to having infinite extents
Extent
Definition: DtAxisAlignedBoundingBox.h:16
bool isFinite(void) const
is finite extents?
bool isInfinite(void) const
is infinite extents?
const DtVector3< T > & max(void) const
get the max
DtAxisAlignedBoundingBox< float64 > AxisAlignedBoundingBox_64
Definition: DtAxisAlignedBoundingBox.h:103
2 dimensional vector
Definition: DtMath.h:21
void transformAffine(const DtMatrix4< T > &m)
transform the AABB with the given affine transform &#39;m&#39;
const DtVector3< T > & min(void) const
get the min
4 dimensional matrix
4 dimensional matrix
Definition: DtMatrix4.h:22

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)