Render Shapes

   Print  Previous  Next

Overview

MADRIX Script provides powerful functions to render shapes onto the matrix.
These functions can be used for 2D as well as 3D.

 

Functions

void RenderShape(struct color, int shapeType, float positionX, float positionY, float positionZ,
float sizeX, float sizeY, float sizeZ, struct shape, int unitType)

 

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

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

float positionX - Is of the data type float and defines the X-coordinate (left) in percent of the matrix size.

float positionY - Is of the data type float and defines the Y-coordinate (top) in percent of the matrix size.

float positionZ - Is of the data type float and defines the Z-coordinate (front) in percent of the matrix size.

float sizeX - Is of the data type float and defines the width of the shape in percent of the matrix size.

float sizeY - Is of the data type float and defines the width of the shape in percent of the matrix size.

float sizeZ - Is of the data type float and defines the width of the shape in percent of the matrix size.

struct shape - Is of the data type structure and defines various settings for the shape. This structure needs be initialized first. Initialize it with its default settings by using the function GetDefaultShape(). Define settings as required. See below for more information.

int unitType - Is of the data type integer and defines the usage of units.  See below for a list of Unit Type constants.

 

Shape Type Constants

Constant

Description

int SHAPE_TYPE_LINE

Sets the Shape Type to Line.

int SHAPE_TYPE_CURVE

Sets the Shape Type to Curve.

int SHAPE_TYPE_FILLED

Sets the Shape Type to Filled.

int SHAPE_TYPE_RECTANGLE_OUTLINED

Sets the Shape Type to Rectangle Outlined.

int SHAPE_TYPE_RECTANGLE_OUTLINED_IMPLODE

Sets the Shape Type to Rectangle Outlined Implode.

int SHAPE_TYPE_RECTANGLE_OUTLINED_EXPLODE

Sets the Shape Type to Rectangle Outlined Explode.

int SHAPE_TYPE_RECTANGLE_FILLED

Sets the Shape Type to Rectangle Filled.

int SHAPE_TYPE_RECTANGLE_FILLED_IMPLODE

Sets the Shape Type to Rectangle Filled Implode.

int SHAPE_TYPE_RECTANGLE_FILLED_EXPLODE

Sets the Shape Type to Rectangle Filled Explode.

int SHAPE_TYPE_SQUARE_OUTLINED

Sets the Shape Type to Square Outlined.

int SHAPE_TYPE_SQUARE_OUTLINED_IMPLODE

Sets the Shape Type to Square Outlined Implode.

int SHAPE_TYPE_SQUARE_OUTLINED_EXPLODE

Sets the Shape Type to Square Outlined Explode.

int SHAPE_TYPE_SQUARE_FILLED

Sets the Shape Type to Square Filled.

int SHAPE_TYPE_SQUARE_FILLED_IMPLODE

Sets the Shape Type to Square Filled Implode.

int SHAPE_TYPE_SQUARE_FILLED_EXPLODE

Sets the Shape Type to Square Filled Explode.

int SHAPE_TYPE_ELLIPSE_OUTLINED

Sets the Shape Type to Ellipse Outlined.

int SHAPE_TYPE_ELLIPSE_OUTLINED_IMPLODE

Sets the Shape Type to Ellipse Outlined Implode.

int SHAPE_TYPE_ELLIPSE_OUTLINED_EXPLODE

Sets the Shape Type to Ellipse Outlined Explode.

int SHAPE_TYPE_ELLIPSE_FILLED

Sets the Shape Type to Ellipse Filled.

int SHAPE_TYPE_ELLIPSE_FILLED_IMPLODE

Sets the Shape Type to Ellipse Filled Implode.

int SHAPE_TYPE_ELLIPSE_FILLED_EXPLODE

Sets the Shape Type to Ellipse Filled Explode.

int SHAPE_TYPE_CIRCLE_OUTLINED

