Using Directions

   Print  Previous  Next

Functions Provided For Setting Effect Directions

The following table provides an overview of all functions to modify effect directions:

Function

Description

void SetDirection(int value)

Sets the Direction. Please use a constant as described below for value.

int GetDirection()

Returns the current Direction.

void SetDirectionCrossMode(int value)

Use TRUE to activate the direction Cross Mode. Use FALSE to deactivate it.

int GetDirectionCrossMode()

Returns TRUE, if the direction Cross Mode is activated, otherwise FALSE.

void ToggleDirectionCrossMode()

Toggles the direction Cross Mode.

 

Remarks

Not all effects which use directions offer Cross Mode. Therefore, the functions SetDirectionCrossMode, GetDirectionCrossMode and ToggleDirectionCrossMode are only available, if the effect offers Cross Mode. Also the effects mostly offer just a selection of all the directions which are listed below. The function SetDirection will only set directions which are offered by the effect.

 

Direction Constants

Constant

Description

int DIRECTION_NONE

Sets no direction. Usually this is the same as stopping the movement of an effect, if this is possible with the effect.

int DIRECTION_FRONT

Sets the direction to Front.

int DIRECTION_BACK

Sets the direction to Back.

int DIRECTION_LEFT

Sets the direction to Left.

int DIRECTION_RIGHT

Sets the direction to Right.

int DIRECTION_TOP

Sets the direction to Top.

int DIRECTION_BOTTOM

Sets the direction to Bottom.

int DIRECTION_TOP_LEFT

Sets the direction to Top Left.

int DIRECTION_TOP_RIGHT

Sets the direction to Top Right.

int DIRECTION_BOTTOM_LEFT

Sets the direction to Bottom Left.

int DIRECTION_BOTTOM_RIGHT

Sets the direction to Bottom Right.

int DIRECTION_FRONT_LEFT

Sets the direction to Front Left.

int DIRECTION_FRONT_RIGHT

Sets the direction to Front Right.

int DIRECTION_BACK_LEFT

Sets the direction to Back Left.

int DIRECTION_BACK_RIGHT

Sets the direction to Back Right.

int DIRECTION_FRONT_TOP

Sets the direction to Front Top.

int DIRECTION_FRONT_BOTTOM

Sets the direction to Front Bottom.

int DIRECTION_BACK_TOP

Sets the direction to Back Top.

int DIRECTION_BACK_BOTTOM

Sets the direction to Back Bottom.

int DIRECTION_FRONT_TOP_LEFT

Sets the direction to Front Top Left.

int DIRECTION_FRONT_TOP_RIGHT

Sets the direction to Front Top Right.

int DIRECTION_FRONT_BOTTOM_LEFT

Sets the direction to Front Bottom Left.

int DIRECTION_FRONT_BOTTOM_RIGHT

Sets the direction to Front Bottom Right.

int DIRECTION_BACK_TOP_LEFT

Sets the direction to Back Top Left.

int DIRECTION_BACK_TOP_RIGHT

Sets the direction to Back Top Right.

int DIRECTION_BACK_BOTTOM_LEFT

Sets the direction to Back Bottom Left.

int DIRECTION_BACK_BOTTOM_RIGHT

Sets the direction to Back Bottom Right.

int DIRECTION_X_AXIS_IMPLODE

Sets the direction to X-Axis Implode.

int DIRECTION_X_AXIS_EXPLODE

Sets the direction to X-Axis Explode.

int DIRECTION_Y_AXIS_IMPLODE

Sets the direction to Y-Axis Implode.

int DIRECTION_Y_AXIS_EXPLODE

Sets the direction to Y-Axis Explode.

int DIRECTION_Z_AXIS_IMPLODE

Sets the direction to Z-Axis Implode.

int DIRECTION_Z_AXIS_EXPLODE

Sets the direction to Z-Axis Explode.

int DIRECTION_RECTANGLE_IMPLODE

Sets the direction to Rectangle Implode.

int DIRECTION_RECTANGLE_EXPLODE

Sets the direction to Rectangle Explode.

int DIRECTION_SQUARE_IMPLODE

Sets the direction to Square Implode.

int DIRECTION_SQUARE_EXPLODE

Sets the direction to Square Explode.

int DIRECTION_ELLIPSE_IMPLODE

Sets the direction to Ellipse Implode.

int DIRECTION_ELLIPSE_EXPLODE

Sets the direction to Ellipse Explode.

int DIRECTION_CIRCLE_IMPLODE

Sets the direction to Circle Implode.

int DIRECTION_CIRCLE_EXPLODE

Sets the direction to Circle Explode.

int DIRECTION_DIAMOND_IMPLODE

Sets the direction to Diamond Implode.

int DIRECTION_DIAMOND_EXPLODE

Sets the direction to Diamond Explode.

int DIRECTION_BOX_IMPLODE

Sets the direction to Box Implode.

int DIRECTION_BOX_EXPLODE

Sets the direction to Box Explode.

int DIRECTION_CUBE_IMPLODE

Sets the direction to Cube Implode.

int DIRECTION_CUBE_EXPLODE

Sets the direction to Cube Explode.

int DIRECTION_ELLIPSOID_IMPLODE

