Panda3D
physxSoftBodyDesc.h
1 // Filename: physxSoftBodyDesc.h
2 // Created by: enn0x (12Sep10)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXSOFTBODYDESC_H
16 #define PHYSXSOFTBODYDESC_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "physxEnums.h"
22 #include "physx_includes.h"
23 
24 class PhysxSoftBodyMesh;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : PhysxSoftBodyDesc
28 // Description : Descriptor for PhysxSoftBody.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDAPHYSX PhysxSoftBodyDesc : public PhysxEnums {
31 
32 PUBLISHED:
33  INLINE PhysxSoftBodyDesc();
34  INLINE ~PhysxSoftBodyDesc();
35 
36  INLINE void set_to_default();
37  INLINE bool is_valid() const;
38 
39  void set_soft_body_mesh(PhysxSoftBodyMesh *mesh);
40 
41  void set_name(const char *name);
42  void set_global_pos(const LPoint3f &pos);
43  void set_global_mat(const LMatrix4f &mat);
44  void set_global_hpr(float h, float p, float r);
45  void set_density(float density);
46  void set_volume_stiffness(float stiffness);
47  void set_stretching_stiffness(float stiffness);
48  void set_damping_coefficient(float damping);
49  void set_friction(float friction);
50  void set_tear_factor(float tearFactor);
51  void set_particle_radius(float radius);
52  void set_relative_grid_spacing(float spacing);
53  void set_collision_response_coefficient(float coef);
54  void set_attachment_response_coefficient(float coef);
55  void set_solver_iterations(unsigned int interations);
56  void set_flag(PhysxSoftBodyFlag flag, bool value);
57 
58  const char *get_name() const;
59  LPoint3f get_global_pos() const;
60  LMatrix4f get_global_mat() const;
61  float get_density() const;
62  float get_volume_stiffness() const;
63  float get_stretching_stiffness() const;
64  float get_damping_coefficient() const;
65  float get_friction() const;
66  float get_tear_factor() const;
67  float get_particle_radius() const;
68  float get_relative_grid_spacing() const;
69  float get_collision_response_coefficient() const;
70  float get_attachment_response_coefficient() const;
71  unsigned int get_solver_iterations() const;
72  bool get_flag(PhysxSoftBodyFlag flag) const;
73 
74 public:
75  NxSoftBodyDesc _desc;
76 
77 private:
78  string _name;
79 };
80 
81 #include "physxSoftBodyDesc.I"
82 
83 #endif // PHYSXSOFTBODYDESC_H
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
Descriptor for PhysxSoftBody.
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:357
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:451