Sets the Shape Type to Circle Outlined.

int SHAPE_TYPE_CIRCLE_OUTLINED_IMPLODE

Sets the Shape Type to Circle Outlined Implode.

int SHAPE_TYPE_CIRCLE_OUTLINED_EXPLODE

Sets the Shape Type to Circle Outlined Explode.

int SHAPE_TYPE_CIRCLE_FILLED

Sets the Shape Type to Circle Filled.

int SHAPE_TYPE_CIRCLE_FILLED_IMPLODE

Sets the Shape Type to Circle Filled Implode.

int SHAPE_TYPE_CIRCLE_FILLED_EXPLODE

Sets the Shape Type to Circle Filled Explode.

int SHAPE_TYPE_DIAMOND_OUTLINED

Sets the Shape Type to Diamond Outlined.

int SHAPE_TYPE_DIAMOND_OUTLINED_IMPLODE

Sets the Shape Type to Diamond Outlined Implode.

int SHAPE_TYPE_DIAMOND_OUTLINED_EXPLODE

Sets the Shape Type to Diamond Outlined Explode.

int SHAPE_TYPE_DIAMOND_FILLED

Sets the Shape Type to Diamond Filled.

int SHAPE_TYPE_DIAMOND_FILLED_IMPLODE

Sets the Shape Type to Diamond Filled Implode.

int SHAPE_TYPE_DIAMOND_FILLED_EXPLODE

Sets the Shape Type to Diamond Filled Explode.

int SHAPE_TYPE_HEART_OUTLINED

Sets the Shape Type to Heart Outlined.

int SHAPE_TYPE_HEART_OUTLINED_IMPLODE

Sets the Shape Type to Heart Outlined Implode.

int SHAPE_TYPE_HEART_OUTLINED_EXPLODE

Sets the Shape Type to Heart Outlined Explode.

int SHAPE_TYPE_HEART_FILLED

Sets the Shape Type to Heart Filled.

int SHAPE_TYPE_HEART_FILLED_IMPLODE

Sets the Shape Type to Heart Filled Implode.

int SHAPE_TYPE_HEART_FILLED_EXPLODE

Sets the Shape Type to Heart Filled Explode.

int SHAPE_TYPE_CROSS_OUTLINED

Sets the Shape Type to Cross Outlined.

int SHAPE_TYPE_CROSS_OUTLINED_IMPLODE

Sets the Shape Type to Cross Outlined Implode.

int SHAPE_TYPE_CROSS_OUTLINED_EXPLODE

Sets the Shape Type to Cross Outlined Explode.

int SHAPE_TYPE_CROSS_FILLED

Sets the Shape Type to Cross Filled.

int SHAPE_TYPE_CROSS_FILLED_IMPLODE

Sets the Shape Type to Cross Filled Implode.

int SHAPE_TYPE_CROSS_FILLED_EXPLODE

Sets the Shape Type to Cross Filled Explode.

int SHAPE_TYPE_CROSS_STRAIGHT_OUTLINED

Sets the Shape Type to Cross Straight Outlined.

int SHAPE_TYPE_CROSS_STRAIGHT_OUTLINED_IMPLODE

Sets the Shape Type to Cross Straight Outlined Implode.

int SHAPE_TYPE_CROSS_STRAIGHT_OUTLINED_EXPLODE

Sets the Shape Type to Cross Straight Outlined Explode.

int SHAPE_TYPE_CROSS_STRAIGHT_FILLED

Sets the Shape Type to Cross Straight Filled.

int SHAPE_TYPE_CROSS_STRAIGHT_FILLED_IMPLODE

Sets the Shape Type to Cross Straight Filled Implode.

int SHAPE_TYPE_CROSS_STRAIGHT_FILLED_EXPLODE

Sets the Shape Type to Cross Straight Filled Explode.

int SHAPE_TYPE_STAR_OUTLINED

Sets the Shape Type to Star Outlined.