Sets the direction to Ellipsoid Implode.

int DIRECTION_ELLIPSOID_EXPLODE

Sets the direction to Ellipsoid Explode.

int DIRECTION_SPHERE_IMPLODE

Sets the direction to Sphere Implode.

int DIRECTION_SPHERE_EXPLODE

Sets the direction to Sphere Explode.

int DIRECTION_OCTAHEDRON_IMPLODE

Sets the direction to Octahedron Implode.

int DIRECTION_OCTAHEDRON_EXPLODE

Sets the direction to Octahedron Explode.

int DIRECTION_RADIAL

Sets the direction to Radial.

 

MADRIX 2.X To MADRIX 3.X Migration Hints

The following functions and constants are not supported anymore. Please follow the hints to migrate your macros.

Function/Constant

Description

void SetCrossed(int enable)

Use SetDirectionCrossMode(int value) instead.

int GetCrossed()

Use GetDirectionCrossMode() instead.

DIR_NONE

Use DIRECTION_NONE instead.

DIR_LEFT

Use DIRECTION_LEFT instead.

DIR_RIGHT

Use DIRECTION_RIGHT instead.

DIR_UP

Use DIRECTION_TOP instead.

DIR_DOWN

Use DIRECTION_BOTTOM instead.

DIR_UL

Use DIRECTION_TOP_LEFT instead.

DIR_UR

Use DIRECTION_TOP_RIGHT instead.

Dir_DL

Use DIRECTION_BOTTOM_LEFT instead.

DIR_DR

Use DIRECTION_BOTTOM_RIGHT instead.

Special Directions

DIR_HORIZONTAL

Refer to the documentation of the »S2L Tubes or »M2L Tubes effect as SetDirection(int direction) and GetDirection() do not support this special direction anymore.

DIR_VERTICAL

Refer to the documentation of the »S2L Tubes or »M2L Tubes effect as SetDirection(int direction) and GetDirection() do not support this special direction anymore.

DIR_HV

Refer to the documentation of the »S2L Tubes or »M2L Tubes effect as SetDirection(int direction) and GetDirection() do not support this special direction anymore.

DIR_OUTWARDS

Use DIRECTION_RECTANGLE_EXPLODE instead in case of the »SCE Gradient effect. Otherwise, refer to the documentation of the specific effect as SetDirection(int direction) and GetDirection() do not support this special direction anymore.

DIR_INWARDS

Use DIRECTION_RECTANGLE_IMPLODE instead in case of the »SCE Gradient effect. Otherwise, refer to the documentation of the specific effect as SetDirection(int direction) and GetDirection() do not support this special direction anymore.

DIR_CIRCLE_OUTWARDS

Use DIRECTION_ELLIPSE_EXPLODE instead.

DIR_CIRCLE_INWARDS

Use DIRECTION_ELLIPSE_IMPLODE instead.

DIR_OUTWARDS_H

Use DIRECTION_X_AXIS_EXPLODE instead.

DIR_INWARDS_H

Use DIRECTION_X_AXIS_IMPLODE instead.

DIR_OUTWARDS_V

Use DIRECTION_Y_AXIS_EXPLODE instead.

DIR_INWARDS_V

Use DIRECTION_Y_AXIS_IMPLODE instead.

DIR_OUTWARDS_RECT

Use DIRECTION_RECTANGLE_EXPLODE instead.

DIR_INWARDS_RECT

Use DIRECTION_RECTANGLE_IMPLODE instead.

DIR_OUTWARDS_SQUARE

Use DIRECTION_SQUARE_EXPLODE instead.

DIR_INWARDS_SQUARE

Use DIRECTION_SQUARE_IMPLodE instead.

DIR_OUTWARDS_CIRCLE

Use DIRECTION_CIRCLE_EXPLODE instead.

DIR_INWARDS_CIRCLE

Use DIRECTION_CIRCLE_IMPLODE instead.

DIR_OUTWARDS_ELLIPSE

Use DIRECTION_ELLIPSE_EXPLODE instead.

DIR_INWARDS_ELLIPSE

Use DIRECTION_ELLIPSE_IMPLODE instead.

DIR_RADIAL

Use DIRECTION_RADIAL instead.

 

Example

This macro example switches the direction each second between left and right. It works with the »SCE Color Scroll effect, for example.

@scriptname="";

@author="";

@version="";

@description="";

 

int g_startTime;

int g_run;

 

void InitEffect()

{

 time t = GetTime();

 g_startTime = t.hour * 3600 + t.min * 60 + t.sec;

 

 g_run = 0;

 SetDirectionCrossMode(FALSE);        //Deactivate Cross Mode

}

 

void PreRenderEffect()

{

 time t = GetTime();

 int t2 = t.hour * 3600 + t.min * 60 + t.sec;

 

 if(t2 - g_startTime >= 1)

 {

         g_startTime = t2;

         switch(g_run % 2)

         {

         case 0:        SetDirection(DIRECTION_LEFT);        break;

         case 1:        SetDirection(DIRECTION_RIGHT);        break;

         default:        break;

         }

         g_run++;

 }

}

 

void PostRenderEffect()

{

 

}

 

void MatrixSizeChanged()

{

    InitEffect();

}

 

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