21 INLINE BulletBodyNode::
25 _shape->getShapeType() == COMPOUND_SHAPE_PROXYTYPE ||
26 _shape->getShapeType() == EMPTY_SHAPE_PROXYTYPE)) {
36 INLINE
void BulletBodyNode::
62 INLINE
void BulletBodyNode::
63 notify_collisions(
bool value) {
65 set_collision_flag(btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK, value);
73 INLINE
bool BulletBodyNode::
74 notifies_collisions()
const {
76 return get_collision_flag(btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);
84 INLINE
void BulletBodyNode::
85 set_collision_response(
bool value) {
87 set_collision_flag(btCollisionObject::CF_NO_CONTACT_RESPONSE, !value);
95 INLINE
bool BulletBodyNode::
96 get_collision_response()
const {
98 return !get_collision_flag(btCollisionObject::CF_NO_CONTACT_RESPONSE);
106 INLINE
void BulletBodyNode::
107 set_collision_flag(
int flag,
bool value) {
109 int flags = get_object()->getCollisionFlags();
118 get_object()->setCollisionFlags(flags);
126 INLINE
bool BulletBodyNode::
127 get_collision_flag(
int flag)
const {
129 return (get_object()->getCollisionFlags() & flag) ? true :
false;
137 INLINE
bool BulletBodyNode::
140 return get_object()->isStaticObject();
148 INLINE
bool BulletBodyNode::
149 is_kinematic()
const {
151 return get_object()->isKinematicObject();
159 INLINE
void BulletBodyNode::
160 set_static(
bool value) {
162 set_collision_flag(btCollisionObject::CF_STATIC_OBJECT, value);
170 INLINE
void BulletBodyNode::
171 set_kinematic(
bool value) {
173 set_collision_flag(btCollisionObject::CF_KINEMATIC_OBJECT, value);
181 INLINE PN_stdfloat BulletBodyNode::
182 get_restitution()
const {
184 return get_object()->getRestitution();
192 INLINE
void BulletBodyNode::
193 set_restitution(PN_stdfloat restitution) {
195 return get_object()->setRestitution(restitution);
203 INLINE PN_stdfloat BulletBodyNode::
204 get_friction()
const {
206 return get_object()->getFriction();
214 INLINE
void BulletBodyNode::
215 set_friction(PN_stdfloat friction) {
217 return get_object()->setFriction(friction);
220 #if BT_BULLET_VERSION >= 281 226 INLINE PN_stdfloat BulletBodyNode::
227 get_rolling_friction()
const {
229 return get_object()->getRollingFriction();
237 INLINE
void BulletBodyNode::
238 set_rolling_friction(PN_stdfloat friction) {
240 return get_object()->setRollingFriction(friction);
249 INLINE
bool BulletBodyNode::
250 has_anisotropic_friction()
const {
252 return get_object()->hasAnisotropicFriction();
260 INLINE
int BulletBodyNode::
261 get_num_shapes()
const {
263 return _shapes.size();
272 get_shape(
int idx)
const {
274 nassertr(idx >= 0 && idx < (
int)_shapes.size(), NULL);
288 set_collision_flag(btCollisionObject::CF_DISABLE_VISUALIZE_OBJECT, !enabled);
301 return !get_collision_flag(btCollisionObject::CF_DISABLE_VISUALIZE_OBJECT);
void set_debug_enabled(const bool enabled)
Enables or disables the debug visualisation for this collision object.
void set_into_collide_mask(CollideMask mask)
Sets the "into" CollideMask.
bool is_debug_enabled() const
Returns TRUE if the debug visualisation is enabled for this collision object, and FALSE if the debug ...