int SHAPE_TYPE_STAR_OUTLINED_IMPLODE

Sets the Shape Type to Star Outlined Implode.

int SHAPE_TYPE_STAR_OUTLINED_EXPLODE

Sets the Shape Type to Star Outlined Explode.

int SHAPE_TYPE_STAR_FILLED

Sets the Shape Type to Star Filled.

int SHAPE_TYPE_STAR_FILLED_IMPLODE

Sets the Shape Type to Star Filled Implode.

int SHAPE_TYPE_STAR_FILLED_EXPLODE

Sets the Shape Type to Star Filled Explode.

int SHAPE_TYPE_TRIANGLE_OUTLINED

Sets the Shape Type to Triangle Outlined.

int SHAPE_TYPE_TRIANGLE_OUTLINED_IMPLODE

Sets the Shape Type to Triangle Outlined Implode.

int SHAPE_TYPE_TRIANGLE_OUTLINED_EXPLODE

Sets the Shape Type to Triangle Outlined Explode.

int SHAPE_TYPE_TRIANGLE_FILLED

Sets the Shape Type to Triangle Filled.

int SHAPE_TYPE_TRIANGLE_FILLED_IMPLODE

Sets the Shape Type to Triangle Filled Implode.

int SHAPE_TYPE_TRIANGLE_FILLED_EXPLODE

Sets the Shape Type to Triangle Filled Explode.

int SHAPE_TYPE_BOX_OUTLINED

Sets the Shape Type to 3D Box Outlined.

int SHAPE_TYPE_BOX_OUTLINED_IMPLODE

Sets the Shape Type to 3D Box Outlined Implode.

int SHAPE_TYPE_BOX_OUTLINED_EXPLODE

Sets the Shape Type to 3D Box Outlined Explode.

int SHAPE_TYPE_BOX_UNFILLED

Sets the Shape Type to 3D Box Unfilled.

int SHAPE_TYPE_BOX_UNFILLED_IMPLODE

Sets the Shape Type to 3D Box Unfilled Implode.

int SHAPE_TYPE_BOX_UNFILLED_EXPLODE

Sets the Shape Type to 3D Box Unfilled Explode.

int SHAPE_TYPE_BOX_FILLED

Sets the Shape Type to 3D Box Filled.

int SHAPE_TYPE_BOX_FILLED_IMPLODE

Sets the Shape Type to 3D Box Filled Implode.

int SHAPE_TYPE_BOX_FILLED_EXPLODE

Sets the Shape Type to 3D Box Filled Explode.

int SHAPE_TYPE_CUBE_OUTLINED

Sets the Shape Type to 3D Cube Outlined.

int SHAPE_TYPE_CUBE_OUTLINED_IMPLODE

Sets the Shape Type to 3D Cube Outlined Implode.

int SHAPE_TYPE_CUBE_OUTLINED_EXPLODE

Sets the Shape Type to 3D Cube Outlined Explode.

int SHAPE_TYPE_CUBE_UNFILLED

Sets the Shape Type to 3D Cube Unfilled.

int SHAPE_TYPE_CUBE_UNFILLED_IMPLODE

Sets the Shape Type to 3D Cube Unfilled Implode.

int SHAPE_TYPE_CUBE_UNFILLED_EXPLODE

Sets the Shape Type to 3D Cube Unfilled Explode.

int SHAPE_TYPE_CUBE_FILLED

Sets the Shape Type to 3D Cube Filled.

int SHAPE_TYPE_CUBE_FILLED_IMPLODE

Sets the Shape Type to 3D Cube Filled Implode.

int SHAPE_TYPE_CUBE_FILLED_EXPLODE

Sets the Shape Type to 3D Cube Filled Explode.

int SHAPE_TYPE_SPHERE_UNFILLED

Sets the Shape Type to 3D Sphere Unfilled.

