$Date: 2005/10/23 16:34:13 $
$Revision: 1.18 $
-- Creates an empty Polygon
-- Creates a polygon from a list of vertexes and a center.
-- The vertexes are positioned relatively to the center
-- Creates a polygon from a list of vertexes and a center.
-- The vertexes are positioned absolutely (relatively to the (0,0))
-- Creates a polygon from an array of vertexes and a center.
-- The vertexes are positioned relatively to the center
-- creates a polygon from another one
-- (From EM_COLLIDABLE)
-- Creates an empty Polygon
-- Creates a polygon from an array of vertexes and a center.
-- The vertexes are positioned relatively to the center
-- Creates a polygon from a list of vertexes and a center.
-- The vertexes are positioned absolutely (relatively to the (0,0))
-- creates a polygon from another one
-- (From EM_COLLIDABLE)
-- Creates a polygon from a list of vertexes and a center.
-- The vertexes are positioned relatively to the center
-- angle in radian, in which the bounding volume is rotated (0 is default), in [0 2pi]
-- (From EM_COLLIDABLE)
-- Center of the collidable objects circumcircle, also known as the circumcenter
-- (From EM_COLLIDABLE)
-- the color of the collidable, if drawn
-- (From EM_COLLIDABLE)
-- returns an equivalent EM_POLYGON object
-- This option may be used, in order to know, who holds the collidable primitive
-- (From EM_COLLIDABLE)
-- true, if the object should be ignored from collision detection.
-- Please note, that this should only be used temporarily, if you don't want
-- to remove the object from the detector. If you wish not to use this
-- object anymore, please remove it from the detector.
-- (From EM_COLLIDABLE)
-- the center position since the last movement
-- (From EM_COLLIDABLE)
-- the logger object
-- (From EM_LOGGING)
-- Circumcircle radius of the collidable object, used for rough collision detection.
-- This is the maximal distance of any part of the object to center
-- (From EM_COLLIDABLE)
-- a orthogan rectangle for example is not rotatable
-- (From EM_COLLIDABLE)
-- a list of points of the current polygon, absolute positioning
-- a list of points of the current polygon, relatively positioned to the center
-- moves the object by an_x, a_y
-- (From EM_COLLIDABLE)
-- computes the radius and sets the value.
-- uses vertex_list_absolute and center to compute radius
-- (From EM_COLLIDABLE)
-- sets center, which also moves the whole object surrounding it
-- (From EM_COLLIDABLE)
-- sets center, does not move the surrounding polygon
-- sets if the polygon is rotatable
-- (From EM_COLLIDABLE)
-- sets center, which also moves the whole object surrounding it
-- (From EM_COLLIDABLE)
-- Draw Current to a_surface
-- The screen clipping is set with set_draw_clipping
-- (From EM_COLLIDABLE)
-- Rotates an object by a certain angle. positive means clockwise, because the y-axis of the screen is inverted!
-- rotates around center
-- (From EM_COLLIDABLE)
-- Rotates an object by a certain angle. positive means clockwise, because the y-axis of the screen is inverted!
-- rotates around a_center
-- (From EM_COLLIDABLE)
-- Rotates an object to a certain angle around the center.
-- the angle 0 is the angle in which the bounding volume was created and backed up
-- the backed up coordinates will always be used to generate the new ones, to
-- prevent deformation after a lot of rotations.
-- (From EM_COLLIDABLE)
-- Rotates an object to a certain angle around a_center.
-- the angle 0 is the angle in which the bounding volume was created and backed up
-- the backed up coordinates will always be used to generate the new ones, to
-- prevent deformation after a lot of rotations.
-- (From EM_COLLIDABLE)
-- also draws the circumcircle of the collidable
-- (From EM_COLLIDABLE)
-- This sets the clipping for the part to draw
-- The first argument is the top left corner of the screen.
-- for example if we want an object, that is situated at (5000, 1000), the
-- clipping should be moved to an appropriate position e.g. (4800, 800)
-- All objects outside of the clipping will not be displayed
-- (From EM_COLLIDABLE)
-- sets the color of the collidable, if draw is used
-- (From EM_COLLIDABLE)
-- sets if an item should be temporarily ignored for collision detection
-- (From EM_COLLIDABLE)
-- search of collisions in between steps.
-- Performance: O (2^d * collision_check_time)
-- returns if they ever collide and the first time of collision found.
-- (From EM_COLLIDABLE)
-- checks if two objects collide
-- (From EM_COLLIDABLE)
-- searches the first collision point of 2 collidables with search depth d.
-- returns a pair, if no collision was found, returns [false, 0]
-- otherwise true and the time at which the first collision happened, between 0 and 1
-- (From EM_COLLIDABLE)
-- returns the average collision point and tangential direction of the 2 collidable objects current and a_collidable
-- if no intersection points were found, returns Void
-- (From EM_COLLIDABLE)
-- area of the collidable in pixel^2
-- (From EM_COLLIDABLE)
-- returns the center of mass
-- (From EM_COLLIDABLE)
-- a fast approximation of the bounding ball for a point set
-- based on the algorithm given by [Jack Ritter, 1990]
-- and softSurfer (www.softsurfer.com)
-- checks if 2 collidables collided at time t
-- (From EM_COLLIDABLE)
-- returns an equivalent copy of the collidable (just the position and borders)
-- (From EM_COLLIDABLE)
-- returns an equivalent copy of the object as a EM_POLYGON_CONVEX_COLLIDABLE
-- computes the maximal distance to a certain position.
-- this is used to compute the radius of compositions of collidables
-- (From EM_COLLIDABLE)
-- the top left corner. for more details see set_draw_clipping
-- (From EM_COLLIDABLE)
-- recursive search for the first collision point (if any)
-- returns the time of the first collision (0 < time < 1)
-- returns 0, if no collision was found
-- (From EM_COLLIDABLE)
-- recursive search of collision points. This function is called by collides_with_depth
-- requires the collidables to collide at the end (b=1) as a precondition (not tested)
-- (From EM_COLLIDABLE)
-- true, if the circumcircle should be drawn
-- (From EM_COLLIDABLE)
-- color of the circumcircle
-- (From EM_COLLIDABLE)
-- true, if the collidable should be drawn filled
-- (From EM_COLLIDABLE)
-- turns a bounding area TO a certain angle. this will be called from rotate_to or rotate_by
-- (From EM_COLLIDABLE)
-- the zoom factor from the clipping point
-- (From EM_COLLIDABLE)
A convex polygonal bounding area for the collision detection.
The vertexes are saved with absolute positioning.
EM_POLYGON_CONVEX_COLLIDABLE is used by EM_POLYGON_COLLIDABLE, which is made of
convex polygons. You may use EM_POLYGON_CONVEX_COLLIDABLE directly, if the
polygon is convex. If so, upon generation the polygon will not have to be
decomposed, which of course takes some time.
If a vertex is modified from the outside, do not forget to call process_change,
which computes the new radius of the collidable.
The center should be placed in the center of the polygon. Badly placed centers will
not be moved by process_change (only the radius will be computed), it is the clients
responsibility to place the center adequately. However a function is provided which
computes the cifrumcircle of the polygon, called circumcircle, which returns center
and radius of the circumcircle.