Core API Reference: Shape Common

From Color Infection Wiki

Jump to: navigation, search


Contents


Clone shape

Copy the shape

Input Parameters:

The shape
The shape
Target Position X
The X position, where will moved the copy of shape
Target Position Y
The Y position, where will moved the copy of shape
Clone Brothers
If the checked "true", then brothers of the shape will cloned with this shape, else the shape will cloned without brothers of this shape.
Clone Connected movables
If this checked "true", then will cloned connected movable shapes by joints with this shape
Clone Connected statics
Same as "Clone Connected movables", but will cloned with the shapes connected by joints static shapes.

Output Parameters:

(none)
World Point to Local Point

Convert a world point to a point in the local space of a shape

Input Parameters:

The Shape
the shape
World Point X
coordinate x of the world point
World Point Y
coordinate y of the world point

Output Parameters:

Local Point X
coordinate x in local space of the shape
Local Point Y
coordinate y in local space of the shape
Local Point to World Point

Convert a local point in the space of a shape to a point in world space.

Input Parameters:

The Shape
the shape
Local Point X
coordinate x in local space of the shape
Local Point Y
coordinate y in local space of the shape

Output Parameters:

World Point X
coordinate x in world space
World Point Y
coordinate y in world space
World Vector to Local Vector

Convert a world vector to a vector in the local space of a shape

Input Parameters:

The Shape
the shape
World Vector X
x component of the world vector
World Vector Y
y component of the world vector

Output Parameters:

Local Vector X
x component of the local vector
Local Vector Y
Y component of the local vector
Local Vector to World Vector

Convert a local vector in the space of a shape to a vector in world space.

Input Parameters:

The Shape
the shape
Local Vector X
x component of the local vector
Local Vector Y
y component of the local vector

Output Parameters:

World Vector X
x component of the world vector
World Vector Y
y component of the world vector
Move shape

Move a shape relative to its initial position

Input Parameters:

The Shape
the shape
Offset X
Position x, relative to the source of the figure.
Offset Y
Position y, relative to the source of the figure.
Move Connected Movables?
whether or not move the movable shapes connected with this shape by joints.
Move Connected Statics?
whether or not move the static shapes connected with this shape by joints.
Break Embarrassed Joints??
whether or not break the joints connecting a shape to move and another shape not to move.

Output Parameters:

(none)
Move Shape to

Move a shape to a specific point

Input Parameters:

The Shape
the shape
Target Position X
target position x
Target Position Y
target position y
Move Connected Movables?
whether or not move the movable shapes connected with this shape by joints.
Move Connected Statics?
whether or not move the static shapes connected with this shape by joints.
Break Embarrassed Joints??
whether or not break the joints connecting a shape to move and another shape not to move.

Output Parameters:

(none)
Rotate Shape Around World Point

Rotate a shape around a world position by a offset angle

Input Parameters:

The Shape
the shape
Around World Point X
the world point x
Around World Point Y
the world point y
Delta Angle
delta angle by degrees
Move Connected Movables?
whether or not move the movable shapes connected with this shape by joints.
Move Connected Statics?
whether or not move the static shapes connected with this shape by joints.
Break Embarrassed Joints??
whether or not break the joints connecting a shape to move and another shape not to move.

Output Parameters:

(none)
Rotate Shape To Around World Point

Rotate a shape around a world position to a target angle

Input Parameters:

The Shape
the shape
Around World Point X
the world point x
Around World Point Y
the world point y
Target Angle
target angle by degrees
Move Connected Movables?
whether or not move the movable shapes connected with this shape by joints.
Move Connected Statics?
whether or not move the static shapes connected with this shape by joints.
Break Embarrassed Joints??
whether or not break the joints connecting a shape to move and another shape not to move.

Output Parameters:

(none)
Personal tools