Rik's Treehouse > Babbling in Binary > My Software > Orphanware > R2DToo > R2DToo Help > For the Programmer > getTickRef

getTickRef

Declaration
Return Value
Remarks
Revisions
Example
See Also

Declaration

pParam __stdcall getTickRef(void);
Top of page

Return Value

A pointer (reference) to the simulation time (tick). Top of page

Remarks

This function is available through the API. Use it to retrieve a pointer shortcut to the simulation time (tick). Once you have the pointer you can access (read or write) the tick directly through the shortcut without needing any more function calls.
Top of page

Revisions

API v1.6
  • new!
Top of page

Example

pParam pTick; //--------------------------------------------------------------------------- void __stdcall onSimCreate(void) { pTick = getTickRef(); } //--------------------------------------------------------------------------- bool iterate(pState state, int x, int y, pState *nbr, int nbrCount, int feaMode) // one iteration of the Mandelbrot set { if (feaMode!=feaContinue) return true; tParam r = state[2], i = state[3]; state[2] = state[0] + r*r - i*i; state[3] = state[1] + 2.0*r*i; state[4] = state[2]*state[2] + state[3]*state[3]; if (state[4]>5) state[5] = *pTick; return true; } //--------------------------------------------------------------------------- void __stdcall onTick(double &time) { forEachAgent(iterate); } //---------------------------------------------------------------------------
Top of page

See Also

getTickVal.
Top of page
[Rik's Office Hours] [Contact Rik]
Last updated: Fri Apr 30 2004, 1:39pm