47 LPoint3 get_pos()
const;
48 LVector3 get_velocity()
const;
49 LVector3 get_normal()
const;
50 PN_stdfloat get_inv_mass()
const;
51 PN_stdfloat get_area()
const;
52 int is_attached()
const;
54 MAKE_PROPERTY(pos, get_pos);
55 MAKE_PROPERTY(velocity, get_velocity);
56 MAKE_PROPERTY(normal, get_normal);
57 MAKE_PROPERTY(inv_mass, get_inv_mass);
58 MAKE_PROPERTY(area, get_area);
59 MAKE_PROPERTY(attached, is_attached);
65 btSoftBody::Node &_node;
83 void randomize_constraints();
86 void set_volume_mass(PN_stdfloat mass);
87 void set_volume_density(PN_stdfloat density);
88 void set_total_mass(PN_stdfloat mass,
bool fromfaces=
false);
89 void set_total_density(PN_stdfloat density);
90 void set_mass(
int node, PN_stdfloat mass);
92 PN_stdfloat get_mass(
int node)
const;
93 PN_stdfloat get_total_mass()
const;
94 PN_stdfloat get_volume()
const;
97 void add_force(
const LVector3 &force);
98 void add_force(
const LVector3 &force,
int node);
100 void set_velocity(
const LVector3 &velocity);
101 void add_velocity(
const LVector3 &velocity);
102 void add_velocity(
const LVector3 &velocity,
int node);
104 void set_wind_velocity(
const LVector3 &velocity);
105 LVector3 get_wind_velocity()
const;
107 void set_pose(
bool bvolume,
bool bframe);
112 void generate_clusters(
int k,
int maxiterations=8192);
113 void release_cluster(
int index);
114 void release_clusters();
115 int get_num_clusters()
const;
116 LVecBase3 cluster_com(
int cluster)
const;
119 void link_geom(
Geom *geom);
126 void unlink_surface();
132 const LVector3 &pivot,
139 PN_stdfloat split=1.0);
141 void append_linear_joint(
BulletBodyNode *body,
const LPoint3 &pos,
144 PN_stdfloat split=1.0);
146 void append_angular_joint(
BulletBodyNode *body,
const LVector3 &axis,
149 PN_stdfloat split=1.0,
153 int get_num_materials()
const;
155 MAKE_SEQ(get_materials, get_num_materials, get_material);
160 int get_num_nodes()
const;
162 MAKE_SEQ(get_nodes, get_num_nodes, get_node);
164 int get_closest_node_index(LVecBase3 point,
bool local);
176 const LPoint3 &corner00,
177 const LPoint3 &corner10,
178 const LPoint3 &corner01,
179 const LPoint3 &corner11,
187 const LPoint3 ¢er,
188 const LVecBase3 &radius,
194 bool randomizeConstraints=
true);
198 PTA_LVecBase3 points,
200 bool randomizeConstraints=
true);
204 PTA_LVecBase3 points,
206 bool tetralinks=
true);
214 MAKE_PROPERTY(cfg, get_cfg);
215 MAKE_PROPERTY(world_info, get_world_info);
216 MAKE_PROPERTY(wind_velocity, get_wind_velocity, set_wind_velocity);
217 MAKE_PROPERTY(aabb, get_aabb);
218 MAKE_PROPERTY(num_clusters, get_num_clusters);
219 MAKE_SEQ_PROPERTY(materials, get_num_materials, get_material);
220 MAKE_SEQ_PROPERTY(nodes, get_num_nodes, get_node);
223 virtual btCollisionObject *get_object()
const;
229 virtual void transform_changed();
241 static int get_point_index(LVecBase3 p, PTA_LVecBase3 points);
242 static int next_line(
const char *buffer);
245 int do_get_closest_node_index(LVecBase3 point,
bool local);
251 static void init_type() {
252 BulletBodyNode::init_type();
254 BulletBodyNode::get_class_type());
257 return get_class_type();
261 return get_class_type();
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(),...