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