SoGeoOrigin(3)
π SoGeoOrigin π
okay bestie, welcome to the manual page for SoGeoOrigin, straight out of the Library Functions Manual. It's a SoGeoOrigin(3) situation and we're gonna get into it π
SoGeoOrigin β the class that lets you pin down one absolute geographic location, and then everything else's geometry gets referenced against that spot. Iconic, honestly. Like dropping a pin and saying "everybody orient yourselves to HERE." πβ¨
π NAME π
SoGeoOrigin β this class is used to specify an absolute geographic location that geometry gets referenced against. That's the whole vibe. One anchor point, and the rest of your scene is like "okay so relative to her." π«Ά
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoGeoOrigin.h>
Lowkey important detail: it inherits SoNode. Family tree matters, bestie π³
π Public Member Functions π
πΈ SoGeoOrigin's own, no middleman πΈ
virtual SoType getTypeId (void) constβ hands you back the type id, virtual-style β¨SoGeoOrigin (void)β the constructor. the birth. the origin story (literally) πvirtual void doAction (SoAction *action)β does the action thing π«virtual void callback (SoCallbackAction *action)β runs the callback action, no capvirtual void GLRender (SoGLRenderAction *action)β the render moment. main character energy π₯virtual void getBoundingBox (SoGetBoundingBoxAction *action)β fetches the bounding box π¦virtual void getMatrix (SoGetMatrixAction *action)β grabs the matrix, matrixing away π§virtual void pick (SoPickAction *action)β pick action, as one doesvirtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)β counts the primitives, she's thorough π
π Public Member Functions inherited from SoNode
void setOverride (const SbBool state)β sets the override stateSbBool isOverride (void) constβ is it overriding? a question only she can answervoid setNodeType (const NodeType type)β sets the node typeNodeType getNodeType (void) constβ gets the node typevirtual SoNode * copy (SbBool copyconnections=FALSE) constβ copies, and the connections copy flag defaults toFALSEbtwvirtual SbBool affectsState (void) constβ does it affect state? inquiring mindsvirtual void GLRenderBelowPath (SoGLRenderAction *action)β renders below the path πvirtual void GLRenderInPath (SoGLRenderAction *action)β renders in the pathvirtual void GLRenderOffPath (SoGLRenderAction *action)β renders off the path (she contains multitudes)virtual void handleEvent (SoHandleEventAction *action)β handles the eventvirtual void rayPick (SoRayPickAction *action)β ray picks π¦virtual void search (SoSearchAction *action)β searchesvirtual void write (SoWriteAction *action)β writesvirtual void audioRender (SoAudioRenderAction *action)β audio render, sound on πvirtual void grabEventsSetup (void)β sets up the event grabbingvirtual void grabEventsCleanup (void)β cleans up the event grabbingvirtual void startNotify (void)β starts the notifyvirtual void notify (SoNotList *l)β notifies, with the listluint32_t getNodeId (void) constβ gets the node idvirtual SoChildList * getChildren (void) constβ gets the children π§Έvirtual void writeInstance (SoOutput *out)β writes the instance outvirtual SoNode * addToCopyDict (void) constβ adds herself to the copy dict, as she shouldvirtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)β copies contents from a field containervirtual SoFieldContainer * copyThroughConnection (void) constβ copies through the connection
π¦ Public Member Functions inherited from SoFieldContainer
void setToDefaults (void)β back to defaults, reset eraSbBool hasDefaultValues (void) constβ does it have default values?SbBool fieldsAreEqual (const SoFieldContainer *container) constβ are the fields equal to this container's? comparing girlies πvoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE)β copies field values; connections flag defaults toFALSESbBool set (const char *const fielddata)β sets from field datavoid get (SbString &fielddata)β gets field data into a stringvirtual int getFields (SoFieldList &l) constβ gets the fields into listlvirtual int getAllFields (SoFieldList &l) constβ gets all the fields, no crumbs leftvirtual SoField * getField (const SbName &name) constβ gets one field by namevirtual SoField * getEventIn (const SbName &name) constβ gets an event in by namevirtual SoField * getEventOut (const SbName &name) constβ gets an event out by nameSbBool getFieldName (const SoField *const field, SbName &name) constβ gets the name of a given fieldSbBool enableNotify (const SbBool flag)β toggles notify with a flagSbBool isNotifyEnabled (void) constβ is notify enabled?SbBool set (const char *fielddata, SoInput *input)β sets from field data, with anSoInputvoid get (SbString &fielddata, SoOutput *out)β gets field data out, with anSoOutputvirtual SbBool validateNewFieldValue (SoField *field, void *newval)β validates a new field valuevirtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)β adds a write reference;isfromfielddefaults toFALSESbBool getIsBuiltIn (void) constβ is it built in?virtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) constβ reports fields memory size in managed and unmanaged bucketsvoid setUserData (void *userdata) constβ sets user datavoid * getUserData (void) constβ gets user data back
π Public Member Functions inherited from SoBase
void ref (void) constβ refs her upvoid unref (void) constβ unrefs hervoid unrefNoDelete (void) constβ unref but no delete, sneakyint32_t getRefCount (void) constβ gets the ref countvoid touch (void)β touch. she felt that.SbBool isOfType (SoType type) constβ is she of this type?virtual SbName getName (void) constβ gets the namevirtual void setName (const SbName &newname)β sets a new namevoid addAuditor (void *const auditor, const SoNotRec::Type type)β adds an auditorvoid removeAuditor (void *const auditor, const SoNotRec::Type type)β removes an auditorconst SoAuditorList & getAuditors (void) constβ gets the auditor listSbBool shouldWrite (void)β should she write? only she knowsvoid assertAlive (void) constβ asserts she's alive. dramatic but valid π
β Static Public Member Functions β
π Her own π
static SoType getClassTypeId (void)β the class type id, staticallystatic void initClass (void)β initializes the class
π Inherited from SoNode π
static uint32_t getCompatibilityTypes (const SoType &nodetype)β gets compatibility types for a node typestatic SoType getClassTypeId (void)β class type idstatic SoNode * getByName (const SbName &name)β gets a node by namestatic int getByName (const SbName &name, SoNodeList &l)β gets by name, into a node liststatic void initClass (void)β init the classstatic void initClasses (void)β init ALL the classes, plural, she's ambitiousstatic uint32_t getNextNodeId (void)β gets the next node idstatic int getActionMethodIndex (const SoType type)β gets the action method indexstatic void getBoundingBoxS (SoAction *action, SoNode *node)β the static bounding box getterstatic void GLRenderS (SoAction *action, SoNode *node)β the static GL renderstatic void callbackS (SoAction *action, SoNode *node)β the static callbackstatic void getMatrixS (SoAction *action, SoNode *node)β the static matrix getterstatic void handleEventS (SoAction *action, SoNode *node)β the static event handlerstatic void pickS (SoAction *action, SoNode *node)β the static pickstatic void rayPickS (SoAction *action, SoNode *node)β the static ray pickstatic void searchS (SoAction *action, SoNode *node)β the static searchstatic void writeS (SoAction *action, SoNode *node)β the static writestatic void audioRenderS (SoAction *action, SoNode *node)β the static audio renderstatic void getPrimitiveCountS (SoAction *action, SoNode *node)β the static primitive counter
π Inherited from SoFieldContainer π
static void initClass (void)β initstatic SoType getClassTypeId (void)β class type idstatic void cleanupClass (void)β cleanup, the class gets a skincare routine π§static void initCopyDict (void)β init the copy dictstatic void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)β adds a copy, orig to copystatic SoFieldContainer * checkCopy (const SoFieldContainer *orig)β checks a copystatic SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)β finds a copy, with the connections flagstatic void copyDone (void)β copy done, periodt
π Inherited from SoBase π
static void initClass (void)β initstatic SoType getClassTypeId (void)β class type idstatic void addName (SoBase *const base, const char *const name)β adds a name to a basestatic void removeName (SoBase *const base, const char *const name)β removes a name from a basestatic void incrementCurrentWriteCounter (void)β bumps the current write counterstatic void decrementCurrentWriteCounter (void)β lowers the current write counterstatic SoBase * getNamedBase (const SbName &name, SoType type)β gets a named base by name and typestatic int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)β gets named bases into a base liststatic SbBool read (SoInput *input, SoBase *&base, SoType expectedtype)β reads, with the expected typestatic void setInstancePrefix (const SbString &c)β sets the instance prefixstatic void setTraceRefs (SbBool trace)β sets trace refsstatic SbBool getTraceRefs (void)β gets trace refsstatic SbBool connectRoute (SoInput *input, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)β connects a route, from node/field to node/field, so many params, she's doing the moststatic SbBool readRoute (SoInput *input)β reads a route
π Public Attributes π
SoSFVec3d geoCoordsβ the geo coords, in a single-fieldSoSFVec3dSoMFString geoSystemβ the geo system, a multi-fieldSoMFString(multi, because options, bestie)
π Protected Member Functions π
π Her own π
virtual const SoFieldData * getFieldData (void) constβ gets the field datavirtual ~SoGeoOrigin ()β the destructor, protected, don't touch π«
π Inherited from SoNode π
SoNode (void)β theSoNodeconstructorvirtual ~SoNode ()β theSoNodedestructorvirtual SbBool readInstance (SoInput *in, unsigned short flags)β reads an instance with flags
π Inherited from SoFieldContainer π
SoFieldContainer (void)β constructorvirtual ~SoFieldContainer ()β destructor
π Inherited from SoBase π
SoBase (void)β constructorvirtual ~SoBase ()β destructorvirtual void destroy (void)β destroy herSbBool hasMultipleWriteRefs (void) constβ does she have multiple write refs?SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constβ writes the header with group and engine flagsvoid writeFooter (SoOutput *out) constβ writes the footervirtual const char * getFileFormatName (void) constβ gets the file format name
π«§ Static Protected Member Functions π«§
πΊ Her own πΊ
static const SoFieldData ** getFieldDataPtr (void)β gets the field data pointer
πΊ Inherited from SoNode πΊ
static const SoFieldData ** getFieldDataPtr (void)β field data pointerstatic void setNextActionMethodIndex (int index)β sets the next action method indexstatic int getNextActionMethodIndex (void)β gets the next action method indexstatic void incNextActionMethodIndex (void)β increments the next action method indexstatic void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)β sets compatibility types with a bitmask
πΊ Inherited from SoBase πΊ
static uint32_t getCurrentWriteCounter (void)β gets the current write counterstatic void staticDataLock (void)β locks the static data πstatic void staticDataUnlock (void)β unlocks the static data π
π Additional Inherited Members π
π Public Types inherited from SoNode π
the enum, in all her glory, values EXACTLY as written:
enum NodeType { INVENTOR = 0x0000, VRML1 = 0x0001, VRML2 = 0x0002,
INVENTOR_1 = 0x0004, INVENTOR_2_0 = 0x0008, INVENTOR_2_1 = 0x0010,
INVENTOR_2_5 = 0x0020, INVENTOR_2_6 = 0x0040, COIN_1_0 = 0x0080,
COIN_2_0 = 0x0100, EXTENSION = 0x0200, COIN_2_2 = 0x0400, COIN_2_3 =
0x0800, COIN_2_4 = 0x1000, INVENTOR_5_0 = 0x2000, COIN_2_5 = 0x4000,
COIN_3_0 = 0x8000, INVENTOR_6_0 = 0x10000 }
π Protected Types inherited from SoBase π
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
π Protected Attributes inherited from SoNode π
uint32_t uniqueIdβ her unique id, obviously unique, obviously iconic
π Protected Attributes inherited from SoFieldContainer π
SbBool isBuiltInβ is she built in or not
π Static Protected Attributes inherited from SoNode π
static uint32_t nextUniqueId = 1β starts at1, don't forgetstatic int nextActionMethodIndex = 0β starts at0
β¦and bestie, we are SO not done. Part 2 is pulling up ππ§β¨
πΊοΈ Detailed Description πΊοΈ
Okay so SoGeoOrigin is the class that lets you drop an absolute geographic location into your scene, and everything else gets referenced against it. It's giving "pin in the map" energy. π
π FILE FORMAT/DEFAULTS π
GeoOrigin {
geoSystem ["GD", "WE"]
geoCoords 0 0 0
}
Now, real talk: a huge common problem when dealing with geographic data is that floating point precision gets absolutely wrecked. UTM coordinates are often in the 10^5 a 10^6 magnitude, and that leaves very little precision for details at that position. It's giving squished. π
That's exactly why the SoGeo nodes exist β you can keep your data in its original system but still get good floating point precision when rendering. Iconic, honestly. β¨
Coin needs a local Cartesian coordinate system when rendering. When a SoGeoOrigin node is used, Coin will create a coordinate system at the SoGeoOrigin position, and all geometry (and the camera) in the scene graph will be projected into that coordinate system. No cap.
The coordinate system will always have the Z axis point up from the ground. The Y axis will point towards the north pole, and the X-axis is found using the right hand rule. Slay.
A scene graph should only contain one GeoOrigin node, and all geometry in the scene graph will, as stated earlier, be rendered relative to this position. This means that the precision will be best if the GeoOrigin position is as close to actual camera position as possible. If you move around on a large area, it might therefore be a good idea to actually move the GeoOrigin position instead of the camera. Lowkey genius. π§
To place geometry in the scene graph, you can either use an SoGeoSeparator node or an SoGeoCoordinate node. When using a GeoSeparator node, all geometry inside that separator will be rendered relative to its geo-system position and orientation, and you then use regular shapes and regular SoCoordinate3 nodes to specify data (the points in an SoCoordinate3 must be adjusted to be relative to the GeoSeparator position).
The SoGeoCoordinate node on the other hand can contain double precision geo-coordinates, and that node will internally recalculate the double precision array to a single precision array which is relative to the SoGeoOrgin node (spelled exactly like that, bestie).
One note regarding UTM projections: Since it's quite common to assume a flat earth when working with UTM data, it's possible to supply a "FLAT" keyword for UTM coordinate systems:
GeoOrigin {
geoSystem [ "UTM", "Z17", "FLAT" ]
geoCoords 846889 4313850 0
}
Example scene graph, bestie:
GeoOrigin { geoSystem "GD" geoCoords 40.77 -73.97 0 }
GeoSeparator {
# New York, NY
geoSystem "GD"
geoCoords 40.67 -73.94 0
BaseColor { rgb 0 1 0 }
Cube { width 25000 height 25000 depth 25000 }
Translation { translation 0 0 30000 }
Text2 { string "New York" }
}
GeoSeparator {
# Los Angeles, CA
geoSystem "GD"
geoCoords 34.11 -118.4 0
BaseColor { rgb 1 0 0 }
Cube { width 25000 height 25000 depth 25000 }
Translation { translation 0 0 30000 }
Text2 { string "Los Angeles" }
}
GeoSeparator {
# Washington, DC
geoSystem [ "UTM", "Z17" ]
geoCoords 846889 4313850 0
BaseColor { rgb 0 1 1 }
Cube { width 25000 height 25000 depth 25000 }
Translation { translation 0 0 30000 }
Text2 { string "Washington" }
}
# add a small geogrid
GeoCoordinate {
geoSystem "GD"
point [
32 -120 0,
32 -110 0,
32 -100 0,
32 -90 0,
32 -80 0,
32 -70 0,
34 -120 0,
34 -110 0,
34 -100 0,
34 -90 0,
34 -80 0,
34 -70 0,
36 -120 0,
36 -110 0,
36 -100 0,
36 -90 0,
36 -80 0,
36 -70 0,
38 -120 0,
38 -110 0,
38 -100 0,
38 -90 0,
38 -80 0,
38 -70 0,
40 -120 0,
40 -110 0,
40 -100 0,
40 -90 0,
40 -80 0,
40 -70 0
42 -120 0,
42 -110 0,
42 -100 0,
42 -90 0,
42 -80 0,
42 -70 0
]
}
DrawStyle { style LINES }
BaseColor {}
ShapeHints { vertexOrdering COUNTERCLOCKWISE }
QuadMesh { verticesPerRow 6 verticesPerColumn 6 }
Since π°οΈ
Coin 2.5
π οΈ Constructor & Destructor Documentation π οΈ
SoGeoOrigin::SoGeoOrigin (void )
Constructor. That's it. It constructs. π
SoGeoOrigin::~SoGeoOrigin () [protected], [virtual]
Destructor. It destructs. Protected and virtual, iykyk.
π Member Function Documentation π
SoType SoGeoOrigin::getTypeId (void ) const [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and "downward" casting.
Usage example:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
}
For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.
For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.
Implements SoBase.
const SoFieldData * SoGeoOrigin::getFieldData (void ) const [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.
Reimplemented from SoFieldContainer.
void SoGeoOrigin::doAction (SoAction * action) [virtual]
This function performs the typical operation of a node for any action.
Reimplemented from SoNode.
void SoGeoOrigin::callback (SoCallbackAction * action) [virtual]
Action method for SoCallbackAction.
Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph.
Reimplemented from SoNode.
void SoGeoOrigin::GLRender (SoGLRenderAction * action) [virtual]
Action method for the SoGLRenderAction.
This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method.
Reimplemented from SoNode.
void SoGeoOrigin::getBoundingBox (SoGetBoundingBoxAction * action) [virtual]
Action method for the SoGetBoundingBoxAction.
Calculates bounding box and center coordinates for node and modifies the values of the action to encompass the bounding box for this node and to shift the center point for the scene more towards the one for this node.
Nodes influencing how geometry nodes calculates their bounding box also overrides this method to change the relevant state variables.
Reimplemented from SoNode.
void SoGeoOrigin::getMatrix (SoGetMatrixAction * action) [virtual]
Action method for SoGetMatrixAction.
Updates action by accumulating with the transformation matrix of this node (if any).
Reimplemented from SoNode.
void SoGeoOrigin::pick (SoPickAction * action) [virtual]
Action method for SoPickAction.
Does common processing for SoPickAction action instances.
Reimplemented from SoNode.
void SoGeoOrigin::getPrimitiveCount (SoGetPrimitiveCountAction * action) [virtual]
Action method for the SoGetPrimitiveCountAction.
Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the action.
Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables.
Reimplemented from SoNode.
π¦ Member Data Documentation π¦
SoSFVec3d SoGeoOrigin::geoCoords
Used for specifying the geographic coordinates. For the GD system this should be <latitude> <longitude> <elevation>. For UTM it is <easting> <northing> <elevation>, and for GC it is simply <x> <y> <z>.
SoMFString SoGeoOrigin::geoSystem
Used to specify a spatial reference frame. Coin currently supports three different systems. Support for more systems might be added in the future.
"GD"β The Geodetic system (latitude/longitude)."UTM"β Universal Transverse Mercator coordinate system. The second string should be the zone, encoded as"Z<n>"."GC"β Earth-fixed Geocentric with respect to the WGS84 ellipsoid.
The "GD" and "UTM" systems can, for future support, have an ellipsoid specification. The default is "WE" which is the WGS84 ellipsoid, the only ellipsoid currently supported in Coin.
βοΈ Author βοΈ
Generated automatically by Doxygen for Coin from the source code.
That's the whole vibe, bestie. This page was generated automatically by Doxygen for Coin from the source code, and it's from Coin Version 3.1.3, manual page SoGeoOrigin(3). Stay precise. πβ¨
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms