Add properties to Bullet classes (#140)
This commit is contained in:
parent
605ac1189f
commit
f773bf6328
|
|
@ -39,6 +39,13 @@ PUBLISHED:
|
|||
int get_shape_part() const;
|
||||
int get_triangle_index() const;
|
||||
|
||||
MAKE_PROPERTY(node, get_node);
|
||||
MAKE_PROPERTY(hit_pos, get_hit_pos);
|
||||
MAKE_PROPERTY(hit_normal, get_hit_normal);
|
||||
MAKE_PROPERTY(hit_fraction, get_hit_fraction);
|
||||
MAKE_PROPERTY(shape_part, get_shape_part);
|
||||
MAKE_PROPERTY(triangle_index, get_triangle_index);
|
||||
|
||||
private:
|
||||
const btCollisionObject *_object;
|
||||
btVector3 _normal;
|
||||
|
|
@ -69,6 +76,11 @@ PUBLISHED:
|
|||
const BulletRayHit get_hit(int idx) const;
|
||||
MAKE_SEQ(get_hits, get_num_hits, get_hit);
|
||||
|
||||
MAKE_PROPERTY(from_pos, get_from_pos);
|
||||
MAKE_PROPERTY(to_pos, get_to_pos);
|
||||
MAKE_PROPERTY(closest_hit_fraction, get_closest_hit_fraction);
|
||||
MAKE_SEQ_PROPERTY(hits, get_num_hits, get_hit);
|
||||
|
||||
public:
|
||||
virtual bool needsCollision(btBroadphaseProxy* proxy0) const;
|
||||
virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace);
|
||||
|
|
|
|||
|
|
@ -442,6 +442,15 @@ set_active(bool active, bool force) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void BulletBodyNode::
|
||||
force_active(bool active) {
|
||||
|
||||
set_active(active, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, this object will be deactivated after a certain amount of time has
|
||||
* passed without movement. If false, the object will always remain active.
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ PUBLISHED:
|
|||
// Static and kinematic
|
||||
INLINE bool is_static() const;
|
||||
INLINE bool is_kinematic() const;
|
||||
|
||||
|
||||
INLINE void set_static(bool value);
|
||||
INLINE void set_kinematic(bool value);
|
||||
|
||||
|
|
@ -79,6 +79,7 @@ PUBLISHED:
|
|||
// Deactivation
|
||||
bool is_active() const;
|
||||
void set_active(bool active, bool force=false);
|
||||
void force_active(bool active);
|
||||
|
||||
void set_deactivation_time(PN_stdfloat dt);
|
||||
PN_stdfloat get_deactivation_time() const;
|
||||
|
|
@ -86,7 +87,7 @@ PUBLISHED:
|
|||
void set_deactivation_enabled(bool enabled);
|
||||
bool is_deactivation_enabled() const;
|
||||
|
||||
// Debug Visualistion
|
||||
// Debug Visualisation
|
||||
INLINE void set_debug_enabled(const bool enabled);
|
||||
INLINE bool is_debug_enabled() const;
|
||||
|
||||
|
|
@ -100,6 +101,7 @@ PUBLISHED:
|
|||
#if BT_BULLET_VERSION >= 281
|
||||
INLINE PN_stdfloat get_rolling_friction() const;
|
||||
INLINE void set_rolling_friction(PN_stdfloat friction);
|
||||
MAKE_PROPERTY(rolling_friction, get_rolling_friction, set_rolling_friction);
|
||||
#endif
|
||||
|
||||
INLINE bool has_anisotropic_friction() const;
|
||||
|
|
@ -115,6 +117,27 @@ PUBLISHED:
|
|||
// Special
|
||||
void set_transform_dirty();
|
||||
|
||||
MAKE_SEQ_PROPERTY(shapes, get_num_shapes, get_shape);
|
||||
MAKE_SEQ_PROPERTY(shape_pos, get_num_shapes, get_shape_pos);
|
||||
MAKE_SEQ_PROPERTY(shape_mat, get_num_shapes, get_shape_mat);
|
||||
MAKE_SEQ_PROPERTY(shape_transform, get_num_shapes, get_shape_transform);
|
||||
MAKE_PROPERTY(shape_bounds, get_shape_bounds);
|
||||
MAKE_PROPERTY(static, is_static, set_static);
|
||||
MAKE_PROPERTY(kinematic, is_kinematic, set_kinematic);
|
||||
MAKE_PROPERTY(collision_notification, notifies_collisions, notify_collisions);
|
||||
MAKE_PROPERTY(collision_response, get_collision_response, set_collision_response);
|
||||
MAKE_PROPERTY(contact_response, has_contact_response);
|
||||
MAKE_PROPERTY(contact_processing_threshold, get_contact_processing_threshold, set_contact_processing_threshold);
|
||||
MAKE_PROPERTY(active, is_active, force_active);
|
||||
MAKE_PROPERTY(deactivation_time, get_deactivation_time, set_deactivation_time);
|
||||
MAKE_PROPERTY(deactivation_enabled, is_deactivation_enabled, set_deactivation_enabled);
|
||||
MAKE_PROPERTY(debug_enabled, is_debug_enabled, set_debug_enabled);
|
||||
MAKE_PROPERTY(restitution, get_restitution, set_restitution);
|
||||
MAKE_PROPERTY(friction, get_friction, set_friction);
|
||||
MAKE_PROPERTY(anisotropic_friction, get_anisotropic_friction, set_anisotropic_friction);
|
||||
MAKE_PROPERTY(ccd_swept_sphere_radius, get_ccd_swept_sphere_radius, set_ccd_swept_sphere_radius);
|
||||
MAKE_PROPERTY(ccd_motion_threshold, get_ccd_motion_threshold, set_ccd_motion_threshold);
|
||||
|
||||
public:
|
||||
virtual btCollisionObject *get_object() const = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ PUBLISHED:
|
|||
|
||||
static BulletBoxShape *make_from_solid(const CollisionBox *solid);
|
||||
|
||||
MAKE_PROPERTY(half_extents_with_margin, get_half_extents_with_margin);
|
||||
MAKE_PROPERTY(half_extents_without_margin, get_half_extents_without_margin);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ PUBLISHED:
|
|||
INLINE PN_stdfloat get_radius() const;
|
||||
INLINE PN_stdfloat get_half_height() const;
|
||||
|
||||
MAKE_PROPERTY(radius, get_radius);
|
||||
MAKE_PROPERTY(half_height, get_half_height);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -296,7 +296,6 @@ set_gravity(PN_stdfloat gravity) {
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -304,4 +303,4 @@ void BulletCharacterControllerNode::
|
|||
set_use_ghost_sweep_test(bool value) {
|
||||
|
||||
return _character->setUseGhostSweepTest(value);
|
||||
}
|
||||
}
|
||||
|
|
@ -39,20 +39,27 @@ PUBLISHED:
|
|||
|
||||
BulletShape *get_shape() const;
|
||||
|
||||
void set_gravity(PN_stdfloat gravity);
|
||||
PN_stdfloat get_gravity() const;
|
||||
PN_stdfloat get_max_slope() const;
|
||||
|
||||
void set_fall_speed(PN_stdfloat fall_speed);
|
||||
void set_jump_speed(PN_stdfloat jump_speed);
|
||||
void set_max_jump_height(PN_stdfloat max_jump_height);
|
||||
|
||||
void set_max_slope(PN_stdfloat max_slope);
|
||||
void set_gravity(PN_stdfloat gravity);
|
||||
PN_stdfloat get_max_slope() const;
|
||||
|
||||
void set_use_ghost_sweep_test(bool value);
|
||||
|
||||
bool is_on_ground() const;
|
||||
bool can_jump() const;
|
||||
void do_jump();
|
||||
|
||||
MAKE_PROPERTY(shape, get_shape);
|
||||
MAKE_PROPERTY(gravity, get_gravity, set_gravity);
|
||||
MAKE_PROPERTY(max_slope, get_max_slope, set_max_slope);
|
||||
MAKE_PROPERTY(on_ground, is_on_ground);
|
||||
|
||||
public:
|
||||
INLINE virtual btPairCachingGhostObject *get_ghost() const;
|
||||
INLINE virtual btCharacterControllerInterface *get_character() const;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,15 @@ PUBLISHED:
|
|||
int get_shape_part() const;
|
||||
int get_triangle_index() const;
|
||||
|
||||
MAKE_PROPERTY(from_pos, get_from_pos);
|
||||
MAKE_PROPERTY(to_pos, get_to_pos);
|
||||
MAKE_PROPERTY(node, get_node);
|
||||
MAKE_PROPERTY(hit_pos, get_hit_pos);
|
||||
MAKE_PROPERTY(hit_normal, get_hit_normal);
|
||||
MAKE_PROPERTY(hit_fraction, get_hit_fraction);
|
||||
MAKE_PROPERTY(shape_part, get_shape_part);
|
||||
MAKE_PROPERTY(triangle_index, get_triangle_index);
|
||||
|
||||
public:
|
||||
virtual bool needsCollision(btBroadphaseProxy* proxy0) const;
|
||||
virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,13 @@ PUBLISHED:
|
|||
LVector3 get_hit_normal() const;
|
||||
PN_stdfloat get_hit_fraction() const;
|
||||
|
||||
MAKE_PROPERTY(from_pos, get_from_pos);
|
||||
MAKE_PROPERTY(to_pos, get_to_pos);
|
||||
MAKE_PROPERTY(node, get_node);
|
||||
MAKE_PROPERTY(hit_pos, get_hit_pos);
|
||||
MAKE_PROPERTY(hit_normal, get_hit_normal);
|
||||
MAKE_PROPERTY(hit_fraction, get_hit_fraction);
|
||||
|
||||
public:
|
||||
virtual bool needsCollision(btBroadphaseProxy* proxy0) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ PUBLISHED:
|
|||
INLINE PN_stdfloat get_radius() const;
|
||||
INLINE PN_stdfloat get_height() const;
|
||||
|
||||
MAKE_PROPERTY(radius, get_radius);
|
||||
MAKE_PROPERTY(height, get_height);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ PUBLISHED:
|
|||
INLINE CPT(TransformState) get_frame_a() const;
|
||||
INLINE CPT(TransformState) get_frame_b() const;
|
||||
|
||||
MAKE_PROPERTY(fix_threshold, get_fix_threshold, set_fix_threshold);
|
||||
MAKE_PROPERTY(frame_a, get_frame_a);
|
||||
MAKE_PROPERTY(frame_b, get_frame_b);
|
||||
|
||||
public:
|
||||
virtual btTypedConstraint *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ set_breaking_threshold(PN_stdfloat threshold) {
|
|||
* Returns the applied impluse limit for breaking the constraint.
|
||||
*/
|
||||
INLINE PN_stdfloat BulletConstraint::
|
||||
set_breaking_threshold() const {
|
||||
get_breaking_threshold() const {
|
||||
|
||||
return (PN_stdfloat)ptr()->getBreakingImpulseThreshold();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,13 +34,13 @@ PUBLISHED:
|
|||
BulletRigidBodyNode *get_rigid_body_b();
|
||||
|
||||
void enable_feedback(bool value);
|
||||
void set_debug_draw_size(PN_stdfloat size);
|
||||
|
||||
PN_stdfloat get_applied_impulse() const;
|
||||
void set_debug_draw_size(PN_stdfloat size);
|
||||
PN_stdfloat get_debug_draw_size();
|
||||
|
||||
PN_stdfloat get_applied_impulse() const;
|
||||
INLINE void set_breaking_threshold(PN_stdfloat threshold);
|
||||
INLINE PN_stdfloat set_breaking_threshold() const;
|
||||
INLINE PN_stdfloat get_breaking_threshold() const;
|
||||
INLINE void set_enabled(bool enabled);
|
||||
INLINE bool is_enabled() const;
|
||||
|
||||
|
|
@ -54,6 +54,13 @@ PUBLISHED:
|
|||
void set_param(ConstraintParam num, PN_stdfloat value, int axis=-1);
|
||||
PN_stdfloat get_param(ConstraintParam num, int axis=-1);
|
||||
|
||||
MAKE_PROPERTY(rigid_body_a, get_rigid_body_a);
|
||||
MAKE_PROPERTY(rigid_body_b, get_rigid_body_b);
|
||||
MAKE_PROPERTY(debug_draw_size, get_debug_draw_size, set_debug_draw_size);
|
||||
MAKE_PROPERTY(applied_impulse, get_applied_impulse);
|
||||
MAKE_PROPERTY(breaking_threshold, get_breaking_threshold, set_breaking_threshold);
|
||||
MAKE_PROPERTY(enabled, is_enabled, set_enabled);
|
||||
|
||||
public:
|
||||
virtual btTypedConstraint *ptr() const = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,14 @@ PUBLISHED:
|
|||
INLINE int get_index0() const;
|
||||
INLINE int get_index1() const;
|
||||
|
||||
MAKE_PROPERTY(manifold, get_manifold);
|
||||
MAKE_PROPERTY(node0, get_node0);
|
||||
MAKE_PROPERTY(node1, get_node1);
|
||||
MAKE_PROPERTY(part_id0, get_part_id0);
|
||||
MAKE_PROPERTY(part_id1, get_part_id1);
|
||||
MAKE_PROPERTY(index0, get_index0);
|
||||
MAKE_PROPERTY(index1, get_index1);
|
||||
|
||||
private:
|
||||
BulletManifoldPoint &_mp;
|
||||
PandaNode *_node0;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include "eventParameter.h"
|
||||
#include "pandaNode.h"
|
||||
|
||||
struct UserPersitentData {
|
||||
struct UserPersistentData {
|
||||
PT(PandaNode) node0;
|
||||
PT(PandaNode) node1;
|
||||
};
|
||||
|
|
@ -64,7 +64,7 @@ contact_added_callback(btManifoldPoint &cp,
|
|||
bullet_cat.debug() << "contact added: " << cp.m_userPersistentData << endl;
|
||||
|
||||
// Gather persistent data
|
||||
UserPersitentData *data = new UserPersitentData();
|
||||
UserPersistentData *data = new UserPersistentData();
|
||||
data->node0 = node0;
|
||||
data->node1 = node1;
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ contact_destroyed_callback(void *userPersistentData) {
|
|||
|
||||
bullet_cat.debug() << "contact removed: " << userPersistentData << endl;
|
||||
|
||||
UserPersitentData *data = (UserPersitentData *)userPersistentData;
|
||||
UserPersistentData *data = (UserPersistentData *)userPersistentData;
|
||||
|
||||
// Send event
|
||||
if (bullet_enable_contact_events) {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,14 @@ PUBLISHED:
|
|||
INLINE int get_part_id0() const;
|
||||
INLINE int get_part_id1() const;
|
||||
|
||||
MAKE_PROPERTY(manifold_point, get_manifold_point);
|
||||
MAKE_PROPERTY(node0, get_node0);
|
||||
MAKE_PROPERTY(node1, get_node1);
|
||||
MAKE_PROPERTY(idx0, get_idx0);
|
||||
MAKE_PROPERTY(idx1, get_idx1);
|
||||
MAKE_PROPERTY(part_id0, get_part_id0);
|
||||
MAKE_PROPERTY(part_id1, get_part_id1);
|
||||
|
||||
private:
|
||||
static btManifoldPoint _empty;
|
||||
|
||||
|
|
@ -64,6 +72,7 @@ PUBLISHED:
|
|||
INLINE int get_num_contacts() const;
|
||||
INLINE BulletContact get_contact(int idx);
|
||||
MAKE_SEQ(get_contacts, get_num_contacts, get_contact);
|
||||
MAKE_SEQ_PROPERTY(contacts, get_num_contacts, get_contact);
|
||||
|
||||
public:
|
||||
#if BT_BULLET_VERSION >= 281
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ PUBLISHED:
|
|||
|
||||
INLINE int get_num_points() const;
|
||||
|
||||
MAKE_PROPERTY(num_points, get_num_points);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ PUBLISHED:
|
|||
INLINE LVecBase3 get_half_extents_without_margin() const;
|
||||
INLINE LVecBase3 get_half_extents_with_margin() const;
|
||||
|
||||
MAKE_PROPERTY(radius, get_radius);
|
||||
MAKE_PROPERTY(half_extents_without_margin, get_half_extents_without_margin);
|
||||
MAKE_PROPERTY(half_extents_with_margin, get_half_extents_with_margin);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,15 @@ show_wireframe(bool show) {
|
|||
draw_mask_changed();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE bool BulletDebugNode::
|
||||
get_show_wireframe() const {
|
||||
|
||||
return _wireframe;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -39,6 +48,15 @@ show_constraints(bool show) {
|
|||
draw_mask_changed();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE bool BulletDebugNode::
|
||||
get_show_constraints() const {
|
||||
|
||||
return _constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -49,6 +67,15 @@ show_bounding_boxes(bool show) {
|
|||
draw_mask_changed();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE bool BulletDebugNode::
|
||||
get_show_bounding_boxes() const {
|
||||
|
||||
return _bounds;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -57,3 +84,12 @@ show_normals(bool show) {
|
|||
|
||||
_drawer._normals = show;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE bool BulletDebugNode::
|
||||
get_show_normals() const {
|
||||
|
||||
return _drawer._normals;
|
||||
}
|
||||
|
|
@ -35,6 +35,15 @@ PUBLISHED:
|
|||
INLINE void show_constraints(bool show);
|
||||
INLINE void show_bounding_boxes(bool show);
|
||||
INLINE void show_normals(bool show);
|
||||
INLINE bool get_show_wireframe() const;
|
||||
INLINE bool get_show_constraints() const;
|
||||
INLINE bool get_show_bounding_boxes() const;
|
||||
INLINE bool get_show_normals() const;
|
||||
|
||||
MAKE_PROPERTY(wireframe, get_show_wireframe, show_wireframe);
|
||||
MAKE_PROPERTY(constraints, get_show_constraints, show_constraints);
|
||||
MAKE_PROPERTY(bounding_boxes, get_show_bounding_boxes, show_bounding_boxes);
|
||||
MAKE_PROPERTY(normals, get_show_normals, show_normals);
|
||||
|
||||
public:
|
||||
virtual bool safe_to_flatten() const;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ PUBLISHED:
|
|||
INLINE void set_collide(bool collide);
|
||||
INLINE bool get_collide() const;
|
||||
|
||||
MAKE_PROPERTY(node_0, get_node_0);
|
||||
MAKE_PROPERTY(node_1, get_node_1);
|
||||
MAKE_PROPERTY(collide, get_collide, set_collide);
|
||||
|
||||
private:
|
||||
PandaNode *_node0;
|
||||
PandaNode *_node1;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,10 @@ PUBLISHED:
|
|||
INLINE CPT(TransformState) get_frame_a() const;
|
||||
INLINE CPT(TransformState) get_frame_b() const;
|
||||
|
||||
MAKE_PROPERTY(translational_limit_motor, get_translational_limit_motor);
|
||||
MAKE_PROPERTY(frame_a, get_frame_a);
|
||||
MAKE_PROPERTY(frame_b, get_frame_b);
|
||||
|
||||
public:
|
||||
virtual btTypedConstraint *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ PUBLISHED:
|
|||
INLINE int get_num_overlapping_nodes() const;
|
||||
INLINE PandaNode *get_overlapping_node(int idx) const;
|
||||
MAKE_SEQ(get_overlapping_nodes, get_num_overlapping_nodes, get_overlapping_node);
|
||||
|
||||
MAKE_SEQ_PROPERTY(overlapping_nodes, get_num_overlapping_nodes, get_overlapping_node);
|
||||
|
||||
public:
|
||||
virtual btCollisionObject *get_object() const;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ PUBLISHED:
|
|||
|
||||
static void make_texcoords_for_patch(Geom *geom, int resx, int resy);
|
||||
|
||||
MAKE_PROPERTY(sb_index, get_sb_index);
|
||||
MAKE_PROPERTY(sb_flip, get_sb_flip);
|
||||
|
||||
private:
|
||||
static PT(InternalName) _sb_index;
|
||||
static PT(InternalName) _sb_flip;
|
||||
|
|
|
|||
|
|
@ -73,6 +73,13 @@ PUBLISHED:
|
|||
INLINE CPT(TransformState) get_frame_a() const;
|
||||
INLINE CPT(TransformState) get_frame_b() const;
|
||||
|
||||
MAKE_PROPERTY(hinge_angle, get_hinge_angle);
|
||||
MAKE_PROPERTY(lower_limit, get_lower_limit);
|
||||
MAKE_PROPERTY(upper_limit, get_upper_limit);
|
||||
MAKE_PROPERTY(angular_only, get_angular_only, set_angular_only);
|
||||
MAKE_PROPERTY(frame_a, get_frame_a);
|
||||
MAKE_PROPERTY(frame_b, get_frame_b);
|
||||
|
||||
public:
|
||||
virtual btTypedConstraint *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,30 @@ PUBLISHED:
|
|||
INLINE PN_stdfloat get_contact_cfm1() const;
|
||||
INLINE PN_stdfloat get_contact_cfm2() const;
|
||||
|
||||
MAKE_PROPERTY(life_time, get_life_time);
|
||||
MAKE_PROPERTY(distance, get_distance);
|
||||
MAKE_PROPERTY(applied_impulse, get_applied_impulse, set_applied_impulse);
|
||||
MAKE_PROPERTY(position_world_on_a, get_position_world_on_a);
|
||||
MAKE_PROPERTY(position_world_on_b, get_position_world_on_b);
|
||||
MAKE_PROPERTY(normal_world_on_b, get_normal_world_on_b);
|
||||
MAKE_PROPERTY(local_point_a, get_local_point_a);
|
||||
MAKE_PROPERTY(local_point_b, get_local_point_b);
|
||||
MAKE_PROPERTY(part_id0, get_part_id0);
|
||||
MAKE_PROPERTY(part_id1, get_part_id1);
|
||||
MAKE_PROPERTY(index0, get_index0);
|
||||
MAKE_PROPERTY(index1, get_index1);
|
||||
MAKE_PROPERTY(lateral_friction_initialized, get_lateral_friction_initialized, set_lateral_friction_initialized);
|
||||
MAKE_PROPERTY(lateral_friction_dir1, get_lateral_friction_dir1, set_lateral_friction_dir1);
|
||||
MAKE_PROPERTY(lateral_friction_dir2, get_lateral_friction_dir2, set_lateral_friction_dir2);
|
||||
MAKE_PROPERTY(contact_motion1, get_contact_motion1, set_contact_motion1);
|
||||
MAKE_PROPERTY(contact_motion2, get_contact_motion2, set_contact_motion2);
|
||||
MAKE_PROPERTY(combined_friction, get_combined_friction, set_combined_friction);
|
||||
MAKE_PROPERTY(combined_restitution, get_combined_restitution, set_combined_restitution);
|
||||
MAKE_PROPERTY(applied_impulse_lateral1, get_applied_impulse_lateral1, set_applied_impulse_lateral1);
|
||||
MAKE_PROPERTY(applied_impulse_lateral2, get_applied_impulse_lateral2, set_applied_impulse_lateral2);
|
||||
MAKE_PROPERTY(contact_cfm1, get_contact_cfm1, set_contact_cfm1);
|
||||
MAKE_PROPERTY(contact_cfm2, get_contact_cfm2, set_contact_cfm2);
|
||||
|
||||
public:
|
||||
BulletManifoldPoint(btManifoldPoint &pt);
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ PUBLISHED:
|
|||
|
||||
INLINE PN_stdfloat get_margin() const;
|
||||
|
||||
MAKE_PROPERTY(transform_a, get_transform_a, set_transform_a);
|
||||
MAKE_PROPERTY(transform_b, get_transform_b, set_transform_b);
|
||||
MAKE_PROPERTY(shape_a, get_shape_a);
|
||||
MAKE_PROPERTY(shape_b, get_shape_b);
|
||||
MAKE_PROPERTY(margin, get_margin);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@ PUBLISHED:
|
|||
INLINE LPoint3 get_sphere_pos(int index) const;
|
||||
INLINE PN_stdfloat get_sphere_radius(int index) const;
|
||||
|
||||
MAKE_PROPERTY(sphere_count, get_sphere_count);
|
||||
MAKE_SEQ_PROPERTY(sphere_pos, get_sphere_count, get_sphere_pos);
|
||||
MAKE_SEQ_PROPERTY(sphere_radius, get_sphere_count, get_sphere_radius);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,12 @@ PUBLISHED:
|
|||
|
||||
void clear_manifold();
|
||||
|
||||
MAKE_PROPERTY(node0, get_node0);
|
||||
MAKE_PROPERTY(node1, get_node1);
|
||||
MAKE_SEQ_PROPERTY(manifold_points, get_num_manifold_points, get_manifold_point);
|
||||
MAKE_PROPERTY(contact_breaking_threshold, get_contact_breaking_threshold);
|
||||
MAKE_PROPERTY(contact_processing_threshold, get_contact_processing_threshold);
|
||||
|
||||
public:
|
||||
BulletPersistentManifold(btPersistentManifold *manifold);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ PUBLISHED:
|
|||
|
||||
static BulletPlaneShape *make_from_solid(const CollisionPlane *solid);
|
||||
|
||||
MAKE_PROPERTY(plane_normal, get_plane_normal);
|
||||
MAKE_PROPERTY(plane_constant, get_plane_constant);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,23 @@ PUBLISHED:
|
|||
// Special
|
||||
bool pick_dirty_flag();
|
||||
|
||||
MAKE_PROPERTY(mass, get_mass, set_mass);
|
||||
MAKE_PROPERTY(inv_mass, get_inv_mass);
|
||||
MAKE_PROPERTY(inertia, get_inertia, set_inertia);
|
||||
MAKE_PROPERTY(inv_inertia_diag_local, get_inv_inertia_diag_local);
|
||||
MAKE_PROPERTY(inv_inertia_tensor_world, get_inv_inertia_tensor_world);
|
||||
MAKE_PROPERTY(linear_velocity, get_linear_velocity, set_linear_velocity);
|
||||
MAKE_PROPERTY(angular_velocity, get_angular_velocity, set_angular_velocity);
|
||||
MAKE_PROPERTY(linear_damping, get_linear_damping, set_linear_damping);
|
||||
MAKE_PROPERTY(angular_damping, get_angular_damping, set_angular_damping);
|
||||
MAKE_PROPERTY(total_force, get_total_force);
|
||||
MAKE_PROPERTY(total_torque, get_total_torque);
|
||||
MAKE_PROPERTY(linear_sleep_threshold, get_linear_sleep_threshold, set_linear_sleep_threshold);
|
||||
MAKE_PROPERTY(angular_sleep_threshold, get_angular_sleep_threshold, set_angular_sleep_threshold);
|
||||
MAKE_PROPERTY(gravity, get_gravity, set_gravity);
|
||||
MAKE_PROPERTY(linear_factor, get_linear_factor, set_linear_factor);
|
||||
MAKE_PROPERTY(angular_factor, get_angular_factor, set_angular_factor);
|
||||
|
||||
public:
|
||||
virtual btCollisionObject *get_object() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,13 @@ PUBLISHED:
|
|||
INLINE PN_stdfloat get_current_position() const;
|
||||
INLINE PN_stdfloat get_accumulated_impulse() const;
|
||||
|
||||
MAKE_PROPERTY(limited, is_limited);
|
||||
MAKE_PROPERTY(motor_enabled, get_motor_enabled, set_motor_enabled);
|
||||
MAKE_PROPERTY(current_limit, get_current_limit);
|
||||
MAKE_PROPERTY(current_error, get_current_error);
|
||||
MAKE_PROPERTY(current_position, get_current_position);
|
||||
MAKE_PROPERTY(accumulated_impulse, get_accumulated_impulse);
|
||||
|
||||
public:
|
||||
BulletRotationalLimitMotor(btRotationalLimitMotor &motor);
|
||||
|
||||
|
|
|
|||
|
|
@ -45,10 +45,20 @@ PUBLISHED:
|
|||
PN_stdfloat get_margin() const;
|
||||
|
||||
BoundingSphere get_shape_bounds() const;
|
||||
|
||||
MAKE_PROPERTY(polyhedral, is_polyhedral);
|
||||
MAKE_PROPERTY(convex, is_convex);
|
||||
MAKE_PROPERTY(convex_2d, is_convex_2d);
|
||||
MAKE_PROPERTY(concave, is_concave);
|
||||
MAKE_PROPERTY(infinite, is_infinite);
|
||||
MAKE_PROPERTY(non_moving, is_non_moving);
|
||||
MAKE_PROPERTY(soft_body, is_soft_body);
|
||||
MAKE_PROPERTY(margin, get_margin, set_margin);
|
||||
MAKE_PROPERTY(name, get_name);
|
||||
MAKE_PROPERTY(shape_bounds, get_shape_bounds);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const = 0;
|
||||
|
||||
LVecBase3 get_local_scale() const;
|
||||
void set_local_scale(const LVecBase3 &scale);
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,21 @@ PUBLISHED:
|
|||
INLINE CPT(TransformState) get_frame_a() const;
|
||||
INLINE CPT(TransformState) get_frame_b() const;
|
||||
|
||||
MAKE_PROPERTY(linear_pos, get_linear_pos);
|
||||
MAKE_PROPERTY(angular_pos, get_angular_pos);
|
||||
MAKE_PROPERTY(lower_linear_limit, get_lower_linear_limit, set_lower_linear_limit);
|
||||
MAKE_PROPERTY(upper_linear_limit, get_upper_linear_limit, set_upper_linear_limit);
|
||||
MAKE_PROPERTY(lower_angular_limit, get_lower_angular_limit, set_lower_angular_limit);
|
||||
MAKE_PROPERTY(upper_angular_limit, get_upper_angular_limit, set_upper_angular_limit);
|
||||
MAKE_PROPERTY(powered_linear_motor, get_powered_linear_motor, set_powered_linear_motor);
|
||||
MAKE_PROPERTY(target_linear_motor_velocity, get_target_linear_motor_velocity, set_target_linear_motor_velocity);
|
||||
MAKE_PROPERTY(max_linear_motor_force, get_max_linear_motor_force, set_max_linear_motor_force);
|
||||
MAKE_PROPERTY(powered_angular_motor, get_powered_angular_motor, set_powered_angular_motor);
|
||||
MAKE_PROPERTY(target_angular_motor_velocity, get_target_angular_motor_velocity, set_target_angular_motor_velocity);
|
||||
MAKE_PROPERTY(max_angular_motor_force, get_max_angular_motor_force, set_max_angular_motor_force);
|
||||
MAKE_PROPERTY(frame_a, get_frame_a);
|
||||
MAKE_PROPERTY(frame_b, get_frame_b);
|
||||
|
||||
public:
|
||||
virtual btTypedConstraint *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ set_pressure_coefficient(PN_stdfloat value) {
|
|||
* Getter for property kVC.
|
||||
*/
|
||||
INLINE PN_stdfloat BulletSoftBodyConfig::
|
||||
get_volume_conversation_coefficient() const {
|
||||
get_volume_conservation_coefficient() const {
|
||||
|
||||
return (PN_stdfloat)_cfg.kVC;
|
||||
}
|
||||
|
|
@ -122,7 +122,7 @@ get_volume_conversation_coefficient() const {
|
|||
* Setter for property kVC.
|
||||
*/
|
||||
INLINE void BulletSoftBodyConfig::
|
||||
set_volume_conversation_coefficient(PN_stdfloat value) {
|
||||
set_volume_conservation_coefficient(PN_stdfloat value) {
|
||||
|
||||
_cfg.kVC = (btScalar)value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ PUBLISHED:
|
|||
INLINE void set_drag_coefficient(PN_stdfloat value);
|
||||
INLINE void set_lift_coefficient(PN_stdfloat value);
|
||||
INLINE void set_pressure_coefficient(PN_stdfloat value);
|
||||
INLINE void set_volume_conversation_coefficient(PN_stdfloat value);
|
||||
INLINE void set_volume_conservation_coefficient(PN_stdfloat value);
|
||||
INLINE void set_dynamic_friction_coefficient(PN_stdfloat value);
|
||||
INLINE void set_pose_matching_coefficient(PN_stdfloat value);
|
||||
INLINE void set_rigid_contacts_hardness(PN_stdfloat value);
|
||||
|
|
@ -81,7 +81,7 @@ PUBLISHED:
|
|||
INLINE PN_stdfloat get_drag_coefficient() const;
|
||||
INLINE PN_stdfloat get_lift_coefficient() const;
|
||||
INLINE PN_stdfloat get_pressure_coefficient() const;
|
||||
INLINE PN_stdfloat get_volume_conversation_coefficient() const;
|
||||
INLINE PN_stdfloat get_volume_conservation_coefficient() const;
|
||||
INLINE PN_stdfloat get_dynamic_friction_coefficient() const;
|
||||
INLINE PN_stdfloat get_pose_matching_coefficient() const;
|
||||
INLINE PN_stdfloat get_rigid_contacts_hardness() const;
|
||||
|
|
@ -101,6 +101,32 @@ PUBLISHED:
|
|||
INLINE int get_drift_solver_iterations() const;
|
||||
INLINE int get_cluster_solver_iterations() const;
|
||||
|
||||
MAKE_PROPERTY(aero_model, get_aero_model, set_aero_model);
|
||||
MAKE_PROPERTY(velocities_correction_factor, get_velocities_correction_factor, set_velocities_correction_factor);
|
||||
MAKE_PROPERTY(damping_coefficient, get_damping_coefficient, set_damping_coefficient);
|
||||
MAKE_PROPERTY(drag_coefficient, get_drag_coefficient, set_drag_coefficient);
|
||||
MAKE_PROPERTY(lift_coefficient, get_lift_coefficient, set_lift_coefficient);
|
||||
MAKE_PROPERTY(pressure_coefficient, get_pressure_coefficient, set_pressure_coefficient);
|
||||
MAKE_PROPERTY(volume_conservation_coefficient, get_volume_conservation_coefficient, set_volume_conservation_coefficient);
|
||||
MAKE_PROPERTY(dynamic_friction_coefficient, get_dynamic_friction_coefficient, set_dynamic_friction_coefficient);
|
||||
MAKE_PROPERTY(pose_matching_coefficient, get_pose_matching_coefficient, set_pose_matching_coefficient);
|
||||
MAKE_PROPERTY(rigid_contacts_hardness, get_rigid_contacts_hardness, set_rigid_contacts_hardness);
|
||||
MAKE_PROPERTY(kinetic_contacts_hardness, get_kinetic_contacts_hardness, set_kinetic_contacts_hardness);
|
||||
MAKE_PROPERTY(soft_contacts_hardness, get_soft_contacts_hardness, set_soft_contacts_hardness);
|
||||
MAKE_PROPERTY(anchors_hardness, get_anchors_hardness, set_anchors_hardness);
|
||||
MAKE_PROPERTY(soft_vs_rigid_hardness, get_soft_vs_rigid_hardness, set_soft_vs_rigid_hardness);
|
||||
MAKE_PROPERTY(soft_vs_kinetic_hardness, get_soft_vs_kinetic_hardness, set_soft_vs_kinetic_hardness);
|
||||
MAKE_PROPERTY(soft_vs_soft_hardness, get_soft_vs_soft_hardness, set_soft_vs_soft_hardness);
|
||||
MAKE_PROPERTY(soft_vs_rigid_impulse_split, get_soft_vs_rigid_impulse_split, set_soft_vs_rigid_impulse_split);
|
||||
MAKE_PROPERTY(soft_vs_kinetic_impulse_split, get_soft_vs_kinetic_impulse_split, set_soft_vs_kinetic_impulse_split);
|
||||
MAKE_PROPERTY(soft_vs_soft_impulse_split, get_soft_vs_soft_impulse_split, set_soft_vs_soft_impulse_split);
|
||||
MAKE_PROPERTY(maxvolume, get_maxvolume, set_maxvolume);
|
||||
MAKE_PROPERTY(timescale, get_timescale, set_timescale);
|
||||
MAKE_PROPERTY(positions_solver_iterations, get_positions_solver_iterations, set_positions_solver_iterations);
|
||||
MAKE_PROPERTY(velocities_solver_iterations, get_velocities_solver_iterations, set_velocities_solver_iterations);
|
||||
MAKE_PROPERTY(drift_solver_iterations, get_drift_solver_iterations, set_drift_solver_iterations);
|
||||
MAKE_PROPERTY(cluster_solver_iterations, get_cluster_solver_iterations, set_cluster_solver_iterations);
|
||||
|
||||
public:
|
||||
BulletSoftBodyConfig(btSoftBody::Config &cfg);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,16 +27,17 @@ PUBLISHED:
|
|||
INLINE ~BulletSoftBodyMaterial();
|
||||
INLINE static BulletSoftBodyMaterial empty();
|
||||
|
||||
INLINE void set_linear_stiffness(PN_stdfloat value);
|
||||
INLINE PN_stdfloat get_linear_stiffness() const;
|
||||
MAKE_PROPERTY(linear_stiffness, get_linear_stiffness, set_linear_stiffness);
|
||||
INLINE void set_linear_stiffness(PN_stdfloat value);
|
||||
|
||||
INLINE void set_angular_stiffness(PN_stdfloat value);
|
||||
INLINE PN_stdfloat get_angular_stiffness() const;
|
||||
MAKE_PROPERTY(angular_stiffness, get_angular_stiffness, set_angular_stiffness);
|
||||
INLINE void set_angular_stiffness(PN_stdfloat value);
|
||||
|
||||
INLINE void set_volume_preservation(PN_stdfloat value);
|
||||
INLINE PN_stdfloat get_volume_preservation() const;
|
||||
INLINE void set_volume_preservation(PN_stdfloat value);
|
||||
|
||||
MAKE_PROPERTY(linear_stiffness, get_linear_stiffness, set_linear_stiffness);
|
||||
MAKE_PROPERTY(angular_stiffness, get_angular_stiffness, set_angular_stiffness);
|
||||
MAKE_PROPERTY(volume_preservation, get_volume_preservation, set_volume_preservation);
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -50,6 +50,13 @@ PUBLISHED:
|
|||
INLINE PN_stdfloat get_area() const;
|
||||
INLINE int is_attached() const;
|
||||
|
||||
MAKE_PROPERTY(pos, get_pos);
|
||||
MAKE_PROPERTY(velocity, get_velocity);
|
||||
MAKE_PROPERTY(normal, get_normal);
|
||||
MAKE_PROPERTY(inv_mass, get_inv_mass);
|
||||
MAKE_PROPERTY(area, get_area);
|
||||
MAKE_PROPERTY(attached, is_attached);
|
||||
|
||||
public:
|
||||
BulletSoftBodyNodeElement(btSoftBody::Node &node);
|
||||
|
||||
|
|
@ -203,6 +210,14 @@ PUBLISHED:
|
|||
const char *face,
|
||||
const char *node);
|
||||
|
||||
MAKE_PROPERTY(cfg, get_cfg);
|
||||
MAKE_PROPERTY(world_info, get_world_info);
|
||||
MAKE_PROPERTY(wind_velocity, get_wind_velocity, set_wind_velocity);
|
||||
MAKE_PROPERTY(aabb, get_aabb);
|
||||
MAKE_PROPERTY(num_clusters, get_num_clusters);
|
||||
MAKE_SEQ_PROPERTY(materials, get_num_materials, get_material);
|
||||
MAKE_SEQ_PROPERTY(nodes, get_num_nodes, get_node);
|
||||
|
||||
public:
|
||||
virtual btCollisionObject *get_object() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ PUBLISHED:
|
|||
|
||||
BulletSoftBodyNode *get_body() const;
|
||||
|
||||
MAKE_PROPERTY(body, get_body);
|
||||
|
||||
public:
|
||||
BulletSoftBodyShape(btSoftBodyCollisionShape *shapePtr);
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ PUBLISHED:
|
|||
|
||||
void garbage_collect(int lifetime=256);
|
||||
|
||||
MAKE_PROPERTY(air_density, get_air_density, set_air_density);
|
||||
MAKE_PROPERTY(water_density, get_water_density, set_water_density);
|
||||
MAKE_PROPERTY(water_offset, get_water_offset, set_water_offset);
|
||||
MAKE_PROPERTY(water_normal, get_water_normal, set_water_normal);
|
||||
MAKE_PROPERTY(gravity, get_gravity, set_gravity);
|
||||
|
||||
public:
|
||||
BulletSoftBodyWorldInfo(btSoftBodyWorldInfo &_info);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ PUBLISHED:
|
|||
|
||||
static BulletSphereShape *make_from_solid(const CollisionSphere *solid);
|
||||
|
||||
MAKE_PROPERTY(radius, get_radius);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ PUBLISHED:
|
|||
LPoint3 get_pivot_in_a() const;
|
||||
LPoint3 get_pivot_in_b() const;
|
||||
|
||||
MAKE_PROPERTY(pivot_a, get_pivot_in_a, set_pivot_a);
|
||||
MAKE_PROPERTY(pivot_b, get_pivot_in_b, set_pivot_b);
|
||||
|
||||
public:
|
||||
virtual btTypedConstraint *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ PUBLISHED:
|
|||
|
||||
INLINE PN_stdfloat get_timestep() const;
|
||||
|
||||
MAKE_PROPERTY(timestep, get_timestep);
|
||||
|
||||
private:
|
||||
btScalar _timestep;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ PUBLISHED:
|
|||
|
||||
INLINE void set_motor_enabled(int axis, bool enable);
|
||||
INLINE void set_low_limit(const LVecBase3 &limit);
|
||||
INLINE void set_high_limit(const LVecBase3 & limit);
|
||||
INLINE void set_target_velocity(const LVecBase3&velocity);
|
||||
INLINE void set_high_limit(const LVecBase3 &limit);
|
||||
INLINE void set_target_velocity(const LVecBase3 &velocity);
|
||||
INLINE void set_max_motor_force(const LVecBase3 &force);
|
||||
INLINE void set_damping(PN_stdfloat damping);
|
||||
INLINE void set_softness(PN_stdfloat softness);
|
||||
|
|
@ -49,6 +49,10 @@ PUBLISHED:
|
|||
INLINE LPoint3 get_current_diff() const;
|
||||
INLINE LVector3 get_accumulated_impulse() const;
|
||||
|
||||
MAKE_PROPERTY(current_error, get_current_error);
|
||||
MAKE_PROPERTY(current_diff, get_current_diff);
|
||||
MAKE_PROPERTY(accumulated_impulse, get_accumulated_impulse);
|
||||
|
||||
public:
|
||||
BulletTranslationalLimitMotor(btTranslationalLimitMotor &motor);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@ PUBLISHED:
|
|||
virtual void output(ostream &out) const;
|
||||
virtual void write(ostream &out, int indent_level) const;
|
||||
|
||||
MAKE_PROPERTY(num_triangles, get_num_triangles);
|
||||
MAKE_PROPERTY(welding_distance, get_welding_distance, set_welding_distance);
|
||||
|
||||
public:
|
||||
INLINE btTriangleMesh *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ PUBLISHED:
|
|||
INLINE bool is_static() const;
|
||||
INLINE bool is_dynamic() const;
|
||||
|
||||
MAKE_PROPERTY(static, is_static);
|
||||
MAKE_PROPERTY(dynamic, is_dynamic);
|
||||
|
||||
public:
|
||||
virtual btCollisionShape *ptr() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,13 @@ PUBLISHED:
|
|||
INLINE PN_stdfloat get_friction_slip() const;
|
||||
INLINE PN_stdfloat get_max_suspension_force() const;
|
||||
|
||||
MAKE_PROPERTY(suspension_stiffness, get_suspension_stiffness, set_suspension_stiffness);
|
||||
MAKE_PROPERTY(suspension_compression, get_suspension_compression, set_suspension_compression);
|
||||
MAKE_PROPERTY(suspension_damping, get_suspension_damping, set_suspension_damping);
|
||||
MAKE_PROPERTY(max_suspension_travel_cm, get_max_suspension_travel_cm, set_max_suspension_travel_cm);
|
||||
MAKE_PROPERTY(friction_slip, get_friction_slip, set_friction_slip);
|
||||
MAKE_PROPERTY(max_suspension_force, get_max_suspension_force, set_max_suspension_force);
|
||||
|
||||
private:
|
||||
btRaycastVehicle::btVehicleTuning _;
|
||||
|
||||
|
|
@ -87,6 +94,12 @@ PUBLISHED:
|
|||
// Tuning
|
||||
INLINE BulletVehicleTuning &get_tuning();
|
||||
|
||||
MAKE_PROPERTY(chassis, get_chassis);
|
||||
MAKE_PROPERTY(current_speed_km_hour, get_current_speed_km_hour);
|
||||
MAKE_PROPERTY(forward_vector, get_forward_vector);
|
||||
MAKE_SEQ_PROPERTY(wheels, get_num_wheels, get_wheel);
|
||||
MAKE_PROPERTY(tuning, get_tuning);
|
||||
|
||||
public:
|
||||
INLINE btRaycastVehicle *get_vehicle() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,15 @@ PUBLISHED:
|
|||
INLINE LPoint3 get_hard_point_ws() const;
|
||||
INLINE PandaNode *get_ground_object() const;
|
||||
|
||||
MAKE_PROPERTY(in_contact, is_in_contact);
|
||||
MAKE_PROPERTY(suspension_length, get_suspension_length);
|
||||
MAKE_PROPERTY(contact_normal_ws, get_contact_normal_ws);
|
||||
MAKE_PROPERTY(wheel_direction_ws, get_wheel_direction_ws);
|
||||
MAKE_PROPERTY(wheel_axle_ws, get_wheel_axle_ws);
|
||||
MAKE_PROPERTY(contact_point_ws, get_contact_point_ws);
|
||||
MAKE_PROPERTY(hard_point_ws, get_hard_point_ws);
|
||||
MAKE_PROPERTY(ground_object, get_ground_object);
|
||||
|
||||
public:
|
||||
BulletWheelRaycastInfo(btWheelInfo::RaycastInfo &info);
|
||||
|
||||
|
|
@ -105,6 +114,32 @@ PUBLISHED:
|
|||
PandaNode *get_node() const;
|
||||
BulletWheelRaycastInfo get_raycast_info() const;
|
||||
|
||||
MAKE_PROPERTY(raycast_info, get_raycast_info);
|
||||
MAKE_PROPERTY(suspension_rest_length, get_suspension_rest_length);
|
||||
MAKE_PROPERTY(suspension_stiffness, get_suspension_stiffness, set_suspension_stiffness);
|
||||
MAKE_PROPERTY(max_suspension_travel_cm, get_max_suspension_travel_cm, set_max_suspension_travel_cm);
|
||||
MAKE_PROPERTY(friction_slip, get_friction_slip, set_friction_slip);
|
||||
MAKE_PROPERTY(max_suspension_force, get_max_suspension_force, set_max_suspension_force);
|
||||
MAKE_PROPERTY(wheels_damping_compression, get_wheels_damping_compression, set_wheels_damping_compression);
|
||||
MAKE_PROPERTY(wheels_damping_relaxation, get_wheels_damping_relaxation, set_wheels_damping_relaxation);
|
||||
MAKE_PROPERTY(roll_influence, get_roll_influence, set_roll_influence);
|
||||
MAKE_PROPERTY(wheel_radius, get_wheel_radius, set_wheel_radius);
|
||||
MAKE_PROPERTY(steering, get_steering, set_steering);
|
||||
MAKE_PROPERTY(rotation, get_rotation, set_rotation);
|
||||
MAKE_PROPERTY(delta_rotation, get_delta_rotation, set_delta_rotation);
|
||||
MAKE_PROPERTY(engine_force, get_engine_force, set_engine_force);
|
||||
MAKE_PROPERTY(brake, get_brake, set_brake);
|
||||
MAKE_PROPERTY(skid_info, get_skid_info, set_skid_info);
|
||||
MAKE_PROPERTY(wheels_suspension_force, get_wheels_suspension_force, set_wheels_suspension_force);
|
||||
MAKE_PROPERTY(suspension_relative_velocity, get_suspension_relative_velocity, set_suspension_relative_velocity);
|
||||
MAKE_PROPERTY(clipped_inv_connection_point_cs, get_clipped_inv_connection_point_cs, set_clipped_inv_connection_point_cs);
|
||||
MAKE_PROPERTY(chassis_connection_point_cs, get_chassis_connection_point_cs, set_chassis_connection_point_cs);
|
||||
MAKE_PROPERTY(wheel_direction_cs, get_wheel_direction_cs, set_wheel_direction_cs);
|
||||
MAKE_PROPERTY(wheel_axle_cs, get_wheel_axle_cs, set_wheel_axle_cs);
|
||||
MAKE_PROPERTY(world_transform, get_world_transform, set_world_transform);
|
||||
MAKE_PROPERTY(front_wheel, is_front_wheel, set_front_wheel);
|
||||
MAKE_PROPERTY(node, get_node, set_node);
|
||||
|
||||
public:
|
||||
BulletWheel(btWheelInfo &info);
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,15 @@ get_debug_node() const {
|
|||
return _debug;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE bool BulletWorld::
|
||||
has_debug_node() const {
|
||||
|
||||
return _debug != NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ PUBLISHED:
|
|||
INLINE void set_debug_node(BulletDebugNode *node);
|
||||
INLINE void clear_debug_node();
|
||||
INLINE BulletDebugNode *get_debug_node() const;
|
||||
INLINE bool has_debug_node() const;
|
||||
|
||||
// AttachRemove
|
||||
void attach(TypedObject *object);
|
||||
|
|
@ -159,6 +160,17 @@ PUBLISHED:
|
|||
FA_callback,
|
||||
};
|
||||
|
||||
MAKE_PROPERTY(gravity, get_gravity, set_gravity);
|
||||
MAKE_PROPERTY(world_info, get_world_info);
|
||||
MAKE_PROPERTY2(debug_node, has_debug_node, get_debug_node, set_debug_node, clear_debug_node);
|
||||
MAKE_SEQ_PROPERTY(ghosts, get_num_ghosts, get_ghost);
|
||||
MAKE_SEQ_PROPERTY(rigid_bodies, get_num_rigid_bodies, get_rigid_body);
|
||||
MAKE_SEQ_PROPERTY(soft_bodies, get_num_soft_bodies, get_soft_body);
|
||||
MAKE_SEQ_PROPERTY(characters, get_num_characters, get_character);
|
||||
MAKE_SEQ_PROPERTY(vehicles, get_num_vehicles, get_vehicle);
|
||||
MAKE_SEQ_PROPERTY(constraints, get_num_constraints, get_constraint);
|
||||
MAKE_SEQ_PROPERTY(manifolds, get_num_manifolds, get_manifold);
|
||||
|
||||
PUBLISHED: // Deprecated methods, will become private soon
|
||||
void attach_ghost(BulletGhostNode *node);
|
||||
void remove_ghost(BulletGhostNode *node);
|
||||
|
|
|
|||
Loading…
Reference in New Issue