VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
12.8 - Remote Graphic Sets

You can group Draw Control objects to control their visibility.

Showing a set is equivalent to showing each object and any other subordinate sets. These sets are communicated to VR-Forces and appear in the Remote Graphics panel. This panel allows sets to be hidden and shown.

Draw control objects can be added to or removed from sets. You can also add subordinate sets to a set. A set is created implicitly when you add an object to it.

The following example adds two draw control objects to the Squares set. They are pointed to by DtDrawControlObject* pointers square1 and square2.

square1->setRemoteGraphicSet("Squares");
square2->setRemoteGraphicSet("Squares");

To hide everything on the shapes layer, do this:

DtVrvControlMessageMarshaller<DtDataInteraction> marshaller;
DtRemoteGraphicSet_v1 rgCommand;
sprintf(rgCommand.mySetName, "Squares");
rgCommand.myState = false;
marshaller.encode(&rgCommand, &dataInter);
exConn.sendStamped(dataInter);

To show the (now hidden) squares using the squares layer:

DtVrvControlMessageMarshaller<DtDataInteraction> marshaller;
DtRemoteGraphicSet_v1 rgCommand;
sprintf(rgCommand.mySetName, "Squares");
rgCommand.myState = true;
marshaller.encode(&rgCommand, &dataInter);
exConn.sendStamped(dataInter);

You can group sets hierarchically using double colon (::) syntax. For example, "Squares::Blue" and "Squares::Red" would result in the following hierarchy:

vrv_remotesethierarchy.png
Remote Graphic Sets Hierarchy

[<< Attributes] [Home] [Top of Page]


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)