H3D API
2.4.1
|
ViewpointGroup is used to control display of viewpoints on the viewpoint list. More...
#include <H3D/ViewpointGroup.h>
Classes | |
class | MFChild |
Type class of children field. More... | |
Public Member Functions | |
ViewpointGroup (Inst< SFVec3f > _center=0, Inst< MFChild > _children=0, Inst< SFString > _description=0, Inst< SFBool > _displayed=0, Inst< SFNode > _metadata=0, Inst< SFBool > _retainUserOffsets=0, Inst< SFVec3f > _size=0) | |
Constructor. | |
virtual void | traverseSG (TraverseInfo &ti) |
Traverse the scenegraph. More... | |
bool | containsViewpoint (X3DViewpointNode *vp) const |
Returns true if the given viewpoint is in the children field of this ViewpointGroup. | |
bool | isTopLevel () |
Returns true if this node exists outside of another ViewpointGroup. | |
bool | inSceneGraph () |
Returns true if this node exists in the scene graph. | |
![]() | |
X3DChildNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
![]() | |
X3DNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
X3DMetadataObject * | getMetadataByName (const string &_name) |
Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More... | |
![]() | |
Node () | |
Constructor. | |
virtual Node * | clone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL) |
Returns a new instance of this node type with the same state as this one. More... | |
virtual | ~Node () |
Destructor. | |
X3DPrototypeInstance * | getProtoInstanceParent () |
If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More... | |
void | setProtoInstanceParent (X3DPrototypeInstance *p) |
Set the X3DPrototypeInstance this node is the the root node if applicaple. | |
virtual void | render () |
the render() function is used for the depth-first rendering traversal of the scene-graph. More... | |
virtual bool | lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result) |
Detect intersection between a line segment and the Node. More... | |
virtual void | closestPoint (const Vec3f &p, NodeIntersectResult &result) |
Find closest point on Node to p. More... | |
virtual bool | movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result) |
Detect collision between a moving sphere and the Node. More... | |
virtual string | defaultXMLContainerField () |
Returns the default xml containerField attribute value. More... | |
virtual Field * | getField (const string &_name) const |
return a pointer to the field specified by name within this instance | |
int | addDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
int | removeDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
Static Public Member Functions | |
static const ViewpointGroupList & | getAllViewpointGroups () |
Returns a list of all current ViewpointGroup instances. | |
static bool | viewpointGroupsChanged () |
True on any addition/deletion/in_scene_graph status change of viewpoint group, reset once inquired. | |
![]() | |
static unsigned int | nrNodesAlive () |
Returns the nr of nodes currently alive, i.e. nodes created but not destructed. | |
static int | nrNodesCreated () |
Returns the number of nodes created in total since the start of the program. | |
Public Attributes | |
H3DUniquePtr< SFVec3f > | center |
The center field provides a position offset from origin of local coordinate system. More... | |
H3DUniquePtr< MFChild > | children |
The children field is a sequence of nodes of type X3DViewpointNode. More... | |
H3DUniquePtr< SFString > | description |
The description field provides a simple description or navigation hint to be displayed for this ViewpointGroup. More... | |
H3DUniquePtr< SFBool > | displayed |
The displayed field determines whether this ViewpointGroup is displayed in the current viewpoint list. More... | |
H3DUniquePtr< SFBool > | retainUserOffsets |
The retainUserOffsets field specifies whether the user is returned to the originally defined viewpoint position/orientation after local navigation. More... | |
H3DUniquePtr< SFVec3f > | size |
The size field provides the size of a proximity box within which the ViewpointGroup is usable and displayed on the viewpoint list. More... | |
bool | display_in_list |
Flag to show whether this ViewpointGroup should be displayed in browser list of viewpoints. | |
![]() | |
H3DUniquePtr< SFNode > | metadata |
Meta data about the node. More... | |
Protected Attributes | |
bool | is_top_level |
True if this ViewpointGroup exists outside of a another ViewpointGroup. | |
bool | in_scene_graph |
True if this ViewpointGroup exists in scene graph. | |
Additional Inherited Members | |
![]() | |
typedef std::map< Node *, Node * > | DeepCopyMap |
A map type used during a deep copy clone() to map from original nodes to cloned nodes. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
![]() | |
void | cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for the clone() method. More... | |
![]() | |
static Node * | getClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for nodes that implement clone() More... | |
ViewpointGroup is used to control display of viewpoints on the viewpoint list.
Use of ViewpointGroup allows a viewpoint list to have a tree structure, similar to a bookmark list.
The children field is a sequence of nodes of type X3DViewpointNode.
The description field provides a simple description or navigation hint to be displayed for this ViewpointGroup.
The displayed field determines whether this ViewpointGroup is displayed in the current viewpoint list.
The center and size fields are defined identically as the corresponding ProximitySensor definitions. The center field provides a position offset from origin of local coordinate system. The size field provides the size of a proximity box within which the ViewpointGroup is usable and displayed on the viewpoint list. A size field of 0 0 0 specifies that the ViewpointGroup is always usable and displayed.
The retainUserOffsets field specifies whether the user is returned to the originally defined viewpoint position/orientation after local navigation.
Examples:
|
virtual |
Traverse the scenegraph.
Check changes of viewpoint position since last scene graph traversal.
ti | The TraverseInfo object containing information about the traversal. |
Reimplemented from H3D::Node.
References center, children, H3D::TraverseInfo::deleteUserData(), display_in_list, displayed, H3D::X3DViewpointNode::getActive(), H3D::TraverseInfo::getUserData(), in_scene_graph, is_top_level, H3D::TraverseInfo::setUserData(), size, and H3D::X3DViewpointNode::totalPosition.
H3DUniquePtr< SFVec3f > H3D::ViewpointGroup::center |
The center field provides a position offset from origin of local coordinate system.
Access type: inputOutput
Default value: 0 0 0
Referenced by traverseSG(), and ViewpointGroup().
H3DUniquePtr< MFChild > H3D::ViewpointGroup::children |
The children field is a sequence of nodes of type X3DViewpointNode.
Access type: inputOutput
Default value: NULL
Referenced by containsViewpoint(), and traverseSG().
H3DUniquePtr< SFString > H3D::ViewpointGroup::description |
The description field provides a simple description or navigation hint to be displayed for this ViewpointGroup.
Access type: inputOutput
Default value: ""
Referenced by ViewpointGroup().
H3DUniquePtr< SFBool > H3D::ViewpointGroup::displayed |
The displayed field determines whether this ViewpointGroup is displayed in the current viewpoint list.
Access type: inputOutput
Default value: TRUE
Referenced by traverseSG(), and ViewpointGroup().
H3DUniquePtr< SFBool > H3D::ViewpointGroup::retainUserOffsets |
The retainUserOffsets field specifies whether the user is returned to the originally defined viewpoint position/orientation after local navigation.
Access type: inputOutput
Default value: FALSE
Referenced by ViewpointGroup().
H3DUniquePtr< SFVec3f > H3D::ViewpointGroup::size |
The size field provides the size of a proximity box within which the ViewpointGroup is usable and displayed on the viewpoint list.
A size field of 0 0 0 specifies that the ViewpointGroup is always usable and displayed.
Access type: inputOutput
Default value: TRUE
Referenced by traverseSG(), and ViewpointGroup().