45 int get_num_shapes()
const;
47 MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
49 LPoint3 get_shape_pos(
int idx)
const;
50 LMatrix4 get_shape_mat(
int idx)
const;
57 bool is_static()
const;
58 bool is_kinematic()
const;
60 INLINE
void set_static(
bool value);
61 INLINE
void set_kinematic(
bool value);
66 INLINE
void notify_collisions(
bool value);
67 INLINE
bool notifies_collisions()
const;
69 INLINE
void set_collision_response(
bool value);
70 INLINE
bool get_collision_response()
const;
72 bool check_collision_with(
PandaNode *node);
74 bool has_contact_response()
const;
76 PN_stdfloat get_contact_processing_threshold()
const;
77 void set_contact_processing_threshold(PN_stdfloat threshold);
80 bool is_active()
const;
81 void set_active(
bool active,
bool force=
false);
82 void force_active(
bool active);
84 void set_deactivation_time(PN_stdfloat dt);
85 PN_stdfloat get_deactivation_time()
const;
87 void set_deactivation_enabled(
bool enabled);
88 bool is_deactivation_enabled()
const;
91 INLINE
void set_debug_enabled(
const bool enabled);
92 INLINE
bool is_debug_enabled()
const;
95 PN_stdfloat get_restitution()
const;
96 void set_restitution(PN_stdfloat restitution);
98 PN_stdfloat get_friction()
const;
99 void set_friction(PN_stdfloat friction);
101#if BT_BULLET_VERSION >= 281
102 PN_stdfloat get_rolling_friction()
const;
103 void set_rolling_friction(PN_stdfloat friction);
104 MAKE_PROPERTY(rolling_friction, get_rolling_friction, set_rolling_friction);
107 bool has_anisotropic_friction()
const;
108 void set_anisotropic_friction(
const LVecBase3 &friction);
109 LVecBase3 get_anisotropic_friction()
const;
112 PN_stdfloat get_ccd_swept_sphere_radius()
const;
113 PN_stdfloat get_ccd_motion_threshold()
const;
114 void set_ccd_swept_sphere_radius(PN_stdfloat radius);
115 void set_ccd_motion_threshold(PN_stdfloat threshold);
118 void set_transform_dirty();
120 MAKE_SEQ_PROPERTY(shapes, get_num_shapes, get_shape);
121 MAKE_SEQ_PROPERTY(shape_pos, get_num_shapes, get_shape_pos);
122 MAKE_SEQ_PROPERTY(shape_mat, get_num_shapes, get_shape_mat);
123 MAKE_SEQ_PROPERTY(shape_transform, get_num_shapes, get_shape_transform);
124 MAKE_PROPERTY(shape_bounds, get_shape_bounds);
125 MAKE_PROPERTY(
static, is_static, set_static);
126 MAKE_PROPERTY(kinematic, is_kinematic, set_kinematic);
127 MAKE_PROPERTY(collision_notification, notifies_collisions, notify_collisions);
128 MAKE_PROPERTY(collision_response, get_collision_response, set_collision_response);
129 MAKE_PROPERTY(contact_response, has_contact_response);
130 MAKE_PROPERTY(contact_processing_threshold, get_contact_processing_threshold, set_contact_processing_threshold);
131 MAKE_PROPERTY(active, is_active, force_active);
132 MAKE_PROPERTY(deactivation_time, get_deactivation_time, set_deactivation_time);
133 MAKE_PROPERTY(deactivation_enabled, is_deactivation_enabled, set_deactivation_enabled);
134 MAKE_PROPERTY(debug_enabled, is_debug_enabled, set_debug_enabled);
135 MAKE_PROPERTY(restitution, get_restitution, set_restitution);
136 MAKE_PROPERTY(friction, get_friction, set_friction);
137 MAKE_PROPERTY(anisotropic_friction, get_anisotropic_friction, set_anisotropic_friction);
138 MAKE_PROPERTY(ccd_swept_sphere_radius, get_ccd_swept_sphere_radius, set_ccd_swept_sphere_radius);
139 MAKE_PROPERTY(ccd_motion_threshold, get_ccd_motion_threshold, set_ccd_motion_threshold);
142 virtual btCollisionObject *get_object()
const = 0;
153 virtual void output(std::ostream &out)
const;
154 virtual void do_output(std::ostream &out)
const;
157 void set_collision_flag(
int flag,
bool value);
158 bool get_collision_flag(
int flag)
const;
160 btCollisionShape *_shape;
163 BulletShapes _shapes;
166 virtual void do_shape_changed();
170 static bool is_identity(btTransform &trans);
185 static void init_type() {
186 PandaNode::init_type();
188 PandaNode::get_class_type());
191 return get_class_type();
195 return get_class_type();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.