SmallChange
1.0.0
A collection of extensions to Coin3D
|
The UTMPosition class is a node type for specifying geometry translations. More...
#include <SmallChange/nodes/UTMPosition.h>
Public Member Functions | |
UTMPosition (void) | |
virtual void | callback (SoCallbackAction *action) |
virtual void | doAction (SoAction *action) |
virtual void | getBoundingBox (SoGetBoundingBoxAction *action) |
virtual void | getMatrix (SoGetMatrixAction *action) |
virtual void | getPrimitiveCount (SoGetPrimitiveCountAction *action) |
virtual void | GLRender (SoGLRenderAction *action) |
virtual void | pick (SoPickAction *action) |
Static Public Member Functions | |
static void | initClass (void) |
Public Attributes | |
SoSFVec3d | utmposition |
Protected Member Functions | |
virtual | ~UTMPosition () |
virtual void | notify (SoNotList *nl) |
The UTMPosition class is a node type for specifying geometry translations.
It should be used in conjunction with the UTMCamera node. The UTMPosition node will not be useful unless your camera is an UTMCamera.
This node makes it possible for you to stop thinking about floating point precision when building a, for instance, real-world model using UTM coordinates. As long as your objects are placed in the scene using an UTMPosition node, they will, internally, always be placed relative to the position of the UTMCamera. This way it doesn't matter if you're using large coordinates.
If you use this node, do not have transformation nodes over any UTMPosition nodes in your scene graph. This will make it impossible to calculate the new relative position. You are free to have transformation nodes under UTMPositon nodes (as long as they are inside an SoSeparator node), of course.
BUGS: This node will currently not work as expected when used inside a SoTransformSeparator. For this to work, the current relative translation would need to be stored and restored in the SoTransformSeparator traversal code. And, because of SGI's silly decision not to support action methods for GLRenderAction after Inventor 2.1, I cannot replace SoTransformSeparator::GLRender with an improved one...
UTMPosition::UTMPosition | ( | void | ) |
Constructor.
|
protectedvirtual |
Destructor.
|
virtual |
Coin method.
|
virtual |
Coin method.
|
virtual |
Coin method.
|
virtual |
Coin method.
|
virtual |
Coin method.
Overridden to invalidate cache when some field change.
|
virtual |
Coin method.
SoSFVec3d UTMPosition::utmposition |
Decides the translation of the geometry following this node.
The positioning will replace preceding values, and not accumulate with them as for the standard transform nodes.