Panda3D
physxPlane.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 physxPlane.h
10  * @author enn0x
11  * @date 2009-10-31
12  */
13 
14 #ifndef PHYSXPLANE_H
15 #define PHYSXPLANE_H
16 
17 #include "pandabase.h"
18 #include "luse.h"
19 
20 #include "config_physx.h"
21 
22 /**
23  *
24  */
25 class EXPCL_PANDAPHYSX PhysxPlane {
26 
27 PUBLISHED:
28  INLINE PhysxPlane();
29  INLINE PhysxPlane(const PhysxPlane &plane);
30  INLINE ~PhysxPlane();
31 
32  float distance(const LPoint3f &p) const;
33  bool belongs(const LPoint3f &p) const;
34  void normalize();
35  LPoint3f point_in_plane() const;
36  LPoint3f project(const LPoint3f &p) const;
37  void transform(const LMatrix4f &transform, PhysxPlane &transformed) const;
38  void inverse_transform(const LMatrix4f &transform, PhysxPlane &transformed) const;
39 
40  PhysxPlane set(const LPoint3f &p0, const LPoint3f &p1, const LPoint3f &p2);
41  PhysxPlane zero();
42 
43  float get_d() const;
44  LVector3f get_normal() const;
45 
46  void set_d(float d);
47  void set_normal(LVector3f normal);
48 
49 public:
50  NxPlane _plane;
51 };
52 
53 #include "physxPlane.I"
54 
55 #endif // PHYSPLANE_H
physxPlane.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PhysxPlane
Definition: physxPlane.h:25
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
config_physx.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.