42 void set_name(
const char *name);
43 void set_group(
unsigned int group);
45 void set_flag(PhysxClothFlag flag,
bool value);
46 void set_thickness(
float thickness);
48 const char *get_name()
const;
49 unsigned int get_num_particles();
50 unsigned int get_group()
const;
52 bool get_flag(PhysxClothFlag flag)
const;
53 float get_thickness()
const;
54 float get_density()
const;
55 float get_relative_grid_spacing()
const;
58 void attach_vertex_to_global_pos(
unsigned int vertexId, LPoint3f
const &pos);
59 void free_vertex(
unsigned int vertexId);
61 void attach_to_colliding_shapes();
63 void attach_vertex_to_shape(
unsigned int vertexId,
PhysxShape *shape, LPoint3f
const &localPos);
64 PhysxVertexAttachmentStatus get_vertex_attachment_status(
unsigned int vertexId)
const;
65 PhysxShape *get_vertex_attachment_shape(
unsigned int vertexId)
const;
66 LPoint3f get_vertex_attachment_pos(
unsigned int vertexId)
const;
69 bool is_sleeping()
const;
70 void wake_up(
float wakeCounterValue=NX_SLEEP_INTERVAL);
72 void set_sleep_linear_velocity(
float threshold);
73 float get_sleep_linear_velocity()
const;
76 void set_external_acceleration(LVector3f
const &acceleration);
77 LVector3f get_external_acceleration()
const;
79 void set_wind_acceleration(LVector3f
const &acceleration);
80 LVector3f get_wind_acceleration()
const;
82 void add_force_at_vertex(LVector3f
const &force,
int vertexId,
83 PhysxForceMode mode=FM_force);
84 void add_force_at_pos(LPoint3f
const &pos,
float magnitude,
float radius,
85 PhysxForceMode mode=FM_force);
86 void add_directed_force_at_pos(LPoint3f
const &pos, LVector3f
const &force,
float radius,
87 PhysxForceMode mode=FM_force);
89 INLINE
void ls()
const;
90 INLINE
void ls(std::ostream &out,
int indent_level=0)
const;
99 INLINE NxCloth *ptr()
const {
return _ptr; };
101 void link(NxCloth *ptr);
113 static void init_type() {
114 PhysxObject::init_type();
116 PhysxObject::get_class_type());
119 return get_class_type();
123 return get_class_type();
132 #endif // PHYSXCLOTH_H PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Abstract base class for shapes.
A scene is a collection of bodies, constraints, and effectors which can interact.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class exists just to provide scoping for the enums shared by PhysX classes.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Renderable geometry which represents a cloth mesh.