int SHAPE_TYPE_SPHERE_UNFILLED_IMPLODE

Sets the Shape Type to 3D Sphere Unfilled Implode.

int SHAPE_TYPE_SPHERE_UNFILLED_EXPLODE

Sets the Shape Type to 3D Sphere Unfilled Explode.

int SHAPE_TYPE_SPHERE_FILLED

Sets the Shape Type to 3D Sphere Filled.

int SHAPE_TYPE_SPHERE_FILLED_IMPLODE

Sets the Shape Type to 3D Sphere Filled Implode.

int SHAPE_TYPE_SPHERE_FILLED_EXPLODE

Sets the Shape Type to 3D Sphere Filled Explode.

int SHAPE_TYPE_ELLIPSOID_UNFILLED

Sets the Shape Type to 3D Ellipsoid Unfilled.

int SHAPE_TYPE_ELLIPSOID_UNFILLED_IMPLODE

Sets the Shape Type to 3D Ellipsoid Unfilled Implode.

int SHAPE_TYPE_ELLIPSOID_UNFILLED_EXPLODE

Sets the Shape Type to 3D Ellipsoid Unfilled Explode.

int SHAPE_TYPE_ELLIPSOID_FILLED

Sets the Shape Type to 3D Ellipsoid Filled.

int SHAPE_TYPE_ELLIPSOID_FILLED_IMPLODE

Sets the Shape Type to 3D Ellipsoid Filled Implode.

int SHAPE_TYPE_ELLIPSOID_FILLED_EXPLODE

Sets the Shape Type to 3D Ellipsoid Filled Explode.

int SHAPE_TYPE_OCTAHEDRON_UNFILLED

Sets the Shape Type to 3D Octahedron Unfilled.

int SHAPE_TYPE_OCTAHEDRON_UNFILLED_IMPLODE

Sets the Shape Type to 3D Octahedron Unfilled Implode.

int SHAPE_TYPE_OCTAHEDRON_UNFILLED_EXPLODE

Sets the Shape Type to 3D Octahedron Unfilled Explode.

int SHAPE_TYPE_OCTAHEDRON_FILLED

Sets the Shape Type to 3D Octahedron Filled.

int SHAPE_TYPE_OCTAHEDRON_FILLED_IMPLODE

Sets the Shape Type to 3D Octahedron Filled Implode.

int SHAPE_TYPE_OCTAHEDRON_FILLED_EXPLODE

Sets the Shape Type to 3D Octahedron Filled Explode.

int SHAPE_TYPE_3D_HEART_UNFILLED

Sets the Shape Type to 3D Heart Unfilled.

int SHAPE_TYPE_3D_HEART_UNFILLED_IMPLODE

Sets the Shape Type to 3D Heart Unfilled Implode.

int SHAPE_TYPE_3D_HEART_UNFILLED_EXPLODE

Sets the Shape Type to 3D Heart Unfilled Explode.

int SHAPE_TYPE_3D_HEART_FILLED

Sets the Shape Type to 3D Heart Filled.

int SHAPE_TYPE_3D_HEART_FILLED_IMPLODE

Sets the Shape Type to 3D Heart Filled Implode.

int SHAPE_TYPE_3D_HEART_FILLED_EXPLODE

Sets the Shape Type to 3D Heart Filled Explode.

int SHAPE_TYPE_3D_STAR_UNFILLED

Sets the Shape Type to 3D Star Unfilled.

int SHAPE_TYPE_3D_STAR_UNFILLED_IMPLODE

Sets the Shape Type to 3D Star Unfilled Implode.

int SHAPE_TYPE_3D_STAR_UNFILLED_EXPLODE

Sets the Shape Type to 3D Star Unfilled Explode.

int SHAPE_TYPE_3D_STAR_FILLED

Sets the Shape Type to 3D Star Filled.

int SHAPE_TYPE_3D_STAR_FILLED_IMPLODE

