H3D API  2.4.1
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
H3D::ViewpointGroup Class Reference

ViewpointGroup is used to control display of viewpoints on the viewpoint list. More...

#include <H3D/ViewpointGroup.h>

Inheritance diagram for H3D::ViewpointGroup:
Inheritance graph

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.
 
- Public Member Functions inherited from H3D::X3DChildNode
 X3DChildNode (Inst< SFNode > _metadata=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DNode
 X3DNode (Inst< SFNode > _metadata=0)
 Constructor.
 
X3DMetadataObjectgetMetadataByName (const string &_name)
 Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More...
 
- Public Member Functions inherited from H3D::Node
 Node ()
 Constructor.
 
virtual Nodeclone (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.
 
X3DPrototypeInstancegetProtoInstanceParent ()
 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 FieldgetField (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 Public Member Functions inherited from H3D::Node
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< SFVec3fcenter
 The center field provides a position offset from origin of local coordinate system. More...
 
H3DUniquePtr< MFChildchildren
 The children field is a sequence of nodes of type X3DViewpointNode. More...
 
H3DUniquePtr< SFStringdescription
 The description field provides a simple description or navigation hint to be displayed for this ViewpointGroup. More...
 
H3DUniquePtr< SFBooldisplayed
 The displayed field determines whether this ViewpointGroup is displayed in the current viewpoint list. More...
 
H3DUniquePtr< SFBoolretainUserOffsets
 The retainUserOffsets field specifies whether the user is returned to the originally defined viewpoint position/orientation after local navigation. More...
 
H3DUniquePtr< SFVec3fsize
 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.
 
- Public Attributes inherited from H3D::X3DNode
H3DUniquePtr< SFNodemetadata
 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

- Public Types inherited from H3D::Node
typedef std::map< Node *, Node * > DeepCopyMap
 A map type used during a deep copy clone() to map from original nodes to cloned nodes.
 
- Static Public Attributes inherited from H3D::X3DNode
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Protected Member Functions inherited from H3D::Node
void cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for the clone() method. More...
 
- Static Protected Member Functions inherited from H3D::Node
static NodegetClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for nodes that implement clone() More...
 

Detailed Description

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:

Member Function Documentation

◆ traverseSG()

void ViewpointGroup::traverseSG ( TraverseInfo ti)
virtual

Traverse the scenegraph.

Check changes of viewpoint position since last scene graph traversal.

Parameters
tiThe 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.

Member Data Documentation

◆ center

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().

◆ children

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().

◆ description

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().

◆ displayed

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().

◆ retainUserOffsets

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().

◆ size

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().


The documentation for this class was generated from the following files: