Using Directions

  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 1 (TRUE) to activate the direction Cross Mode. Use 0 (false) to deactivate it.

int GetDirectionCrossMode()

Returns 1 (TRUE) if the direction Cross Mode is activated, otherwise 0 (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.

int DIRECTION_RADIAL_SLICES

Sets the Direction to Slices.

int DIRECTION_RADIAL_BARS

Sets the Direction to Bars.

 

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()
{
 timecode tc = GetTime();
 g_startTime = tc.hour * 3600 + tc.min * 60 + tc.sec;
 
 g_run = 0;
 SetDirectionCrossMode(FALSE);        //Deactivate Cross Mode
}
 
void PreRenderEffect()
{
 timecode tc = GetTime();
 int t2 = tc.hour * 3600 + tc.min * 60 + tc.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: 5.6 | Script Version: 3.18
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100%
 Previous   Next

 


Enable automatic translation | Activer la traduction automatique |