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_minimum_enclosing_disc

Returns the radius of the outline.

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_info

Return the info about the collisions. (collision points, normals, pointers to contours, and indexes to lines that intersected)

get_collision_info_state

Fetch the state of the collision testing variables.

resource

Resource owning this outline, if any.

Operations:

operator =

Assignment operator

optimize

Optimize the outline by removing redundant points.

draw

Draw outline on graphic context.

draw_sub_circles

Draw the subcircles surrounding the linesegments on graphic context.

draw_smallest_enclosing_disc

Draw the disc enclosing the entire outline.

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_inside_test

Set to true if completely-inside test should be done

enable_collision_info

Enable collision info gathering.

set_collision_info

This will set the collision info of the outline

clean_collision_info

This will empty the collision-info vector

calculate_radius

(Re)calculate the radius of the outline.

calculate_sub_circles

(Re)calculate the subcircle segmentation of the outline.

calculate_smallest_enclosing_discs

(Re)calculate the smallest circles enclosing every contour in the outline.

calculate_convex_hulls

(Re)calculate the convex hull for every contour in the outline

save

Write the outline to a file.

collide

Returns true if outlines overlap

calculate_penetration_depth

Will calculate the penetration_depth and penetration_normal for all colliding contours.

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.