Panda3D
|
00001 // Filename: physxPlane.h 00002 // Created by: enn0x (31Oct09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PHYSXPLANE_H 00016 #define PHYSXPLANE_H 00017 00018 #include "pandabase.h" 00019 #include "luse.h" 00020 00021 #include "config_physx.h" 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : PhysxPlane 00025 // Description : 00026 //////////////////////////////////////////////////////////////////// 00027 class EXPCL_PANDAPHYSX PhysxPlane { 00028 00029 PUBLISHED: 00030 INLINE PhysxPlane(); 00031 INLINE PhysxPlane(const PhysxPlane &plane); 00032 INLINE ~PhysxPlane(); 00033 00034 float distance(const LPoint3f &p) const; 00035 bool belongs(const LPoint3f &p) const; 00036 void normalize(); 00037 LPoint3f point_in_plane() const; 00038 LPoint3f project(const LPoint3f &p) const; 00039 void transform(const LMatrix4f &transform, PhysxPlane &transformed) const; 00040 void inverse_transform(const LMatrix4f &transform, PhysxPlane &transformed) const; 00041 00042 PhysxPlane set(const LPoint3f &p0, const LPoint3f &p1, const LPoint3f &p2); 00043 PhysxPlane zero(); 00044 00045 float get_d() const; 00046 LVector3f get_normal() const; 00047 00048 void set_d(float d); 00049 void set_normal(LVector3f normal); 00050 00051 public: 00052 NxPlane _plane; 00053 }; 00054 00055 #include "physxPlane.I" 00056 00057 #endif // PHYSPLANE_H