21 void PhysxSoftBodyDesc::
22 set_name(
const char *name) {
24 _name = name ? name :
"";
25 _desc.name = _name.c_str();
31 void PhysxSoftBodyDesc::
32 set_global_pos(
const LPoint3f &pos) {
40 void PhysxSoftBodyDesc::
41 set_global_mat(
const LMatrix4f &mat) {
49 void PhysxSoftBodyDesc::
50 set_global_hpr(
float h,
float p,
float r) {
56 q.set_hpr(LVector3f(h, p, r));
57 q.extract_to_matrix(rot);
65 void PhysxSoftBodyDesc::
66 set_particle_radius(
float radius) {
68 _desc.particleRadius = radius;
74 void PhysxSoftBodyDesc::
75 set_relative_grid_spacing(
float spacing) {
77 _desc.relativeGridSpacing = spacing;
83 void PhysxSoftBodyDesc::
84 set_collision_response_coefficient(
float coef) {
86 _desc.collisionResponseCoefficient = coef;
92 void PhysxSoftBodyDesc::
93 set_attachment_response_coefficient(
float coef) {
95 _desc.attachmentResponseCoefficient = coef;
101 void PhysxSoftBodyDesc::
102 set_density(
float density) {
104 _desc.density = density;
110 void PhysxSoftBodyDesc::
111 set_volume_stiffness(
float stiffness) {
113 _desc.volumeStiffness = stiffness;
119 void PhysxSoftBodyDesc::
120 set_stretching_stiffness(
float stiffness) {
122 _desc.stretchingStiffness = stiffness;
128 void PhysxSoftBodyDesc::
129 set_damping_coefficient(
float damping) {
131 _desc.dampingCoefficient = damping;
137 void PhysxSoftBodyDesc::
138 set_friction(
float friction) {
140 _desc.friction = friction;
146 void PhysxSoftBodyDesc::
147 set_tear_factor(
float tearFactor) {
149 _desc.tearFactor = tearFactor;
162 _desc.flags &= ~(flag);
173 _desc.solverIterations = iterations;
179 void PhysxSoftBodyDesc::
182 _desc.softBodyMesh = mesh->ptr();
188 const char *PhysxSoftBodyDesc::
197 LPoint3f PhysxSoftBodyDesc::
198 get_global_pos()
const {
206 LMatrix4f PhysxSoftBodyDesc::
207 get_global_mat()
const {
215 float PhysxSoftBodyDesc::
216 get_particle_radius()
const {
218 return _desc.particleRadius;
224 float PhysxSoftBodyDesc::
225 get_relative_grid_spacing()
const {
227 return _desc.relativeGridSpacing;
233 float PhysxSoftBodyDesc::
234 get_collision_response_coefficient()
const {
236 return _desc.collisionResponseCoefficient;
242 float PhysxSoftBodyDesc::
243 get_attachment_response_coefficient()
const {
245 return _desc.attachmentResponseCoefficient;
251 float PhysxSoftBodyDesc::
252 get_density()
const {
254 return _desc.density;
260 float PhysxSoftBodyDesc::
261 get_volume_stiffness()
const {
263 return _desc.volumeStiffness;
269 float PhysxSoftBodyDesc::
270 get_stretching_stiffness()
const {
272 return _desc.stretchingStiffness;
278 float PhysxSoftBodyDesc::
279 get_damping_coefficient()
const {
281 return _desc.dampingCoefficient;
287 float PhysxSoftBodyDesc::
288 get_friction()
const {
290 return _desc.friction;
296 float PhysxSoftBodyDesc::
297 get_tear_factor()
const {
299 return _desc.tearFactor;
305 bool PhysxSoftBodyDesc::
306 get_flag(PhysxSoftBodyFlag flag)
const {
308 return (_desc.flags & flag) ? true :
false;
314 unsigned int PhysxSoftBodyDesc::
315 get_solver_iterations()
const {
317 return _desc.solverIterations;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static NxMat34 mat4_to_nxMat34(const LMatrix4f &m)
Converts from LMatrix4f to NxMat34.
static NxMat33 mat3_to_nxMat33(const LMatrix3f &m)
Converts from LMatrix3f to NxMat33.
void set_flag(PhysxSoftBodyFlag flag, bool value)
Raise or lower individual SoftBodyFlag flags.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.
void set_solver_iterations(unsigned int interations)
Number of solver iterations.
static LMatrix4f nxMat34_to_mat4(const NxMat34 &m)
Converts from NxMat34 to LMatrix4f.