00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __BULLET_SHAPE_H__
00016 #define __BULLET_SHAPE_H__
00017
00018 #include "pandabase.h"
00019
00020 #include "bullet_includes.h"
00021
00022 #include "typedReferenceCount.h"
00023
00024
00025
00026
00027
00028 class EXPCL_PANDABULLET BulletShape : public TypedReferenceCount {
00029
00030 PUBLISHED:
00031 INLINE virtual ~BulletShape();
00032
00033 INLINE bool is_polyhedral() const;
00034 INLINE bool is_convex() const;
00035 INLINE bool is_convex_2d() const;
00036 INLINE bool is_concave() const;
00037 INLINE bool is_infinite() const;
00038 INLINE bool is_non_moving() const;
00039 INLINE bool is_soft_body() const;
00040
00041 void set_margin(PN_stdfloat margin);
00042 const char *get_name() const;
00043
00044 PN_stdfloat get_margin() const;
00045
00046 public:
00047 virtual btCollisionShape *ptr() const = 0;
00048
00049 LVecBase3 get_local_scale() const;
00050 void set_local_scale(const LVecBase3 &scale);
00051
00052
00053 public:
00054 static TypeHandle get_class_type() {
00055 return _type_handle;
00056 }
00057 static void init_type() {
00058 TypedReferenceCount::init_type();
00059 register_type(_type_handle, "BulletShape",
00060 TypedReferenceCount::get_class_type());
00061 }
00062 virtual TypeHandle get_type() const {
00063 return get_class_type();
00064 }
00065 virtual TypeHandle force_init_type() {
00066 init_type();
00067 return get_class_type();
00068 }
00069
00070 private:
00071 static TypeHandle _type_handle;
00072 };
00073
00074 #include "bulletShape.I"
00075
00076 #endif // __BULLET_SHAPE_H__