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