Maarten Baert's website

Game Maker / C++ projects

Home Model Creator ExtremePhysics Game Maker DLLs SimpleScreenRecorder AlterPCB Quadcopters   Recent comments Search

Last modified: Thu, 23 Sep 2010
Refresh

Main


ep_version

ep_version()

Returns the version number as a string (e.g. "1.2.34").


ep_set_log_file

ep_set_log_file(enable, filename, level)

Changes the log file.

  • enable: Whether to enable logging.

  • filename: The filename of the log file.

  • level: The maximum level of log messages:

    • 0 - Nothing (except messages sent by ep_message or ep_print_object_tree).

    • 1 - Errors only.

    • 2 - Errors and important changes.

    • 3 - Errors and all changes.


ep_set_show_errors

ep_set_show_errors(enable)

Enables or disables error messages.

  • enable: Whether to enable error messages.


ep_message

ep_message(level, string)

Send an ExtremePhysics message. The message is logged if the logging level is high enough, and an error message is shown for errors.

  • level: The level of the message.

    • 0 - Explicit (always shown)

    • 1 - Error

    • 2 - Important change

    • 3 - Normal change

  • string: The message string.


ep_print_object_tree

ep_print_object_tree()

Writes a list of all ExtremePhysics resources to the log file.


ep_collision_test_box_box

