VR-Forces Developer's Guide
 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. 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.

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

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
 
DtAgentManageragentManager ()
 
virtual DtAgentManagerInterfacesceneInterface ()
 
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
DtAgentManagermyAgentManager
 
bool myStartedFlag
 
std::string myName
 
DtConfiguration myConfiguration
 
bool myPersistentFlag
 
bool myUserControllableFlag
 
bool myRequestStateDiffPendingFlag
 
DtElementChanges myChanges
 

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 anti 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 Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)