Panda3D
|
00001 // Filename: physxCapsule.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 PHYSXCAPSULE_H 00016 #define PHYSXCAPSULE_H 00017 00018 #include "pandabase.h" 00019 00020 #include "config_physx.h" 00021 #include "physxSegment.h" 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : PhysxCapsule 00025 // Description : Represents a capsule. 00026 //////////////////////////////////////////////////////////////////// 00027 class EXPCL_PANDAPHYSX PhysxCapsule { 00028 00029 PUBLISHED: 00030 INLINE PhysxCapsule(); 00031 INLINE PhysxCapsule(const PhysxSegment &segment, float radius); 00032 INLINE ~PhysxCapsule(); 00033 00034 void compute_direction(LPoint3f &dir) const; 00035 float compute_length() const; 00036 void compute_point(LPoint3f &p, float t) const; 00037 float compute_square_length() const; 00038 LPoint3f get_origin() const; 00039 void set_origin_direction(const LPoint3f &origin, const LVector3f &direction); 00040 00041 float get_radius() const; 00042 LPoint3f get_p0() const; 00043 LPoint3f get_p1() const; 00044 00045 void set_radius(float value); 00046 void set_p0(LPoint3f p); 00047 void set_p1(LPoint3f p); 00048 00049 public: 00050 NxCapsule _capsule; 00051 }; 00052 00053 #include "physxCapsule.I" 00054 00055 #endif // PHYSCAPSULE_H