VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtWindowObjectsDriver Class Reference

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. More...

Inheritance diagram for makVrv::DtWindowObjectsDriver:
Inheritance graph
[legend]

Public Types

enum  DtDirection { Up = 0, Left = 1, Down = 2, Right = 4 }
 Enum for moving window objects. More...
 
typedef std::vector
< DtWindowObjectAgent * > 
DtWindowObjects
 typedef vector for holding DtWindowObjectAgents More...
 

Public Member Functions

 DtWindowObjectsDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR. More...
 
virtual ~DtWindowObjectsDriver ()
 Virtual DTOR. More...
 
virtual const std::string & className () const
 Get the class name as a string. More...
 
virtual void drawObject ()
 Draw a window object. More...
 
virtual void drawPolygon ()
 Draw a polygon. More...
 
virtual void drawLine ()
 Draw a line. More...
 
virtual void drawText ()
 Draw test. More...
 
virtual void drawEllipse ()
 Draw a ellipse. More...
 
virtual void activateObjectType (int objectType)
 Select which type of window object to draw. More...
 
virtual void modifyActivateObjectId (bool increaseIdNumber)
 Select which window object to current modify. More...
 
virtual void setParenting ()
 Set parenting on/off Alternates on method call. More...
 
virtual void modifyObjectVisibility ()
 Change the visibility of currently selected window object This will change the visibility of all its children. More...
 
virtual void shiftWindowObjectPosition (DtDirection direction)
 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. More...
 
virtual void scaleWindowObject (DtDirection direction)
 Scale vertex methods This method will get the top parent window polygon from DtWindowObjectMap and scale it , any attached children will be scaled too. More...
 
virtual void rotateWindowObject ()
 Rotate the currently selected window object Rotates clockwise in rads. More...
 
virtual DtWindowObjectAgent * findWindowObjectAgent (int vecLocation)
 
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR. More...
 
virtual ~DtDriver ()
 DTOR. More...
 
virtual void realizeConfiguration (const DtConfiguration &configuration)
 Realize the driver using the configuration. More...
 
virtual DtConfiguration createConfiguration () const
 Create a configuration for the driver. More...
 
DtAgentManageragentManager ()
 Get the master scene for this host. More...
 
virtual DtAgentManagerInterfacesceneInterface ()
 Get the scene manager interface for creating agents. More...
 
bool started () const
 Get this driver's active state. More...
 
virtual const std::string & instanceName () const
 Get this driver's instance name. More...
 
virtual bool autoStart () const
 Get whether this driver is set to automatically start if it is persistent. More...
 
virtual void setAutoStart (bool autoStart)
 Set whether this driver automatically starts if it is persistent. More...
 
virtual bool isWindowDependent () const
 Get whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed. More...
 
virtual void setIsWindowDependent (bool dep)
 Set whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed. More...
 
virtual void setIsUserControllable (bool)
 Set whether this driver can be started and stopped by the user. More...
 
virtual bool isUserControllable () const
 Get whether this driver can be started and stopped by the user. More...
 
virtual void setIsPersistent (bool per)
 Set if the driver is persistent and should be saved between runs. More...
 
virtual bool isPersistent () const
 Get if the driver is persistent and should be saved between runs. More...
 
virtual bool isOnDriverSelectionList () const
 Returns whether or not this driver is to be automatically started/stopped from the driver selection list. More...
 
virtual void setOnDriverSelectionList (bool)
 Sets whether or not this item is on the driver selection list. More...
 
bool objectFromAgentManager (const DtUniqueID &id) const
 check to see if the object was created using this driver's agent manager. More...
 

Protected Member Functions

virtual bool onStart ()
 Called when the driver is started by the display engine Restores state that existed the last time the driver was stopped. More...
 
virtual bool onStop ()
 Called when the driver is stopped by the display engine. More...
 
virtual bool onTick ()
 Stub implementation since this driver doesn't have anything that needs updating. More...
 
- Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 Function for apply changes from a changes object and deleting it. More...
 
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 Report an element created. More...
 
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 Report an element attribute changed. More...
 
void reportElementDestroyed (DtElementID id)
 Report an element destroyed. More...
 
void start ()
 Start the driver. More...
 
void stop ()
 Stop the driver. More...
 
bool tick ()
 Tick the host driver. More...
 
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 Called when a display engine is added. More...
 
virtual void setInstanceName (const std::string &name)
 set the Instance name. More...
 
virtual void installAccessories ()
 Installs accessories on this driver. More...
 
virtual void uninstallAccessories ()
 Removes accessories from this driver. More...
 

Protected Attributes

