Using Look-At Types

  Previous  Next

Functions Provided For Setting Effect Look-At Types

The following table provides an overview of all functions to modify effect look-at types:

Function

Description

void SetLookAtType(int value)

Sets the look-at type value, which is the orientation of the effect related to the matrix. See below for a list of constants.

int GetLookAtType()

Returns the current look-at type. See below for a list of constants.

 

Remarks

The effects sometimes offer just a selection of all the look-at types which are listed below. The function SetLookAtType will only set look-at types which are offered by the effect.

 

Look-At Type Constants

Constant

Description

int LOOKAT_FRONT

Sets the look-at type to Front.

int LOOKAT_BACK

Sets the look-at type to Back.

int LOOKAT_LEFT

Sets the look-at type to Left.

int LOOKAT_RIGHT

Sets the look-at type to Right.

int LOOKAT_TOP

Sets the look-at type to Top.

int LOOKAT_BOTTOM

Sets the look-at type to Bottom.

 

Example

This macro example randomly changes the look-at type each second. It works with the »SCE Image or »SCE Ticker / Scrolling Text effect, for example. (In the SCE Image effect, please load at least one image.)

@scriptname="";
@author="";
@version="";
@description="";
 
int g_startTime;
 
void InitEffect()
{
 time t = GetTime();
 g_startTime = t.hour * 3600 + t.min * 60 + t.sec;
}
 
void PreRenderEffect()
{
 time t = GetTime();
 int t2 = t.hour * 3600 + t.min * 60 + t.sec;
 
 if(t2 - g_startTime >= 1)
 {
         g_startTime = t2;
         switch(random(0,5))
         {
         case 0:        SetLookAtType(LOOKAT_FRONT);        break;
         case 1:        SetLookAtType(LOOKAT_BACK);        break;
         case 2:        SetLookAtType(LOOKAT_LEFT);        break;
         case 3:        SetLookAtType(LOOKAT_RIGHT);        break;
         case 4:        SetLookAtType(LOOKAT_TOP);                break;
         case 5:        SetLookAtType(LOOKAT_BOTTOM);        break;
         default:        break;
         }
 }
}
 
void PostRenderEffect()
{
 
}
 
void MatrixSizeChanged()
{
    InitEffect();
}
 
 
 

MADRIX Version: 5.7 | Script Version: 3.23
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100%
 Previous   Next

 


Enable automatic translation | Activer la traduction automatique |