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