Panda3D

physxSoftBodyDesc.h

00001 // Filename: physxSoftBodyDesc.h
00002 // Created by:  enn0x (12Sep10)
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 PHYSXSOFTBODYDESC_H
00016 #define PHYSXSOFTBODYDESC_H
00017 
00018 #include "pandabase.h"
00019 #include "lpoint3.h"
00020 #include "lmatrix.h"
00021 
00022 #include "physxEnums.h"
00023 #include "physx_includes.h"
00024 
00025 class PhysxSoftBodyMesh;
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : PhysxSoftBodyDesc
00029 // Description : Descriptor for PhysxSoftBody.
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDAPHYSX PhysxSoftBodyDesc : public PhysxEnums {
00032 
00033 PUBLISHED:
00034   INLINE PhysxSoftBodyDesc();
00035   INLINE ~PhysxSoftBodyDesc();
00036 
00037   INLINE void set_to_default();
00038   INLINE bool is_valid() const;
00039 
00040   void set_soft_body_mesh(PhysxSoftBodyMesh *mesh);
00041 
00042   void set_name(const char *name);
00043   void set_global_pos(const LPoint3f &pos);
00044   void set_global_mat(const LMatrix4f &mat);
00045   void set_global_hpr(float h, float p, float r);
00046   void set_density(float density);
00047   void set_volume_stiffness(float stiffness);
00048   void set_stretching_stiffness(float stiffness);
00049   void set_damping_coefficient(float damping);
00050   void set_friction(float friction);
00051   void set_tear_factor(float tearFactor);
00052   void set_particle_radius(float radius);
00053   void set_relative_grid_spacing(float spacing);
00054   void set_collision_response_coefficient(float coef);
00055   void set_attachment_response_coefficient(float coef);
00056   void set_solver_iterations(unsigned int interations);
00057   void set_flag(PhysxSoftBodyFlag flag, bool value);
00058 
00059   const char *get_name() const;
00060   LPoint3f get_global_pos() const;
00061   LMatrix4f get_global_mat() const;
00062   float get_density() const;
00063   float get_volume_stiffness() const;
00064   float get_stretching_stiffness() const;
00065   float get_damping_coefficient() const;
00066   float get_friction() const;
00067   float get_tear_factor() const;
00068   float get_particle_radius() const;
00069   float get_relative_grid_spacing() const;
00070   float get_collision_response_coefficient() const;
00071   float get_attachment_response_coefficient() const;
00072   unsigned int get_solver_iterations() const;
00073   bool get_flag(PhysxSoftBodyFlag flag) const;
00074 
00075 public:
00076   NxSoftBodyDesc _desc;
00077 
00078 private:
00079   string _name;  
00080 };
00081 
00082 #include "physxSoftBodyDesc.I"
00083 
00084 #endif // PHYSXSOFTBODYDESC_H
 All Classes Functions Variables Enumerations