22 set_name(
const char *name) {
24 _name = name ? name :
"";
25 _desc.name = _name.c_str();
32 set_global_pos(
const LPoint3f &pos) {
41 set_global_mat(
const LMatrix4f &mat) {
50 set_global_hpr(
float h,
float p,
float r) {
56 q.set_hpr(LVector3f(h, p, r));
57 q.extract_to_matrix(rot);
66 set_thickness(
float thickness) {
68 _desc.thickness = thickness;
75 set_density(
float density) {
77 _desc.density = density;
84 set_bending_stiffness(
float stiffness) {
86 _desc.bendingStiffness = stiffness;
93 set_stretching_stiffness(
float stiffness) {
95 _desc.stretchingStiffness = stiffness;
101 void PhysxClothDesc::
102 set_damping_coefficient(
float damping) {
104 _desc.dampingCoefficient = damping;
110 void PhysxClothDesc::
111 set_friction(
float friction) {
113 _desc.friction = friction;
119 void PhysxClothDesc::
120 set_pressure(
float pressure) {
122 _desc.pressure = pressure;
128 void PhysxClothDesc::
129 set_tear_factor(
float tearFactor) {
131 _desc.tearFactor = tearFactor;
144 _desc.flags &= ~(flag);
155 _desc.solverIterations = iterations;
161 void PhysxClothDesc::
164 _desc.clothMesh = mesh->ptr();
170 const char *PhysxClothDesc::
179 LPoint3f PhysxClothDesc::
180 get_global_pos()
const {
188 LMatrix4f PhysxClothDesc::
189 get_global_mat()
const {
197 float PhysxClothDesc::
198 get_thickness()
const {
200 return _desc.thickness;
206 float PhysxClothDesc::
207 get_density()
const {
209 return _desc.density;
215 float PhysxClothDesc::
216 get_bending_stiffness()
const {
218 return _desc.bendingStiffness;
224 float PhysxClothDesc::
225 get_stretching_stiffness()
const {
227 return _desc.stretchingStiffness;
233 float PhysxClothDesc::
234 get_damping_coefficient()
const {
236 return _desc.dampingCoefficient;
242 float PhysxClothDesc::
243 get_friction()
const {
245 return _desc.friction;
251 float PhysxClothDesc::
252 get_pressure()
const {
254 return _desc.pressure;
260 float PhysxClothDesc::
261 get_tear_factor()
const {
263 return _desc.tearFactor;
269 bool PhysxClothDesc::
270 get_flag(PhysxClothFlag flag)
const {
272 return (_desc.flags & flag) ? true :
false;
278 unsigned int PhysxClothDesc::
279 get_solver_iterations()
const {
281 return _desc.solverIterations;
void set_solver_iterations(unsigned int interations)
Number of solver iterations.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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(PhysxClothFlag flag, bool value)
Raise or lower individual ClothFlag flags.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static LMatrix4f nxMat34_to_mat4(const NxMat34 &m)
Converts from NxMat34 to LMatrix4f.