Panda3D
 All Classes Functions Variables Enumerations
bulletCylinderShape.h
00001 // Filename: bulletCylinderShape.h
00002 // Created by:  enn0x (17Feb10)
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_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 //       Class : BulletCylinderShape
00026 // Description : 
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 &copy);
00034   INLINE void operator = (const BulletCylinderShape &copy);
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__
 All Classes Functions Variables Enumerations