00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __BULLET_CYLINDER_SHAPE_H__
00016 #define __BULLET_CYLINDER_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
00026
00027
00028 class EXPCL_PANDABULLET BulletCylinderShape : public BulletShape {
00029
00030 PUBLISHED:
00031 BulletCylinderShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up);
00032 BulletCylinderShape(const LVector3 &half_extents, BulletUpAxis up=Z_up);
00033 INLINE BulletCylinderShape(const BulletCylinderShape ©);
00034 INLINE void operator = (const BulletCylinderShape ©);
00035 INLINE ~BulletCylinderShape();
00036
00037 INLINE PN_stdfloat get_radius() const;
00038 INLINE LVecBase3 get_half_extents_without_margin() const;
00039 INLINE LVecBase3 get_half_extents_with_margin() const;
00040
00041 public:
00042 virtual btCollisionShape *ptr() const;
00043
00044 private:
00045 btCylinderShape *_shape;
00046
00047
00048 public:
00049 static TypeHandle get_class_type() {
00050 return _type_handle;
00051 }
00052 static void init_type() {
00053 BulletShape::init_type();
00054 register_type(_type_handle, "BulletCylinderShape",
00055 BulletShape::get_class_type());
00056 }
00057 virtual TypeHandle get_type() const {
00058 return get_class_type();
00059 }
00060 virtual TypeHandle force_init_type() {
00061 init_type();
00062 return get_class_type();
00063 }
00064
00065 private:
00066 static TypeHandle _type_handle;
00067 };
00068
00069 #include "bulletCylinderShape.I"
00070
00071 #endif // __BULLET_CYLINDER_SHAPE_H__