Sets the Shape Type to 3D Star Filled Implode.

int SHAPE_TYPE_3D_STAR_FILLED_EXPLODE

Sets the Shape Type to 3D Star Filled Explode.

int SHAPE_TYPE_3D_CROSS_UNFILLED

Sets the Shape Type to 3D Cross Unfilled.

int SHAPE_TYPE_3D_CROSS_UNFILLED_IMPLODE

Sets the Shape Type to 3D Cross Unfilled Implode.

int SHAPE_TYPE_3D_CROSS_UNFILLED_EXPLODE

Sets the Shape Type to 3D Cross Unfilled Explode.

int SHAPE_TYPE_3D_CROSS_FILLED

Sets the Shape Type to 3D Cross Filled.

int SHAPE_TYPE_3D_CROSS_FILLED_IMPLODE

Sets the Shape Type to 3D Cross Filled Implode.

int SHAPE_TYPE_3D_CROSS_FILLED_EXPLODE

Sets the Shape Type to 3D Cross Filled Explode.

int SHAPE_TYPE_3D_CROSS_STRAIGHT_UNFILLED

Sets the Shape Type to 3D Cross Straight Unfilled.

int SHAPE_TYPE_3D_CROSS_STRAIGHT_UNFILLED_IMPLODE

Sets the Shape Type to 3D Cross Straight Unfilled Implode.

int SHAPE_TYPE_3D_CROSS_STRAIGHT_UNFILLED_EXPLODE

Sets the Shape Type to 3D Cross Straight Unfilled Explode.

int SHAPE_TYPE_3D_CROSS_STRAIGHT_FILLED

Sets the Shape Type to 3D Cross Straight Filled.

int SHAPE_TYPE_3D_CROSS_STRAIGHT_FILLED_IMPLODE

Sets the Shape Type to 3D Cross Straight Filled Implode.

int SHAPE_TYPE_3D_CROSS_STRAIGHT_FILLED_EXPLODE

Sets the Shape Type to 3D Cross Straight Filled Explode.

int SHAPE_TYPE_PYRAMID_UNFILLED

Sets the Shape Type to 3D Pyramid Unfilled.

int SHAPE_TYPE_PYRAMID_UNFILLED_IMPLODE

Sets the Shape Type to 3D Pyramid Unfilled Implode.

int SHAPE_TYPE_PYRAMID_UNFILLED_EXPLODE

Sets the Shape Type to 3D Pyramid Unfilled Explode.

int SHAPE_TYPE_PYRAMID_FILLED

Sets the Shape Type to 3D Pyramid Filled.

int SHAPE_TYPE_PYRAMID_FILLED_IMPLODE

Sets the Shape Type to 3D Pyramid Filled Implode.

int SHAPE_TYPE_PYRAMID_FILLED_EXPLODE

Sets the Shape Type to 3D Pyramid Filled Explode.

int SHAPE_TYPE_TEXT

Sets the Shape Type to Text.

int SHAPE_TYPE_WAVE_LINEAR

Sets the Shape Type to Wave Linear.

int SHAPE_TYPE_WAVE_RADAR

Sets the Shape Type to Wave Radar.

int SHAPE_TYPE_WAVE_HELIX

Sets the Shape Type to Wave Helix.

int SHAPE_TYPE_WAVE_CIRCLE

Sets the Shape Type to Wave Circle.

int SHAPE_TYPE_WAVE_SQUARE

Sets the Shape Type to Wave Square.

int SHAPE_TYPE_WAVE_DIAMOND

Sets the Shape Type to Wave Diamond.

int SHAPE_TYPE_WAVE_SPHERE

Sets the Shape Type to Wave Sphere.

int SHAPE_TYPE_WAVE_CUBE

Sets the Shape Type to Wave Cube.

int SHAPE_TYPE_WAVE_OCTAHEDRON

Sets the Shape Type to Wave Octahedron.

