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