DtWindowObjects myWindowAgents
 Vector of the window agents. More...
 
int myActivatedObjectType
 Location in the vector of the currently selected window object for control Checks vector bounds. More...
 
int myActivatedObjectId
 The Object that is currently being moved This is a key for the myWindowAgentsMap. More...
 
bool myParenting
 Whether the next created object will be a child of the previously created object. More...
 
DtWindowSurfaceAgent * mySurface
 Surface for clipping window objects. More...
 
DtWindowPolygonAgent * mySurfaceClipBoxVisualPoly
 Polygon for displaying clipping surface. More...
 
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
 
bool myStartedFlag
 
std::string myName
 
DtConfiguration myConfiguration
 
bool myPersistentFlag
 
bool myUserControllableFlag
 
bool myRequestStateDiffPendingFlag
 
DtElementChanges myChanges
 

Detailed Description

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.

Member Typedef Documentation

typedef std::vector<DtWindowObjectAgent*> makVrv::DtWindowObjectsDriver::DtWindowObjects

typedef vector for holding DtWindowObjectAgents

Member Enumeration Documentation

Enum for moving window objects.

Enumerator
Up 
Left 
Down 
Right 

Constructor & Destructor Documentation

makVrv::DtWindowObjectsDriver::DtWindowObjectsDriver ( DtAgentManager agentManager,
const std::string &  instanceName 
)

CTOR.

virtual makVrv::DtWindowObjectsDriver::~DtWindowObjectsDriver ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual const std::string& makVrv::DtWindowObjectsDriver::className ( ) const
virtual

Get the class name as a string.

Implements makVrv::DtDriver.

virtual void makVrv::DtWindowObjectsDriver::drawObject ( )
virtual

Draw a window object.

Draws the type of object activated via keyboard inputs default is polygon

virtual void makVrv::DtWindowObjectsDriver::drawPolygon ( )
virtual

Draw a polygon.

virtual void makVrv::DtWindowObjectsDriver::drawLine ( )
virtual

Draw a line.

virtual void makVrv::DtWindowObjectsDriver::drawText ( )
virtual

Draw test.

virtual void makVrv::DtWindowObjectsDriver::drawEllipse ( )
virtual

Draw a ellipse.

virtual void makVrv::DtWindowObjectsDriver::activateObjectType ( int  objectType)
virtual

Select which type of window object to draw.

virtual void makVrv::DtWindowObjectsDriver::modifyActivateObjectId ( bool  increaseIdNumber)
virtual

Select which window object to current modify.

virtual void makVrv::DtWindowObjectsDriver::setParenting ( )
virtual

Set parenting on/off Alternates on method call.

virtual void makVrv::DtWindowObjectsDriver::modifyObjectVisibility ( )
virtual

Change the visibility of currently selected window object This will change the visibility of all its children.

virtual void makVrv::DtWindowObjectsDriver::shiftWindowObjectPosition ( DtDirection  direction)
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 void makVrv::DtWindowObjectsDriver::scaleWindowObject ( DtDirection  direction)
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 void makVrv::DtWindowObjectsDriver::rotateWindowObject ( )
virtual

Rotate the currently selected window object Rotates clockwise in rads.

virtual DtWindowObjectAgent* makVrv::DtWindowObjectsDriver::findWindowObjectAgent ( int  vecLocation)
virtual
virtual bool makVrv::DtWindowObjectsDriver::onStart ( )
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.

virtual bool makVrv::DtWindowObjectsDriver::onStop ( )
protectedvirtual

Called when the driver is stopped by the display engine.

Implements makVrv::DtDriver.

virtual bool makVrv::DtWindowObjectsDriver::onTick ( )
protectedvirtual

Stub implementation since this driver doesn't have anything that needs updating.

Implements makVrv::DtDriver.

Member Data Documentation

DtWindowObjects makVrv::DtWindowObjectsDriver::myWindowAgents
protected

Vector of the window agents.

int makVrv::DtWindowObjectsDriver::myActivatedObjectType
protected

Location in the vector of the currently selected window object for control Checks vector bounds.

int makVrv::DtWindowObjectsDriver::myActivatedObjectId
protected

The Object that is currently being moved This is a key for the myWindowAgentsMap.

bool makVrv::DtWindowObjectsDriver::myParenting
protected

Whether the next created object will be a child of the previously created object.

DtWindowSurfaceAgent* makVrv::DtWindowObjectsDriver::mySurface
protected

Surface for clipping window objects.

DtWindowPolygonAgent* makVrv::DtWindowObjectsDriver::mySurfaceClipBoxVisualPoly
protected

Polygon for displaying clipping surface.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)