Panda3D
 All Classes Functions Variables Enumerations
physxBox.h
1 // Filename: physxBox.h
2 // Created by: enn0x (31Oct09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXBOX_H
16 #define PHYSXBOX_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "config_physx.h"
22 #include "physx_includes.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : PhysxBox
26 // Description : Represents an oriented bounding box, as a center
27 // point, extents(radii) and a rotation. i.e. the
28 // center of the box is at the center point, the box
29 // is rotated around this point with the rotation and
30 // it is 2*extents in width, height and depth.
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDAPHYSX PhysxBox {
33 
34 PUBLISHED:
35  INLINE PhysxBox();
36  INLINE ~PhysxBox();
37  PhysxBox(const LPoint3f &center, const LVector3f &extents, const LMatrix3f &rot);
38 
39  bool is_valid() const;
40  void rotate(const LMatrix4f &m, PhysxBox &obb) const;
41  void set_empty();
42 
43  LPoint3f get_center() const;
44  LVector3f get_extents() const;
45  LMatrix3f get_rot() const;
46 
47  void set_center(LPoint3f center);
48  void set_extents(LVector3f extents);
49  void set_rot(LMatrix3f rot);
50 
51 public:
52  NxBox _box;
53 };
54 
55 #include "physxBox.I"
56 
57 #endif // PHYSBOX_H
Represents an oriented bounding box, as a center point, extents(radii) and a rotation.
Definition: physxBox.h:32
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:451
This is a 3-by-3 transform matrix.
Definition: lmatrix.h:110