int SHAPE_TYPE_RANDOM

Selects an available Shape Type for each shape randomly. Sets the Shape Type to Random.

int SHAPE_TYPE_RANDOM_STATIC

Sets the Shape Type to Random Static.

int SHAPE_TYPE_RANDOM_IMPLODE

Sets the Shape Type to Random Implode.

int SHAPE_TYPE_RANDOM_EXPLODE

Sets the Shape Type to Random Explode.

int SHAPE_TYPE_RANDOM_OUTLINED

Sets the Shape Type to Random Outlined.

int SHAPE_TYPE_RANDOM_OUTLINED_STATIC

Sets the Shape Type to Random Outlined Static.

int SHAPE_TYPE_RANDOM_OUTLINED_IMPLODE

Sets the Shape Type to Random Outlined Implode.

int SHAPE_TYPE_RANDOM_OUTLINED_EXPLODE

Sets the Shape Type to Random Outlined Explode.

int SHAPE_TYPE_RANDOM_UNFILLED

Sets the Shape Type to Random Unfilled.

int SHAPE_TYPE_RANDOM_UNFILLED_STATIC

Sets the Shape Type to Random Unfilled Static.

int SHAPE_TYPE_RANDOM_UNFILLED_IMPLODE

Sets the Shape Type to Random Unfilled Implode.

int SHAPE_TYPE_RANDOM_UNFILLED_EXPLODE

Sets the Shape Type to Random Unfilled Explode.

int SHAPE_TYPE_RANDOM_FILLED

Sets the Shape Type to Random Filled.

int SHAPE_TYPE_RANDOM_FILLED_STATIC

Sets the Shape Type to Random Filled Static.

int SHAPE_TYPE_RANDOM_FILLED_IMPLODE

Sets the Shape Type to Random Filled Implode.

int SHAPE_TYPE_RANDOM_FILLED_EXPLODE

Sets the Shape Type to Random Filled Explode.

int SHAPE_TYPE_2D_RANDOM

Sets the Shape Type to 2D Random.

int SHAPE_TYPE_2D_RANDOM_STATIC

Sets the Shape Type to 2D Random Static.

int SHAPE_TYPE_2D_RANDOM_IMPLODE

Sets the Shape Type to 2D Random Implode.

int SHAPE_TYPE_2D_RANDOM_EXPLODE

Sets the Shape Type to 2D Random Explode.

int SHAPE_TYPE_2D_RANDOM_OUTLINED

Sets the Shape Type to 2D Random Outlined.

int SHAPE_TYPE_2D_RANDOM_OUTLINED_Static

Sets the Shape Type to 2D Random Outlined Static.

int SHAPE_TYPE_2D_RANDOM_OUTLINED_IMPLODE

Sets the Shape Type to 2D Random Outlined Implode.

int SHAPE_TYPE_2D_RANDOM_OUTLINED_EXPLODE

Sets the Shape Type to 2D Random Outlined Explode.

int SHAPE_TYPE_2D_RANDOM_FILLED

Sets the Shape Type to 2D Random Filled.

int SHAPE_TYPE_2D_RANDOM_FILLED_STATIC

Sets the Shape Type to 2D Random Filled Static.

int SHAPE_TYPE_2D_RANDOM_FILLED_IMPLODE

Sets the Shape Type to 2D Random Filled Implode.

int SHAPE_TYPE_2D_RANDOM_FILLED_EXPLODE

Sets the Shape Type to 2D Random Filled Explode.

int SHAPE_TYPE_3D_RANDOM

Sets the Shape Type to 3D Random.

int SHAPE_TYPE_3D_RANDOM_STATIC

Sets the Shape Type to 3D Random Static.

int SHAPE_TYPE_3D_RANDOM_IMPLODE

Sets the Shape Type to 3D Random Implode.

int SHAPE_TYPE_3D_RANDOM_EXPLODE

