HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_OrientedBoundingBox.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_OrientedBoundingBox_h__
10 #define __HOM_OrientedBoundingBox_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_Module.h"
16 #include "HOM_PtrOrNull.h"
17 #include "HOM_Vector3.h"
18 #include <UT/UT_OBBox.h>
19 #include <vector>
20 
21 class HOM_Matrix4;
22 
23 SWIGOUT(%rename(OrientedBoundingBox) HOM_OrientedBoundingBox;)
24 
26 {
27 public:
29  { HOM_CONSTRUCT_OBJECT(this) }
30 
32  : myBbox(src.myBbox)
33  { HOM_CONSTRUCT_OBJECT(this) }
34 
35  SWIGOUT(%ignore HOM_OrientedBoundingBox(const UT_OBBoxD &);)
37  : myBbox(bbox)
38  { HOM_CONSTRUCT_OBJECT(this) }
39 
41 
44  { return !operator==(bbox); }
45 
46  bool isAlmostEqual(const HOM_OrientedBoundingBox &other,
47  double tol = 0.00001) const;
48 
49  int __hash__() const;
50  std::string __str__() const;
51  std::string __repr__() const;
52 
53  HOM_OrientedBoundingBox __mul__(const HOM_Matrix4 &matrix4) const;
54 
55  HOM_Vector3 center() const;
56  HOM_Matrix3 rotation() const;
57  HOM_Vector3 sizevec() const;
58 
59  bool contains(const std::vector<double> &point) const;
60  bool isValid() const;
61 
62  SWIGOUT(%ignore operator=;)
63  HOM_OrientedBoundingBox &operator=(const HOM_OrientedBoundingBox &bbox);
64 
66  { return &myBbox; }
67 
68  SWIGOUT(%ignore myBbox;)
69  UT_OBBoxD myBbox;
70 };
71 
72 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1130
GLenum src
Definition: glew.h:2410
OIIO_API bool rename(string_view from, string_view to, std::string &err)
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
std::string __str__()
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1129
int __hash__()
HOM_OrientedBoundingBox(const HOM_OrientedBoundingBox &src)
bool OIIO_API contains(string_view a, string_view b)
Does 'a' contain the string 'b' within it?
HOM_OrientedBoundingBox(const UT_OBBoxD &bbox)
GLsizei const GLchar *const * string
Definition: glew.h:1844
HOM_Matrix4 __mul__(HOM_Matrix4 &matrix4)
Definition: HOM_Matrix4.h:104
bool isAlmostEqual(HOM_Matrix4 &matrix4, double tolerance=0.00001)
bool operator!=(HOM_PtrOrNull< HOM_OrientedBoundingBox > bbox) const
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:590
MatType rotation(const Quat< typename MatType::value_type > &q, typename MatType::value_type eps=static_cast< typename MatType::value_type >(1.0e-8))
Return the rotation matrix specified by the given quaternion.
Definition: Mat.h:204