H3D API
2.4.1
|
DependentSFNode are modified TypedSFNode fields where the field dirty status is dependent on fields in the node it contains. More...
#include <H3D/DependentNodeFields.h>
Public Member Functions | |
DependentSFNode () | |
Constructor. Default value of value is NULL. | |
virtual | ~DependentSFNode () |
Destructor. | |
DependentSFNode are modified TypedSFNode fields where the field dirty status is dependent on fields in the node it contains.
E.g. if we have a Coordinate node, a TypedSFNode< Coordinate > would only generate an event to fields it is routed to if the Coordinate node itself is changed. If the points in the Coordinate nodes point field are changed however no event is generated. With a DependentSFNode you can specify that the field is dependent on e.g. the 'point' field of the Node and then the field will generate an event when the point field in the Coordinate node generates an event.
In the example above the Node that is set in the field must always be of the type that is specified in the FieldRef. But if you e.g. have a MFChild field and want to be dependent on the displayList field of the children nodes that have one(i.e. inherits from H3DDisplayListObject then you can specify that as
It is the last parameter set to true that will ignore all Nodes that are not of H3DDisplayListObject.