Sets the Shape Type to 3D Random Explode.

int SHAPE_TYPE_3D_RANDOM_UNFILLED

Sets the Shape Type to 3D Random Unfilled.

int SHAPE_TYPE_3D_RANDOM_UNFILLED_STATIC

Sets the Shape Type to 3D Random Unfilled Static.

int SHAPE_TYPE_3D_RANDOM_UNFILLED_IMPLODE

Sets the Shape Type to 3D Random Unfilled Implode.

int SHAPE_TYPE_3D_RANDOM_UNFILLED_EXPLODE

Sets the Shape Type to 3D Random Unfilled Explode.

int SHAPE_TYPE_3D_RANDOM_FILLED

Sets the Shape Type to 3D Random Filled.

int SHAPE_TYPE_3D_RANDOM_FILLED_STATIC

Sets the Shape Type to 3D Random Filled Static.

int SHAPE_TYPE_3D_RANDOM_FILLED_IMPLODE

Sets the Shape Type to 3D Random Filled Implode.

int SHAPE_TYPE_3D_RANDOM_FILLED_EXPLODE

Sets the Shape Type to 3D Random Filled Explode.

 

Shape Structure

shape

int renderingMode
int shapeAlignment
int shapeRotation
int blendingMode
int originType
float border
float innerGlow
float outerGlow
int innerGlowInterpolation
int outerGlowInterpolation
float proportion
float diagonalLength

shape stores specific information for shapes.

 

Valid values for renderingMode are:

RENDERING_MODE_EXTENDED

RENDERING_MODE_SIMPLE

 

Valid values for shapeAlignment are:

LOOKAT_FRONT

LOOKAT_BACK

LOOKAT_LEFT

LOOKAT_RIGHT

LOOKAT_TOP

LOOKAT_BOTTOM

LOOKAT_RANDOM

 

Valid values for shapeRotation are:

ROTATION_CCW_0

ROTATION_CCW_90

ROTATION_CCW_180

ROTATION_CCW_270

ROTATION_CW_0

ROTATION_CW_90

ROTATION_CW_180

ROTATION_CW_270

 

blendingMode is only available for RENDERING_MODE_EXTENDED. Valid values are:

BLENDING_MODE_NONE

BLENDING_MODE_ALPHA

 

Valid values for originType are:

ORIGIN_CENTER

ORIGIN_FRONT

ORIGIN_BACK

ORIGIN_LEFT

ORIGIN_RIGHT

ORIGIN_TOP

ORIGIN_BOTTOM

ORIGIN_TOP_LEFT

ORIGIN_TOP_RIGHT

ORIGIN_BOTTOM_LEFT

ORIGIN_BOTTOM_RIGHT

ORIGIN_FRONT_LEFT

ORIGIN_FRONT_RIGHT

ORIGIN_BACK_LEFT

ORIGIN_BACK_RIGHT

ORIGIN_FRONT_TOP

ORIGIN_FRONT_BOTTOM

ORIGIN_BACK_TOP

ORIGIN_BACK_BOTTOM

ORIGIN_FRONT_TOP_LEFT

ORIGIN_FRONT_TOP_RIGHT

ORIGIN_FRONT_BOTTOM_LEFT

ORIGIN_FRONT_BOTTOM_RIGHt

ORIGIN_BACK_TOP_LEFT

ORIGIN_BACK_TOP_RIGHT

ORIGIN_BACK_BOTTOM_LEFT

ORIGIN_BACK_BOTTOM_RIGHT

 

border is only available for RENDERING_MODE_EXTENDED.
Valid values range from 0.01 to 1.00.

 

innerGlow is only available for RENDERING_MODE_EXTENDED.
Valid values range from 0.01 to 1.00.

 

outerGlow is only available for RENDERING_MODE_EXTENDED.
Valid values range from 0.01 to 1.00.

 

Valid values for innerGlowInterpolation are:

