Panda3D
 All Classes Functions Variables Enumerations
physxCapsuleForceFieldShape.h
00001 // Filename: physxCapsuleForceFieldShape.h
00002 // Created by:  enn0x (15Nov09)
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 PHYSXCAPSULEFORCEFIELDSHAPE_H
00016 #define PHYSXCAPSULEFORCEFIELDSHAPE_H
00017 
00018 #include "pandabase.h"
00019 #include "luse.h"
00020 
00021 #include "physxForceFieldShape.h"
00022 #include "physx_includes.h"
00023 
00024 class PhysxCapsuleForceFieldShapeDesc;
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //       Class : PhysxCapsuleForceFieldShape
00028 // Description : A capsule shaped region used to define a force
00029 //               field.
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDAPHYSX PhysxCapsuleForceFieldShape : public PhysxForceFieldShape {
00032 
00033 PUBLISHED:
00034   INLINE PhysxCapsuleForceFieldShape();
00035   INLINE ~PhysxCapsuleForceFieldShape();
00036 
00037   void save_to_desc(PhysxCapsuleForceFieldShapeDesc &shapeDesc) const;
00038 
00039   void set_radius(float radius);
00040   void set_height(float height);
00041 
00042   float get_radius() const;
00043   float get_height() const;
00044 
00045 ////////////////////////////////////////////////////////////////////
00046 public:
00047   INLINE NxForceFieldShape *ptr() const { return (NxForceFieldShape *)_ptr; };
00048 
00049   void link(NxForceFieldShape *shapePtr);
00050   void unlink();
00051 
00052 private:
00053   NxCapsuleForceFieldShape *_ptr;
00054 
00055 ////////////////////////////////////////////////////////////////////
00056 public:
00057   static TypeHandle get_class_type() {
00058     return _type_handle;
00059   }
00060   static void init_type() {
00061     PhysxForceFieldShape::init_type();
00062     register_type(_type_handle, "PhysxCapsuleForceFieldShape", 
00063                   PhysxForceFieldShape::get_class_type());
00064   }
00065   virtual TypeHandle get_type() const {
00066     return get_class_type();
00067   }
00068   virtual TypeHandle force_init_type() {
00069     init_type();
00070     return get_class_type();
00071   }
00072 
00073 private:
00074   static TypeHandle _type_handle;
00075 };
00076 
00077 #include "physxCapsuleForceFieldShape.I"
00078 
00079 #endif // PHYSXCAPSULEFORCEFIELDSHAPE_H
 All Classes Functions Variables Enumerations