Home | Hierarchy | Members | Alphabetical | Related Pages |
#include <geolod.h>
Inherits Node.
Public Member Functions | |
GeoLOD (const char *name="") | |
virtual | ~GeoLOD () |
virtual unsigned int | nbFields () const |
virtual FieldHandle | field (const std::string &n) |
virtual FieldHandle | field (unsigned int i) |
virtual bool | isSetToDefaultValue (unsigned int i) const |
virtual unsigned int | nbEventsIn () const |
virtual EventInHandle | eventIn (const std::string &n) |
virtual EventInHandle | eventIn (unsigned int i) |
virtual unsigned int | nbEventsOut () const |
virtual EventOutHandle | eventOut (const std::string &n) |
virtual EventOutHandle | eventOut (unsigned int i) |
const char * | typeName () const |
virtual Node * | duplicate () const |
virtual Node * | duplicate (std::map< const Node *, Node * > &) const |
Public Attributes | |
Fields | |
A property or attribute of a node. Each node type has a fixed set of fields. Fields may contain various kinds of data and one or many values. Each field has a default value. | |
SFString | center |
MFString | child1Url |
MFString | child2Url |
MFString | child3Url |
MFString | child4Url |
SFNode | geoOrigin |
MFString | geoSystem |
SFFloat | range |
MFString | rootUrl |
MFNode | rootNode |
Events Out | |
EventOut< MFNode > | children |
The GeoLOD node provides a terrain specialized form of the LOD node. It is a grouping node that specifies two different levels of detail for an object using a tree structure, where 0 to 4 children can be specified, and also efficiently manages the loading and unloading of these levels of detail.
The level of detail is switched depending upon whether the user is closer or further than range metres from the geospatial coordinate that is defined by the field center. The format of the center field is described in 4.15.4, Encoding geospatial coordinates.
The geoOrigin field is used to specify a local coordinate frame for extended precision as described in 4.15.5 Dealing with high-precision coordinates.
The geoSystem field is used to define the spatial reference frame and is described in 4.15.3, Encoding a spatial reference frame.
When the user is outside the specified range, only the geometry for rootUrl or rootNode are displayed. When the viewer enters the specified range, this geometry is replaced with the contents of the four children files defined by child1Url through child4Url. The four children files are loaded into memory only when the user is within the specified range. Similarly, these are unloaded from memory when the user leaves this range. Figure 6.9 illustrates this process. Note however that there is no requirement that the child URLs be arranged in the same order as in the figure, i.e. child1Url does not need to represent the bottom-left quadtree child. Note also that it is valid to specify less than 4 child URLs, in which case the GeoLOD should switch to the children nodes when all of the specified URLs have been loaded. This latter feature can support tree structures other than quadtrees, such as binary trees.
The rootUrl and rootNode fields provide two different ways to specify the geometry of the root tile. The rootNode field may be used to include the geometry for the root tile directly within the VRML file; whereas the rootUrl field specifies a URL for a file that contains the geometry. The result of specifying a value for both of these fields is undefined.
The children eventOut is used to expose the scene graph for the currently loaded set of nodes. The value returned is an MFNode with a single Switch node. This Switch node contains the root nodes in the first node of the choice field, and all the currently loaded children nodes in the second node of the choice field. The whichChoice field of the Switch node determines whether the root (0) or the children nodes (1) are being displayed. The GeoLOD node will generate a new children eventOut every time the scene graph is changed (e.g., whenever nodes are loaded or unloaded).
The GeoLOD node may be implemented with support for a cache of the most recent nodes that have been loaded. This cache should be global across all GeoLOD instances in a scene. This will improve performance when navigating large terrain models by avoiding excessive loading and unloading when a user makes small changes in viewpoint.
GeoLOD | ( | const char * | name = "" |
) |
~GeoLOD | ( | ) | [virtual] |
Virtual destructor, does nothing
unsigned int nbFields | ( | ) | const [inline, virtual] |
Returns the number of fields (exposed or not) for this node type.
Implements Node.
wrl::Node::FieldHandle field | ( | const std::string & | n | ) | [virtual] |
Return a handle on the field named n
of the node or a "unknown" typed handle if there is no such field. Valid names are:
Implements Node.
wrl::Node::FieldHandle field | ( | unsigned int | n | ) | [virtual] |
Return a handle on the i
th field of the node or a "unknown" typed handle if there is no such node. Here is how i
is related to fields:
Implements Node.
bool isSetToDefaultValue | ( | unsigned int | i | ) | const [virtual] |
Implements Node.
unsigned int nbEventsIn | ( | ) | const [inline, virtual] |
Returns the number of events in for this node type.
Implements Node.
wrl::Node::EventInHandle eventIn | ( | const std::string & | n | ) | [virtual] |
Return a handle on the event in named n
of the node or a "unknown" typed handle if there is no such event. Valid names are:
Implements Node.
wrl::Node::EventInHandle eventIn | ( | unsigned int | i | ) | [virtual] |
Return a handle on the i
th event in of the node or a "unknown" typed handle if there is no such node. emarks This class has no eventIn. This function is useful, with nbEventsIn() if you want to traverse all events in of a Node.
Implements Node.
unsigned int nbEventsOut | ( | ) | const [inline, virtual] |
Returns the number of events out for this node type.
Implements Node.
wrl::Node::EventOutHandle eventOut | ( | const std::string & | n | ) | [virtual] |
Return a handle on the event out named n
of the node or a "unknown" typed handle if there is no such event. Valid names are:
Implements Node.
wrl::Node::EventOutHandle eventOut | ( | unsigned int | n | ) | [virtual] |
Return a handle on the i
th event out of the node or a "unknown" typed handle if there is no such node. Here is how i
is related to fields:
Implements Node.
const char * typeName | ( | ) | const [inline, virtual] |
Returns "GeoLOD"
. Useful for printing.
Implements Node.
wrl::Node * duplicate | ( | ) | const [virtual] |
Returns a deep copy of this node, that is a fully independant node with all children (if any) also copied. This is mainly useful for instanciating protos.
Implements Node.
See Detailed Description for meaning of this field. Default value is set to
center = string("");
See Detailed Description for meaning of this field. Default value is set to MFString default value
See Detailed Description for meaning of this field. Default value is set to MFString default value
See Detailed Description for meaning of this field. Default value is set to MFString default value
See Detailed Description for meaning of this field. Default value is set to MFString default value
See Detailed Description for meaning of this field. Default value is set to SFNode default value
See Detailed Description for meaning of this field. Default value is set to
See Detailed Description for meaning of this field. Default value is set to
range = 10.0f;
See Detailed Description for meaning of this field. Default value is set to MFString default value
See Detailed Description for meaning of this field. Default value is set to MFNode default value
See Detailed Description for meaning of this event.
Generated on 5 Jan 2007 with
![]() |
|