Maarten Baert's website

Game Maker / C++ projects

Home Model Creator ExtremePhysics Game Maker DLLs   Recent comments Search

Last modified: Sun, 27 Mar 2011
Refresh

Slider joint


ep_sliderjoint_create

ep_sliderjoint_create(world_id, body1_id, body2_id, x1, y1, x2a, y2a, x2b, y2b, rotation)

Creates a new slider joint.

Returns the id of the new slider joint.

  • world_id: The id of the world.

  • body1_id: The id of the first body.

  • body2_id: The id of the second body.

  • x1: The x component of the anchor point on the first body.

  • y1: The y component of the anchor point on the first body.

  • x2a: The x component of the starting point of the rail on the second body.

  • y2a: The y component of the starting point of the rail on the second body.

  • x2b: The x component of the endpoint of the rail on the second body.

  • y2b: The y component of the endpoint of the rail on the second body.

  • rotation: The relative rotation of the bodies (rot1-rot2).


ep_sliderjoint_destroy

ep_sliderjoint_destroy(world_id, sliderjoint_id)

Destroys the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_exists

ep_sliderjoint_exists(world_id, sliderjoint_id)

Returns whether the slider joint with the given id exists.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_set_max_combined_force

ep_sliderjoint_set_max_combined_force(world_id, sliderjoint_id, maxnormalforce, torqueradius)

Changes the maximum combined force of the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • maxnormalforce: The new maximum normal force. Use 0 for no limit.

  • torqueradius: Indicates how the torque relates to the normal force (force = torque/radius). Use 0 for unlimited torque.


ep_sliderjoint_set_motor

ep_sliderjoint_set_motor(world_id, sliderjoint_id, maxmotorforce, motorvel)

Changes the motor of the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • maxmotorforce: The maximum motor force.

  • motorvel: The velocity of the motor.


ep_sliderjoint_set_limit_settings

ep_sliderjoint_set_limit_settings(world_id, sliderjoint_id, contact_threshold, velocity_threshold)

Changes the limit settings of the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • contact_threshold: The contact threshold.

  • velocity_threshold: The velocity threshold.


ep_sliderjoint_set_lower_limit

ep_sliderjoint_set_lower_limit(world_id, sliderjoint_id, maxlimitforce, position, restitution, velocity)

Changes the lower limit of the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • maxlimitforce: The maximum limit force. Set this to 0 to disable the limit.

  • position: The position of the limit.

  • restitution: The coefficient of restitution.

  • velocity: The velocity of the limit. You can use this to change the position over time. The position will not be updated automatically, you have to do that yourself.


ep_sliderjoint_set_upper_limit

ep_sliderjoint_set_upper_limit(world_id, sliderjoint_id, maxlimitforce, position, restitution, velocity)

Changes the upper limit of the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • maxlimitforce: The maximum limit force. Set this to 0 to disable the limit.

  • position: The position of the limit.

  • restitution: The coefficient of restitution.

  • velocity: The velocity of the limit. You can use this to change the position over time. The position will not be updated automatically, you have to do that yourself.


ep_sliderjoint_set_lower_spring

ep_sliderjoint_set_lower_spring(world_id, sliderjoint_id, k, position, damping)

Changes the lower spring of the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • k: The spring constant. Set this to 0 to disable the spring.

  • position: The position of the spring.

  • damping: The damping force of the spring. Set this to 0 to disable damping (not recommended).


ep_sliderjoint_set_upper_spring

ep_sliderjoint_set_upper_spring(world_id, sliderjoint_id, k, position, damping)

Changes the upper spring of the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • k: The spring constant. Set this to 0 to disable the spring.

  • position: The position of the spring.

  • damping: The damping force of the spring. Set this to 0 to disable damping (not recommended).


ep_sliderjoint_get_body1

ep_sliderjoint_get_body1(world_id, sliderjoint_id)

Returns the id of the first body connected to the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_get_body2

ep_sliderjoint_get_body2(world_id, sliderjoint_id)

Returns the id of the second body connected to the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_get_position

ep_sliderjoint_get_position(world_id, sliderjoint_id)

Returns the current position of the slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_get_normal_force

ep_sliderjoint_get_normal_force(world_id, sliderjoint_id)

Returns the normal force applied during the last step.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_get_torque

ep_sliderjoint_get_torque(world_id, sliderjoint_id)

Returns the torque applied during the last step.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_get_combined_force

ep_sliderjoint_get_combined_force(world_id, sliderjoint_id)

Returns the combined force applied during the last step (abs(normalforce)+abs(torque)/torqueradius).

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_get_motor_force

ep_sliderjoint_get_motor_force(world_id, sliderjoint_id)

Returns the motor force applied during the last step.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_get_limit_force

ep_sliderjoint_get_limit_force(world_id, sliderjoint_id)

Returns the limit force applied during the last step.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_previous

ep_sliderjoint_previous(world_id, sliderjoint_id)

Returns the id of the previous slider joint, or 0 if there is no previous slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_next

ep_sliderjoint_next(world_id, sliderjoint_id)

Returns the id of the next slider joint, or 0 if there is no next slider joint.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.


ep_sliderjoint_set_uservar

ep_sliderjoint_set_uservar(world_id, sliderjoint_id, index, value)

Changes the value of the user variable with the given index.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • index: The index (0-4).

  • value: The new value.


ep_sliderjoint_get_uservar

ep_sliderjoint_get_uservar(world_id, sliderjoint_id, index)

Returns the value of the user variable with the given index.

  • world_id: The id of the world.

  • sliderjoint_id: The id of the slider joint.

  • index: The index (0-4).


Comments

There are no comments yet.

Write a comment