Panda3D

physxPlane.h

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 "lpoint3.h"
00020 #include "lvector3.h"
00021 #include "lmatrix.h"
00022 
00023 #include "config_physx.h"
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : PhysxPlane
00027 // Description : 
00028 ////////////////////////////////////////////////////////////////////
00029 class EXPCL_PANDAPHYSX PhysxPlane {
00030 
00031 PUBLISHED:
00032   INLINE PhysxPlane();
00033   INLINE PhysxPlane(const PhysxPlane &plane);
00034   INLINE ~PhysxPlane();
00035 
00036   float distance(const LPoint3f &p) const;
00037   bool belongs(const LPoint3f &p) const;
00038   void normalize();
00039   LPoint3f point_in_plane() const;
00040   LPoint3f project(const LPoint3f &p) const;
00041   void transform(const LMatrix4f &transform, PhysxPlane &transformed) const;
00042   void inverse_transform(const LMatrix4f &transform, PhysxPlane &transformed) const;
00043 
00044   PhysxPlane set(const LPoint3f &p0, const LPoint3f &p1, const LPoint3f &p2);
00045   PhysxPlane zero();
00046 
00047   float get_d() const;
00048   LVector3f get_normal() const;
00049 
00050   void set_d(float d);
00051   void set_normal(LVector3f normal);
00052 
00053 public:
00054   NxPlane _plane;
00055 };
00056 
00057 #include "physxPlane.I"
00058 
00059 #endif // PHYSPLANE_H
 All Classes Functions Variables Enumerations