GO2cam Javascript API
CGO2SDisplayManager Class Reference

Static Public Member Functions

static void Add (std::shared_ptr< CGoeElementInterface > entity)
 
static void DeleteAll ()
 Remove all the display entities, called at the end of the script.
 
static void Remove (std::shared_ptr< CGoeElementInterface > entity)
 Remove an entity from the scene before the end of the script.
 
static void RequestRefresh ()
 

Detailed Description

Owner of the temporary display entities created by the JS API (GO2SDisplayPolyline, GO2SDisplayPoint...) Nothing is created in the GO2cam database: the entities are only displayed while the script is running and are removed by DeleteAll() at the end of the script.

Member Function Documentation

◆ Add()

static void CGO2SDisplayManager::Add ( std::shared_ptr< CGoeElementInterface > entity)
static

Give default display settings to the entity (current color and working plane, no interaction) then attach it to the scene. The manager keeps the ownership of the entity.

◆ RequestRefresh()

static void CGO2SDisplayManager::RequestRefresh ( )
static

Ask for a redraw of the display entities The redraw is postponed until the script gives the control back to the event loop (pick, dialog, WaitForInterruption...), so that a batch of calls gives a single redraw