15 #ifndef __BULLET_SOFT_BODY_NODE_H__ 16 #define __BULLET_SOFT_BODY_NODE_H__ 18 #include "pandabase.h" 20 #include "bullet_includes.h" 21 #include "bullet_utils.h" 22 #include "bulletBodyNode.h" 24 #include "collideMask.h" 27 #include "geomVertexFormat.h" 28 #include "boundingBox.h" 29 #include "nurbsCurveEvaluator.h" 30 #include "nurbsSurfaceEvaluator.h" 31 #include "pta_LVecBase3.h" 49 INLINE
LVector3 get_velocity()
const;
51 INLINE PN_stdfloat get_inv_mass()
const;
52 INLINE PN_stdfloat get_area()
const;
53 INLINE
int is_attached()
const;
59 btSoftBody::Node &_node;
78 void randomize_constraints();
81 void set_volume_mass(PN_stdfloat mass);
82 void set_volume_density(PN_stdfloat density);
83 void set_total_mass(PN_stdfloat mass,
bool fromfaces=
false);
84 void set_total_density(PN_stdfloat density);
85 void set_mass(
int node, PN_stdfloat mass);
87 PN_stdfloat get_mass(
int node)
const;
88 PN_stdfloat get_total_mass()
const;
89 PN_stdfloat get_volume()
const;
92 void add_force(
const LVector3 &force);
93 void add_force(
const LVector3 &force,
int node);
95 void set_velocity(
const LVector3 &velocity);
96 void add_velocity(
const LVector3 &velocity);
97 void add_velocity(
const LVector3 &velocity,
int node);
99 void set_wind_velocity(
const LVector3 &velocity);
102 void set_pose(
bool bvolume,
bool bframe);
107 void generate_clusters(
int k,
int maxiterations=8192);
108 void release_cluster(
int index);
109 void release_clusters();
110 int get_num_clusters()
const;
111 LVecBase3 cluster_com(
int cluster)
const;
114 void link_geom(
Geom *geom);
121 void unlink_surface();
134 PN_stdfloat split=1.0);
139 PN_stdfloat split=1.0);
144 PN_stdfloat split=1.0,
148 int get_num_materials()
const;
150 MAKE_SEQ(get_materials, get_num_materials, get_material);
155 int get_num_nodes()
const;
157 MAKE_SEQ(get_nodes, get_num_nodes, get_node);
159 int get_closest_node_index(
LVecBase3 point,
bool local);
189 bool randomizeConstraints=
true);
193 PTA_LVecBase3 points,
195 bool randomizeConstraints=
true);
199 PTA_LVecBase3 points,
201 bool tetralinks=
true);
210 virtual btCollisionObject *get_object()
const;
216 virtual void transform_changed();
221 CPT(TransformState) _sync;
228 static int get_point_index(
LVecBase3 p, PTA_LVecBase3 points);
229 static int next_line(
const char *buffer);
236 static void init_type() {
237 BulletBodyNode::init_type();
238 register_type(_type_handle,
"BulletSoftBodyNode",
239 BulletBodyNode::get_class_type());
242 return get_class_type();
246 return get_class_type();
253 #include "bulletSoftBodyNode.I" 255 #endif // __BULLET_SOFT_BODY_NODE_H__
An axis-aligned bounding box; that is, a minimum and maximum coordinate triple.
This is the base class for all three-component vectors and points.
This class is an abstraction for evaluating NURBS curves.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
This class is an abstraction for evaluating NURBS surfaces.
A container for geometry primitives.
TypeHandle is the identifier used to differentiate C++ class types.