Panda3D
 All Classes Functions Variables Enumerations
physxPlane.h
1 // Filename: physxPlane.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 PHYSXPLANE_H
16 #define PHYSXPLANE_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "config_physx.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PhysxPlane
25 // Description :
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAPHYSX PhysxPlane {
28 
29 PUBLISHED:
30  INLINE PhysxPlane();
31  INLINE PhysxPlane(const PhysxPlane &plane);
32  INLINE ~PhysxPlane();
33 
34  float distance(const LPoint3f &p) const;
35  bool belongs(const LPoint3f &p) const;
36  void normalize();
37  LPoint3f point_in_plane() const;
38  LPoint3f project(const LPoint3f &p) const;
39  void transform(const LMatrix4f &transform, PhysxPlane &transformed) const;
40  void inverse_transform(const LMatrix4f &transform, PhysxPlane &transformed) const;
41 
42  PhysxPlane set(const LPoint3f &p0, const LPoint3f &p1, const LPoint3f &p2);
43  PhysxPlane zero();
44 
45  float get_d() const;
46  LVector3f get_normal() const;
47 
48  void set_d(float d);
49  void set_normal(LVector3f normal);
50 
51 public:
52  NxPlane _plane;
53 };
54 
55 #include "physxPlane.I"
56 
57 #endif // PHYSPLANE_H
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