Overview

▪MADRIX Script provides powerful functions to draw shapes onto the matrix.
▪You can either use absolute pixel values or you can use relative vector values.
▪These functions can be used for 2D as well as 3D.

 

Functions

▪void DrawPixelShape(color col, int shape, int x, int y, int z,
int w, int h, int d, int lineWidth, int drawMode, int lookAtType)

 

color col - Is of the data type structure and defines a color for the shape. »Using Data Types

int shape - Is of the file data integer and defines the type of shape. See below for a list of Shape Type constants.

int x - Is of the file data integer and defines the X-coordinate (left).

int y - Is of the file data integer and defines the Y-coordinate (top).

int z - Is of the file data integer and defines the Z-coordinate (front).

int w - Is of the file data integer and defines the width of the shape.

int h - Is of the file data integer and defines the height of the shape.

int d - Is of the file data integer and defines the depth of the shape.

int lineWidth - Is of the data type integer and defines the width of the shapes' border. This is not supported by all shapes.  See below for a list of supported shapes and modes.

int drawMode - Is of the data type integer and defines the Draw Mode. See below for a list of Draw Mode constants.

int lookAtType - Is of the data type integer and defines the Look-At Type. See below for a list of Look-At Type Constants.

 

▪void DrawVectorShape(color col, int shape, float x, float y, float z,
float w, float h, float d, int lineWidth, int drawMode, int lookAtType)

 
color col - Is of the data type structure and defines a color for the shape. »Using Data Types

int shape - Is of the file data integer and defines the type of shape. See below for a list of Shape Type constants.

float x - Is of the file data float and defines the X-coordinate relative to the matrix size (left).

float y - Is of the file data float and defines the Y-coordinate relative to the matrix size (top).

float z - Is of the file data float and defines the Z-coordinate relative to the matrix size (front).

float w - Is of the file data float and defines the width of the shape relative to the matrix size.

float h - Is of the file data float and defines the height of the shape relative to the matrix size.

float d - Is of the file data float and defines the depth of the shape relative to the matrix size.

int lineWidth - Is of the data type integer and defines the width of the shapes' border. This is not supported by all shapes.  See below for a list of supported shapes and modes.

int drawMode - Is of the data type integer and defines the Draw Mode. See below for a list of Draw Mode constants.

int lookAtType - Is of the data type integer and defines the Look-At Type. See below for a list of Look-At Type Constants.

 

- Valid values for relative float values range from 0.0 to 1.0.

 

Shape Type Constants

Constant

Description

Supported Draw Modes

lineWidth

int DRAWSHAPE_RECTANGLE

Renders a rectangle.

int DRAWMODE_LINE

int DRAWMODE_FACE

Only supported with int DRAWMODE_LINE

int DRAWSHAPE_SQUARE

Renders a square.

int DRAWMODE_LINE

int DRAWMODE_FACE

Only supported with int DRAWMODE_LINE

int DRAWSHAPE_CIRCLE

Renders a circle.

int DRAWMODE_LINE

int DRAWMODE_FACE

Only supported with int DRAWMODE_LINE

int DRAWSHAPE_ELLIPSE

Renders a ellipse.

int DRAWMODE_LINE

int DRAWMODE_FACE

Only supported with int DRAWMODE_LINE

int DRAWSHAPE_CROSS

Renders a cross.

int DRAWMODE_LINE

Not Supported

int DRAWSHAPE_STAR

Renders a star.

int DRAWMODE_LINE

Not Supported

int DRAWSHAPE_DIAMOND

Renders a diamond.

int DRAWMODE_LINE

int DRAWMODE_FACE

Only supported with int DRAWMODE_LINE

int DRAWSHAPE_SPHERE

Renders a sphere.

int DRAWMODE_LINE

int DRAWMODE_FACE

int DRAWMODE_VOLUME

Only supported with int DRAWMODE_FACE

int DRAWSHAPE_OCTAHEDRON

Renders a octahedron.

int DRAWMODE_LINE

int DRAWMODE_FACE

int DRAWMODE_VOLUME

Only supported with int DRAWMODE_FACE

int DRAWSHAPE_BOX

Renders a box.

int DRAWMODE_LINE

int DRAWMODE_FACE

int DRAWMODE_VOLUME

Only supported with int DRAWMODE_FACE

int DRAWSHAPE_CUBE

Renders a cube.

int DRAWMODE_LINE

int DRAWMODE_FACE

int DRAWMODE_VOLUME

Only supported with int DRAWMODE_FACE

 

Draw Mode Constants

Constant

Description

int DRAWMODE_LINE

Renders the outline of the shape (2D and 3D: Outlined).

int DRAWMODE_FACE

Renders the outer surfaces (2D: Filled , 3D : Unfilled).

int DRAWMODE_VOLUME

Renders the complete inner and outer shape (3D: Filled).

 

Look-At Type Constants

Constant

Description

int LOOKAT_FRONT

Applies no rotation and allows you to look directly at the shape (Front).

int LOOKAT_BACK

Represents a rotation of 180° around the Y-axis (Back).

int LOOKAT_LEFT

Represents a rotation of -90° around the Y-axis (Left).

int LOOKAT_RIGHT

Represents a rotation of 90° around the Y-axis (Right).

int LOOKAT_TOP

Represents a rotation of -90° around the X-axis (Top).

int LOOKAT_BOTTOM

Represents a rotation of 90° around the X-axis (Bottom).

 

MADRIX Version: 3.6j | Script Version: 2.22
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100%
Print   Previous   Next