SilverScreen Solid Modeler

flash_prim

flash_prim

Previous topic Next topic  

flash_prim

Previous topic Next topic JavaScript is required for the print function  

 

SilverScreenAPI

 

void flash_prim ( OBJECT_NODE *parent, PRIM_NODE *prim, int milliseconds )

 

OBJECT_NODE *parent;        // A pointer to an object

PRIM_NODE   *prim;          // A pointer to a primitive

int         milliseconds;   // The number of milliseconds to highlight

 

 




Synopsis

#include "silver.h"

#include "ssnodes.h"

 

The flash_prim function  highlights a primitive on the screen for milliseconds milliseconds. Typically this function is used to bring a primitive to the attention of the user

 

 

Parameters

parent is a pointer to the object that contains prim

prim is a pointer to the primitive that is to be highlighted (or flashed)

milliseconds is the number of milliseconds to highlight prim

 

 

Return Value

none

 

 

Remarks

If the user presses a key while the entity is being highlighted, its original state will be restored and flash_prim  will return as if milliseconds milliseconds have passed.

 

 

See Also

flash_bos

 

 

Example

The following code will allow the user to select a polygon, then highlight the polygon for one second:

C / C++ Code

 

 #include "silver.h

 #include "ssnodes.h"

 

 .

 .

 .

 

 char        prim_path[256];

 OBJECT_NODE *obj;

 PRIM_NODE   *prim;

 

 if ( pick_primitive("Pick a polygon to flash", BITS_POLYGON, prim_path) )

    {

    if ( prim = get_prim(prim_path, &obj) )

       flash_prim(obj, prim, 1000);

    }