INTERPOLATION_TYPE_LINEAR

INTERPOLATION_TYPE_EASE_BOUNCE_IN

INTERPOLATION_TYPE_EASE_BOUNCE_OUT

INTERPOLATION_TYPE_EASE_BOUNCE_INOUT

INTERPOLATION_TYPE_EASE_CIRC_IN

INTERPOLATION_TYPE_EASE_CIRC_OUT

INTERPOLATION_TYPE_EASE_CIRC_INOUT

INTERPOLATION_TYPE_EASE_CUBIC_IN

INTERPOLATION_TYPE_EASE_CUBIC_OUT

INTERPOLATION_TYPE_EASE_CUBIC_INOUT

INTERPOLATION_TYPE_EASE_SINE_IN

INTERPOLATION_TYPE_EASE_SINE_OUT

INTERPOLATION_TYPE_EASE_SINE_INOUT

INTERPOLATION_TYPE_EASE_EXPO_IN

INTERPOLATION_TYPE_EASE_EXPO_OUT

INTERPOLATION_TYPE_EASE_EXPO_INOUT

 

Valid values for outerGlowInterpolation are:

See innerGlowInterpolation

 

proportion is only available for RENDERING_MODE_EXTENDED and for SHAPE_TYPE_CROSS_STRAIGHT, SHAPE_TYPE_STAR, SHAPE_TYPE_3D_CROSS_STRAIGHT, and SHAPE_TYPE_3D_STAR.
Valid values range from 0.01 to 1.00.

 

diagonalLength is only available for RENDERING_MODE_EXTENDED and for SHAPE_TYPE_CROSS, SHAPE_TYPE_STAR, SHAPE_TYPE_3D_CROSS, and SHAPE_TYPE_3D_STAR.
Valid values range from 0.01 to 1.00.

 

Unit Type Constants

Constant

Description

int UNIT_TYPE_NORM

Uses normalized values ranging from 0.0 to 1.0. It is the default parameter.

int UNIT_TYPE_VOXEL

Uses voxel units based on the Matrix Size.

int UNIT_TYPE_PERCENT

Uses percentage values from 0 to 100.

 

Example

@scriptname="RenderShape";

@author="";

@version="MADRIX 3.4";

@description="Example";

 

color col = WHITE;

shape shapeProps = GetDefaultShape();

float pos_x = 0.5;

float pos_y = 0.5;

float pos_z = 0.5;

float size_x = 0.7;

float size_y = 0.7;

float size_z = 1.0;

int shapeType = SHAPE_TYPE_CIRCLE_OUTLINED;

int unitType = UNIT_TYPE_NORM;

 

void InitEffect()

{

    shapeProps.renderingMode = RENDERING_MODE_EXTENDED;

    shapeProps.shapeAlignment = LOOKAT_FRONT ;

    shapeProps.shapeRotation = ROTATION_CW_90;

    shapeProps.blendingMode = BLENDING_MODE_ALPHA ;

    shapeProps.originType = ORIGIN_CENTER;

    shapeProps.border = 0.01;

    shapeProps.innerGlow = 0.5;

    shapeProps.outerGlow = 0.2;

    shapeProps.innerGlowInterpolation = INTERPOLATION_TYPE_LINEAR;

    shapeProps.outerGlowInterpolation = INTERPOLATION_TYPE_LINEAR;

  //shapeProps.proportion;

  //shapeProps.diagonalLength;

 

}

 

void PreRenderEffect()

{

 

}

 

void PostRenderEffect()

{

    RenderShape(col, shapeType, pos_x, pos_y, pos_z, size_x, size_y, size_z, shapeProps, unitType);

    RenderShape(col, shapeType, pos_x - 0.25, pos_y - 0.25, pos_z - 0.25, size_x, size_y, size_z, shapeProps, unitType);

}

 

void MatrixSizeChanged()

{

    InitEffect();

}

 

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