Panda3D
|
00001 // Filename: bulletCapsuleShape.h 00002 // Created by: enn0x (27Jan10) 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 __BULLET_CAPSULE_SHAPE_H__ 00016 #define __BULLET_CAPSULE_SHAPE_H__ 00017 00018 #include "pandabase.h" 00019 00020 #include "bullet_includes.h" 00021 #include "bullet_utils.h" 00022 #include "bulletShape.h" 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : BulletCapsuleShape 00026 // Description : 00027 //////////////////////////////////////////////////////////////////// 00028 class EXPCL_PANDABULLET BulletCapsuleShape : public BulletShape { 00029 00030 PUBLISHED: 00031 BulletCapsuleShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); 00032 INLINE BulletCapsuleShape(const BulletCapsuleShape ©); 00033 INLINE void operator = (const BulletCapsuleShape ©); 00034 INLINE ~BulletCapsuleShape(); 00035 00036 INLINE PN_stdfloat get_radius() const; 00037 INLINE PN_stdfloat get_half_height() const; 00038 00039 public: 00040 virtual btCollisionShape *ptr() const; 00041 00042 private: 00043 btCapsuleShape *_shape; 00044 00045 //////////////////////////////////////////////////////////////////// 00046 public: 00047 static TypeHandle get_class_type() { 00048 return _type_handle; 00049 } 00050 static void init_type() { 00051 BulletShape::init_type(); 00052 register_type(_type_handle, "BulletCapsuleShape", 00053 BulletShape::get_class_type()); 00054 } 00055 virtual TypeHandle get_type() const { 00056 return get_class_type(); 00057 } 00058 virtual TypeHandle force_init_type() { 00059 init_type(); 00060 return get_class_type(); 00061 } 00062 00063 private: 00064 static TypeHandle _type_handle; 00065 }; 00066 00067 #include "bulletCapsuleShape.I" 00068 00069 #endif // __BULLET_CAPSULE_SHAPE_H__