![]() |
VR-Forces 5.0.3 Developer's Guide
|
This driver is responsible for creating DtWindowObjects The VR - Vantage Control Toolkit lets you create 2D window objects, such as lines, polygons and textboxes.This example shows how to add new window objects and manipulate them around the screen. This example allows you to create, translate( x&y ), rotate, scale( x&y ) multiple different objects, using both a parenting and non parenting mode. The box that is initially displayed in white on screen is a visual representation of the DtWindowSurface's clipping box. The key bindings for the example are as follows : “Space” - creates a window object object of the selected type “1” - Sets window object type to Polygon “2” - Sets window object type to Line “3” - Sets window object type to Text Box “4” - Sets window object type to Eclipse “WASD” - Translate the object and it’s children around the screen “Left” & “Right” arrow keys - scale - / +in the x direction “Up” & “Down” arrow keys - scale - / +in the y direction "R" - Rotate object 90 degrees clockwise “, ” & “.” - The comma and period keys traverse up and down the vector the objects are stored in for individual control. “p” - Turns parenting off for newly created objects, for individual control. Parenting is on by default, and each newly created object is attached to the previously created object. “v” - Turns the currently selected window object's visibility on / off.

Public Types | |
| enum | DtDirection { Up = 0, Left = 1, Down = 2, Right = 4 } |
| typedef std::vector < DtWindowObjectAgent * > | DtWindowObjects |
Public Member Functions | |
| DtWindowObjectsDriver (DtAgentManager &agentManager, const std::string &instanceName) | |
| virtual | ~DtWindowObjectsDriver () |
| virtual const std::string & | className () const |
| virtual void | drawObject () |
| virtual void | drawPolygon () |
| virtual void | drawLine () |
| virtual void | drawText () |
| virtual void | drawEllipse () |
| virtual void | activateObjectType (int objectType) |
| virtual void | modifyActivateObjectId (bool increaseIdNumber) |
| virtual void | setParenting () |
| virtual void | modifyObjectVisibility () |
| virtual void | shiftWindowObjectPosition (DtDirection direction) |
| virtual void | scaleWindowObject (DtDirection direction) |
| virtual void | rotateWindowObject () |
| virtual DtWindowObjectAgent * | findWindowObjectAgent (int vecLocation) |
Public Member Functions inherited from makVrv::DtDriver | |
| DtDriver (DtAgentManager &agentManager, const std::string &instanceName) | |
| virtual | ~DtDriver () |
| virtual void | realizeConfiguration (const DtConfiguration &configuration) |
| virtual DtConfiguration | createConfiguration () const |
| DtAgentManager & | agentManager () |
| virtual DtAgentManagerInterface & | sceneInterface () |
| bool | started () const |
| virtual const std::string & | instanceName () const |
| virtual bool | autoStart () const |
| virtual void | setAutoStart (bool autoStart) |
| virtual bool | isWindowDependent () const |
| virtual void | setIsWindowDependent (bool dep) |
| virtual void | setIsUserControllable (bool) |
| virtual bool | isUserControllable () const |
| virtual void | setIsPersistent (bool per) |
| virtual bool | isPersistent () const |
| virtual bool | isOnDriverSelectionList () const |
| virtual void | setOnDriverSelectionList (bool) |
| bool | objectFromAgentManager (const DtUniqueID &id) const |
Protected Member Functions | |
| virtual bool | onStart () |
| virtual bool | onStop () |
| virtual bool | onTick () |
Protected Member Functions inherited from makVrv::DtDriver | |
| void | applyChangesAndDelete (DtElementChanges *changes) |
| void | reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type) |
| void | reportElementAttribute (DtElementID id, DtElementAttribute *attribute) |
| void | reportElementDestroyed (DtElementID id) |
| void | start () |
| void | stop () |
| bool | tick () |
| virtual void | slot_displayEngineAdded (const DtDeRecord &igRecord) |
| virtual void | setInstanceName (const std::string &name) |
| virtual void | installAccessories () |
| virtual void | uninstallAccessories () |
Protected Attributes | |
| DtWindowObjects | myWindowAgents |
| int | myActivatedObjectType |
| int | myActivatedObjectId |
| bool | myParenting |
| DtWindowSurfaceAgent * | mySurface |
| DtWindowPolygonAgent * | mySurfaceClipBoxVisualPoly |
Protected Attributes inherited from makVrv::DtDriver | |
| DtAgentManager & | myAgentManager |
| bool | myStartedFlag |
| std::string | myName |
| DtConfiguration | myConfiguration |
| bool | myPersistentFlag |
| bool | myUserControllableFlag |
| bool | myRequestStateDiffPendingFlag |
| DtElementChanges | myChanges |
| typedef std::vector<DtWindowObjectAgent*> makVrv::DtWindowObjectsDriver::DtWindowObjects |
typedef vector for holding DtWindowObjectAgents
| makVrv::DtWindowObjectsDriver::DtWindowObjectsDriver | ( | DtAgentManager & | agentManager, |
| const std::string & | instanceName | ||
| ) |
CTOR.
|
virtual |
Virtual DTOR.
|
virtual |
Get the class name as a string.
Implements makVrv::DtDriver.
|
virtual |
Draw a window object. Draws the type of object activated via keyboard inputs default is polygon.
|
virtual |
Draw a polygon.
|
virtual |
Draw a line.
|
virtual |
Draw test.
|
virtual |
Draw a ellipse.
|
virtual |
Select which type of window object to draw.
|
virtual |
Select which window object to current modify.
|
virtual |
Set parenting on/off Alternates on method call.
|
virtual |
Change the visibility of currently selected window object This will change the visibility of all its children.
|
virtual |
Get the agent from the map at the param in key, get the position of the DtWindowObject() from the agent, then shift the position in the passed in direction by 0.1 This method will get the top parent window polygon from DtWindowObjectMap and move it around the screen, any attached children will move too.
|
virtual |
Scale vertex methods This method will get the top parent window polygon from DtWindowObjectMap and scale it , any attached children will be scaled too.
|
virtual |
Rotate the currently selected window object Rotates anti clockwise in rads.
|
virtual |
|
protectedvirtual |
Called when the driver is started by the display engine Restores state that existed the last time the driver was stopped.
Implements makVrv::DtDriver.
|
protectedvirtual |
Called when the driver is stopped by the display engine.
Implements makVrv::DtDriver.
|
protectedvirtual |
Stub implementation since this driver doesn't have anything that needs updating.
Implements makVrv::DtDriver.
|
protected |
Vector of the window agents.
|
protected |
Location in the vector of the currently selected window object for control Checks vector bounds.
|
protected |
The Object that is currently being moved This is a key for the myWindowAgentsMap.
|
protected |
Whether the next created object will be a child of the previously created object.
|
protected |
Surface for clipping window objects.
|
protected |
Polygon for displaying clipping surface.