| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/switch.h>

Public Member Functions | |
| Switch (Iterator< SO< PolyAttribute > > *attritr=0, Iterator< bool > *flagitr=0) | |
| virtual ID | target () const =0 |
| virtual unsigned int | size () const |
| "size" returns the number of switched poly attributes in the switch. | |
| virtual void | add (PolyAttribute *attr, bool switchFlag) |
| "add" is used to insert an attribute and the switch position into the switch. | |
| virtual void | remove (PolyAttribute *attr) |
| "remove" is used to delete an attribute of the switch. | |
| virtual unsigned int | getIndex (PolyAttribute *attr) const |
| "getIndex" is used to get the internal array-position of the attribute. | |
| virtual void | setAttribute (unsigned int index, PolyAttribute *) |
| set attribute at position "index" to a new value | |
| virtual PolyAttribute * | getAttribute (unsigned int index) const |
| get attribute at position "index" | |
| virtual void | setFlag (unsigned int index, bool switchFlag) |
| modify flag at position "index", i.e., whether the attribute at index is turned on or off | |
| virtual bool | getFlag (unsigned int index) const |
| read flag at position "index", i.e. whether the attribute at index is turned on or off | |
| virtual bool | invertFlag (unsigned int index) |
| inverts flag at position "index", i.e. whether the attribute at index is turned on or off | |
| virtual void | setAttribute (PolyAttribute *, PolyAttribute *) |
| virtual void | setFlag (PolyAttribute *, bool switchFlag) |
| virtual bool | getFlag (PolyAttribute *) const |
| virtual bool | invertFlag (PolyAttribute *) |
| VRS_TYPEINFO (Switch, MonoAttribute) | |
| VRS_SERIALIZABLE_ABSTRACT_CLASS (Switch) | |
Protected Member Functions | |
| virtual void | checkType (PolyAttribute *) |
| VRS::Switch::Switch | ( | Iterator< SO< PolyAttribute > > * | attritr = 0, |
|
| Iterator< bool > * | flagitr = 0 | |||
| ) |
The constructor expects an iterator containing polyattributes and an iterator containing boolean values indication the new setting. Both iterators must have the same number of arguments.
| virtual ID VRS::Switch::target | ( | ) | const [pure virtual] |
ID of the poly attributes which can be switched by the switch. A switch can only handle poly attributes of one category! This method has to be overwritten by subclasses.
Implemented in VRS::LightSwitch, VRS::MirroredSwitch, VRS::ShadowCasterSwitch, and VRS::ShadowedSwitch.
| unsigned int VRS::Switch::size | ( | void | ) | const [inline, virtual] |
"size" returns the number of switched poly attributes in the switch.
| virtual void VRS::Switch::add | ( | PolyAttribute * | attr, | |
| bool | switchFlag | |||
| ) | [virtual] |
"add" is used to insert an attribute and the switch position into the switch.
| virtual void VRS::Switch::remove | ( | PolyAttribute * | attr | ) | [virtual] |
"remove" is used to delete an attribute of the switch.
| virtual unsigned int VRS::Switch::getIndex | ( | PolyAttribute * | attr | ) | const [virtual] |
"getIndex" is used to get the internal array-position of the attribute.
| virtual void VRS::Switch::setAttribute | ( | unsigned int | index, | |
| PolyAttribute * | ||||
| ) | [virtual] |
set attribute at position "index" to a new value
| virtual PolyAttribute* VRS::Switch::getAttribute | ( | unsigned int | index | ) | const [virtual] |
get attribute at position "index"
| virtual void VRS::Switch::setFlag | ( | unsigned int | index, | |
| bool | switchFlag | |||
| ) | [virtual] |
modify flag at position "index", i.e., whether the attribute at index is turned on or off
| virtual bool VRS::Switch::getFlag | ( | unsigned int | index | ) | const [virtual] |
read flag at position "index", i.e. whether the attribute at index is turned on or off
| virtual bool VRS::Switch::invertFlag | ( | unsigned int | index | ) | [virtual] |
inverts flag at position "index", i.e. whether the attribute at index is turned on or off
| virtual void VRS::Switch::setAttribute | ( | PolyAttribute * | , | |
| PolyAttribute * | ||||
| ) | [virtual] |
| virtual void VRS::Switch::setFlag | ( | PolyAttribute * | , | |
| bool | switchFlag | |||
| ) | [virtual] |
| virtual bool VRS::Switch::getFlag | ( | PolyAttribute * | ) | const [virtual] |
| virtual bool VRS::Switch::invertFlag | ( | PolyAttribute * | ) | [virtual] |
Same methods again, this time using an attribute instead of an index to find out which Attribute/Flag to change. These methods are only present for convenience, as they are a short form for { unsigned int index=getIndex(AttributeToChange); MethodName(index, ?SecondArgumentWhenPresent?); }
| VRS::Switch::VRS_TYPEINFO | ( | Switch | , | |
| MonoAttribute | ||||
| ) |
| VRS::Switch::VRS_SERIALIZABLE_ABSTRACT_CLASS | ( | Switch | ) |
| virtual void VRS::Switch::checkType | ( | PolyAttribute * | ) | [protected, virtual] |