Panda3D

physxActorDesc.h

00001 // Filename: physxActorDesc.h
00002 // Created by:  enn0x (05Sep09)
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 PHYSXACTORDESC_H
00016 #define PHYSXACTORDESC_H
00017 
00018 #include "pandabase.h"
00019 #include "lpoint3.h"
00020 #include "lmatrix.h"
00021 
00022 #include "physx_includes.h"
00023 
00024 class PhysxBodyDesc;
00025 class PhysxShapeDesc;
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : PhysxActorDesc
00029 // Description : Descriptor for PhysxActor.
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDAPHYSX PhysxActorDesc {
00032 
00033 PUBLISHED:
00034   INLINE PhysxActorDesc();
00035   INLINE ~PhysxActorDesc();
00036 
00037   INLINE void set_to_default();
00038   INLINE bool is_valid() const;
00039 
00040   void add_shape(PhysxShapeDesc &desc);
00041 
00042   void set_name(const char *name);
00043   void set_density(float density);
00044   void set_global_pos(const LPoint3f &pos);
00045   void set_global_mat(const LMatrix4f &mat);
00046   void set_global_hpr(float h, float p, float r);
00047   void set_body(PhysxBodyDesc &desc);
00048 
00049   const char *get_name() const;
00050   float get_density() const;
00051   LPoint3f get_global_pos() const;
00052   LMatrix4f get_global_mat() const;
00053   PhysxBodyDesc get_body() const;
00054 
00055 public:
00056   NxActorDesc _desc;
00057 
00058 private:
00059   string _name;
00060 };
00061 
00062 #include "physxActorDesc.I"
00063 
00064 #endif // PHYSXACTORDESC_H
 All Classes Functions Variables Enumerations