RaySupreme Script API
 All Data Structures Functions Pages
Public Member Functions
Instance Class Reference

Public Member Functions

void print (string str)
 
NodeGraphrootGraph (void)
 
float randomFloat (float min, float max)
 
int time (void)
 
int year (void)
 

Detailed Description

The Instance class is used in the InstanceScript( Instance &instance, InstanceContext &context, NodeGraph &graph ) function. This function is used to create or modify Script based Templates. It provides basic support routines. In template based scripts, the global pointer g_ctx points to this class.

Member Function Documentation

void Instance::print ( string  str)

Prints the given string to the console. Can be used for debug output or for showing progress to the user.

Parameters
strThe string to print.
float Instance::randomFloat ( float  min,
float  max 
)

Returns a random float between min and max.

Parameters
minThe minimum value for the random float.
maxThe maximum value for the random float.
Returns
A random float between min and max.
NodeGraph* Instance::rootGraph ( void  )

Returns the root graph of the current project.

Returns
The root graph of the project.
int Instance::time ( void  )

Returns the time of the current TT3D context. Useful for adjusting objects based on time, for example to put on lights during the night time.

Returns
The time in 24-hour format.
int Instance::year ( void  )

Returns the year of the current Text-to-3D context. Default is the current year.

Returns
The currently set year.