Panda3D

bulletConvexHullShape.h

00001 // Filename: bulletConvexHullShape.h
00002 // Created by:  enn0x (26Jan10)
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_CONVEX_HULL_SHAPE_H__
00016 #define __BULLET_CONVEX_HULL_SHAPE_H__
00017 
00018 #include "pandabase.h"
00019 
00020 #include "bullet_includes.h"
00021 #include "bulletShape.h"
00022 
00023 #include "luse.h"
00024 #include "geom.h"
00025 #include "pta_LVecBase3.h"
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : BulletConvexHullShape
00029 // Description : 
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDABULLET BulletConvexHullShape : public BulletShape {
00032 
00033 PUBLISHED:
00034   BulletConvexHullShape();
00035   INLINE BulletConvexHullShape(const BulletConvexHullShape &copy);
00036   INLINE void operator = (const BulletConvexHullShape &copy);
00037   INLINE ~BulletConvexHullShape();
00038 
00039   void add_point(const LPoint3 &p);
00040   void add_array(const PTA_LVecBase3 &points);
00041   void add_geom(const Geom *geom);
00042 
00043 public:
00044   virtual btCollisionShape *ptr() const;
00045 
00046 private:
00047   btConvexHullShape *_shape;
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 public:
00051   static TypeHandle get_class_type() {
00052     return _type_handle;
00053   }
00054   static void init_type() {
00055     BulletShape::init_type();
00056     register_type(_type_handle, "BulletConvexHullShape", 
00057                   BulletShape::get_class_type());
00058   }
00059   virtual TypeHandle get_type() const {
00060     return get_class_type();
00061   }
00062   virtual TypeHandle force_init_type() {
00063     init_type();
00064     return get_class_type();
00065   }
00066 
00067 private:
00068   static TypeHandle _type_handle;
00069 };
00070 
00071 #include "bulletConvexHullShape.I"
00072 
00073 #endif // __BULLET_CONVEX_HULL_SHAPE_H__
 All Classes Functions Variables Enumerations