Home | All Classes | Grouped Classes | Index | Search

Class CL_CollisionOutline

Collision detection outline. More...

Derived from: none
Derived by: none
Group: Display (Collision)

#include <ClanLib/display.h>

Construction:

CL_CollisionOutline

Construct a collision outline.

Attributes:

get_object_bounding_box

Returns the contour used as an object bounding box. (an rotated rectangle)

get_radius

Returns the radius of the outline.

get_obb_test

Returns true if object bounding box test is used.

get_inside_test

Returns true if completely-inside test is used.

get_contours

Returns the contours in the outline.

get_translation

Returns the position of the outline.

get_scale

Returns the scaling factor.

get_angle

Returns the rotation angle.

get_width

Returns the width of the image this outline was created from.

get_height

Returns the height of the image this outline was created from.

get_alignment

Get the translation origin and hotspot of the outline.

get_rotation_hotspot

Get the rotation hotspot of the outline.

get_collision_points

Return the points of collision found in the last collision test.

get_collision_normals

Return the normal vectors of the other outline, at the points of collision.

Operations:

optimize

Optimize the outline by removing redundant points.

set_alignment

Set the translation hotspot of the outline.

set_rotation_hotspot

Set the rotation hotspot of the outline.

set_translation

Set the position of the outline.

set_scale

Set the scale of the outline.

set_angle

Set the angle (in degrees) of the outline.

rotate

Rotate the outline by angle (in degrees).

set_obb_test

Set to true if obb test should be done

set_inside_test

Set to true if completely-inside test should be done

enable_collision_info

Enable collision info gathering.

enable_collision_info_normals

Enable collision info about normals. Only works when collision_info is also enabled.

calculate_radius

(Re)calculate the radius of the outline.

calculate_sub_circles

(Re)calculate the subcircle segmentation of the outline.

save

Write the outline to a file.

collide

Returns true if outlines overlap

point_inside

Returns true if a point is inside the outline.

Detailed description:

!group=Display/Collision ! !header=display.h!

A collision outline is used in collision detection



Questions or comments, write to the
ClanLib mailing list.