ep_collision_test_box_box(shape1_w, shape1_h, shape1_x, shape1_y, shape1_rot, shape2_w, shape2_h, shape2_x, shape2_y, shape2_rot, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_w: The width of the box (first shape).

  • shape1_h: The height of the box (first shape).

  • shape1_x: The x coordinate of the box (first shape).

  • shape1_y: The y coordinate of the box (first shape).

  • shape1_rot: The rotation of the box (first shape).

  • shape2_w: The width of the box (second shape).

  • shape2_h: The height of the box (second shape).

  • shape2_x: The x coordinate of the box (second shape).

  • shape2_y: The y coordinate of the box (second shape).

  • shape2_rot: The rotation of the box (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_box_line

ep_collision_test_box_line(shape1_w, shape1_h, shape1_x, shape1_y, shape1_rot, shape2_x1, shape2_y1, shape2_x2, shape2_y2, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_w: The width of the box (first shape).

  • shape1_h: The height of the box (first shape).

  • shape1_x: The x coordinate of the box (first shape).

  • shape1_y: The y coordinate of the box (first shape).

  • shape1_rot: The rotation of the box (first shape).

  • shape2_x1: The x coordinate of the first point of the line (second shape).

  • shape2_y1: The y coordinate of the first point of the line (second shape).

  • shape2_x2: The x coordinate of the second point of the line (second shape).

  • shape2_y2: The y coordinate of the second point of the line (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_box_circle

ep_collision_test_box_circle(shape1_w, shape1_h, shape1_x, shape1_y, shape1_rot, shape2_r, shape2_x, shape2_y, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_w: The width of the box (first shape).

  • shape1_h: The height of the box (first shape).

  • shape1_x: The x coordinate of the box (first shape).

  • shape1_y: The y coordinate of the box (first shape).

  • shape1_rot: The rotation of the box (first shape).

  • shape2_r: The radius of the circle (second shape).

  • shape2_x: The x coordinate of the circle (second shape).

  • shape2_y: The y coordinate of the circle (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_box_polygon

ep_collision_test_box_polygon(shape1_w, shape1_h, shape1_x, shape1_y, shape1_rot, shape2_world_id, shape2_polygon_id, shape2_x, shape2_y, shape2_rot, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_w: The width of the box (first shape).

  • shape1_h: The height of the box (first shape).

  • shape1_x: The x coordinate of the box (first shape).

  • shape1_y: The y coordinate of the box (first shape).

  • shape1_rot: The rotation of the box (first shape).

  • shape2_world_id: The id of the world of the polygon (second shape).

  • shape2_polygon_id: The id the polygon (second shape).

  • shape2_x: The x coordinate of the polygon (second shape).

  • shape2_y: The y coordinate of the polygon (second shape).

  • shape2_rot: The rotation of the polygon (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_line_line

ep_collision_test_line_line(shape1_x1, shape1_y1, shape1_x2, shape1_y2, shape2_x1, shape2_y1, shape2_x2, shape2_y2, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_x1: The x coordinate of the first point of the line (first shape).

  • shape1_y1: The y coordinate of the first point of the line (first shape).

  • shape1_x2: The x coordinate of the second point of the line (first shape).

  • shape1_y2: The y coordinate of the second point of the line (first shape).

  • shape2_x1: The x coordinate of the first point of the line (second shape).

  • shape2_y1: The y coordinate of the first point of the line (second shape).

  • shape2_x2: The x coordinate of the second point of the line (second shape).

  • shape2_y2: The y coordinate of the second point of the line (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_line_circle

ep_collision_test_line_circle(shape1_x1, shape1_y1, shape1_x2, shape1_y2, shape2_r, shape2_x, shape2_y, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_x1: The x coordinate of the first point of the line (first shape).

  • shape1_y1: The y coordinate of the first point of the line (first shape).

  • shape1_x2: The x coordinate of the second point of the line (first shape).

  • shape1_y2: The y coordinate of the second point of the line (first shape).

  • shape2_r: The radius of the circle (second shape).

  • shape2_x: The x coordinate of the circle (second shape).

  • shape2_y: The y coordinate of the circle (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_line_polygon

ep_collision_test_line_polygon(shape1_x1, shape1_y1, shape1_x2, shape1_y2, shape2_world_id, shape2_polygon_id, shape2_x, shape2_y, shape2_rot, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_x1: The x coordinate of the first point of the line (first shape).

  • shape1_y1: The y coordinate of the first point of the line (first shape).

  • shape1_x2: The x coordinate of the second point of the line (first shape).

  • shape1_y2: The y coordinate of the second point of the line (first shape).

  • shape2_world_id: The id of the world of the polygon (second shape).

  • shape2_polygon_id: The id the polygon (second shape).

  • shape2_x: The x coordinate of the polygon (second shape).

  • shape2_y: The y coordinate of the polygon (second shape).

  • shape2_rot: The rotation of the polygon (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_circle_circle

ep_collision_test_circle_circle(shape1_r, shape1_x, shape1_y, shape2_r, shape2_x, shape2_y, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_r: The radius of the circle (first shape).

  • shape1_x: The x coordinate of the circle (first shape).

  • shape1_y: The y coordinate of the circle (first shape).

  • shape2_r: The radius of the circle (second shape).

  • shape2_x: The x coordinate of the circle (second shape).

  • shape2_y: The y coordinate of the circle (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_circle_polygon

ep_collision_test_circle_polygon(shape1_r, shape1_x, shape1_y, shape2_world_id, shape2_polygon_id, shape2_x, shape2_y, shape2_rot, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_r: The radius of the circle (first shape).

  • shape1_x: The x coordinate of the circle (first shape).

  • shape1_y: The y coordinate of the circle (first shape).

  • shape2_world_id: The id of the world of the polygon (second shape).

  • shape2_polygon_id: The id the polygon (second shape).

  • shape2_x: The x coordinate of the polygon (second shape).

  • shape2_y: The y coordinate of the polygon (second shape).

  • shape2_rot: The rotation of the polygon (second shape).

  • contact_threshold: The contact threshold.


ep_collision_test_polygon_polygon

ep_collision_test_polygon_polygon(shape1_world_id, shape1_polygon_id, shape1_x, shape1_y, shape1_rot, shape2_world_id, shape2_polygon_id, shape2_x, shape2_y, shape2_rot, contact_threshold)

Returns whether two 'virtual' shapes collide.

  • shape1_world_id: The id of the world of the polygon (first shape).

  • shape1_polygon_id: The id the polygon (first shape).

  • shape1_x: The x coordinate of the polygon (first shape).

  • shape1_y: The y coordinate of the polygon (first shape).

  • shape1_rot: The rotation of the polygon (first shape).

  • shape2_world_id: The id of the world of the polygon (second shape).

  • shape2_polygon_id: The id the polygon (second shape).

  • shape2_x: The x coordinate of the polygon (second shape).

  • shape2_y: The y coordinate of the polygon (second shape).

  • shape2_rot: The rotation of the polygon (second shape).

  • contact_threshold: The contact threshold.


ep_ray_cast_box

ep_ray_cast_box(ray_x, ray_y, ray_vx, ray_vy, shape_w, shape_h, shape_x, shape_y, shape_rot)

Calculates whether a 'virtual' ray intersects a 'virtual' shape.

Returns the distance to the point of intersection, or -1 if there is no intersection.

  • ray_x: The x coordinate of the starting point of the ray.

  • ray_y: The y coordinate of the starting point of the ray.

  • ray_vx: The x component of the direction vector of the ray.

  • ray_vy: The y component of the direction vector of the ray.

  • shape_w: The width of the box.

  • shape_h: The height of the box.

  • shape_x: The x coordinate of the box.

  • shape_y: The y coordinate of the box.

  • shape_rot: The rotation of the box.


ep_ray_cast_line

ep_ray_cast_line(ray_x, ray_y, ray_vx, ray_vy, shape_x1, shape_y1, shape_x2, shape_y2)

Calculates whether a 'virtual' ray intersects a 'virtual' shape.

Returns the distance to the point of intersection, or -1 if there is no intersection.

  • ray_x: The x coordinate of the starting point of the ray.

  • ray_y: The y coordinate of the starting point of the ray.

  • ray_vx: The x component of the direction vector of the ray.

  • ray_vy: The y component of the direction vector of the ray.

  • shape_x1: The x coordinate of the first point of the line.

  • shape_y1: The y coordinate of the first point of the line.

  • shape_x2: The x coordinate of the second point of the line.

  • shape_y2: The y coordinate of the second point of the line.


ep_ray_cast_circle

ep_ray_cast_circle(ray_x, ray_y, ray_vx, ray_vy, shape_r, shape_x, shape_y)

Calculates whether a 'virtual' ray intersects a 'virtual' shape.

Returns the distance to the point of intersection, or -1 if there is no intersection.

  • ray_x: The x coordinate of the starting point of the ray.

  • ray_y: The y coordinate of the starting point of the ray.

  • ray_vx: The x component of the direction vector of the ray.

  • ray_vy: The y component of the direction vector of the ray.

  • shape_r: The radius of the circle.

  • shape_x: The x coordinate of the circle.

  • shape_y: The y coordinate of the circle.


ep_ray_cast_polygon

ep_ray_cast_polygon(ray_x, ray_y, ray_vx, ray_vy, shape_world_id, shape_polygon_id, shape_x, shape_y, shape_rot)

Calculates whether a 'virtual' ray intersects a 'virtual' shape.

Returns the distance to the point of intersection, or -1 if there is no intersection.

  • ray_x: The x coordinate of the starting point of the ray.

  • ray_y: The y coordinate of the starting point of the ray.

  • ray_vx: The x component of the direction vector of the ray.

  • ray_vy: The y component of the direction vector of the ray.

  • shape_world_id: The id of the world of the polygon (second shape).

  • shape_polygon_id: The id the polygon.

  • shape_x: The x coordinate of the polygon.

  • shape_y: The y coordinate of the polygon.

  • shape_rot: The rotation of the polygon.


ep_first_world

ep_first_world()

Returns the id of the first world, or 0 if there are no worlds.


ep_last_world

ep_last_world()

Returns the id of the last world, or 0 if there are no worlds.


Comments

There are no comments yet.

Write a comment