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