Click or drag to resize
SbSphericalProjection Class

Spherical coordinate projection.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.ProjectionSbProjection
      OIV.Inventor.ProjectionSbSphericalProjection

Namespace: OIV.Inventor.Projection
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public class SbSphericalProjection : SbProjection

The SbSphericalProjection type exposes the following members.

Constructors
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExit

Exit method.

(Inherited from SbProjection.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetNumFloatParameters

Get number of used float parameters.

(Inherited from SbProjection.)
Public methodGetNumStringParameters

Get number of used string parameters.

(Inherited from SbProjection.)
Public methodGetParameter(Int32, Single)

Get float parameter at position pos.

(Inherited from SbProjection.)
Public methodGetParameter(Int32, String)

Get string parameter at position pos.

(Inherited from SbProjection.)
Public methodGetProjectedBoundingBox

Return projected bounding box if available.

(Inherited from SbProjection.)
Public methodGetProjectionNode

Return associated projection node.

(Inherited from SbProjection.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInit

Initialisation method.

(Inherited from SbProjection.)
Public methodInverse

Apply the inverse coordinate to one point.

(Inherited from SbProjection.)
Public methodProject(SbVec3f)

Apply the complete computation (matrix, pre-projection, projection, post-projection) to one point.

(Inherited from SbProjection.)
Public methodProject(SbVec3f, SbVec3f)

Apply the complete computation to a set of coordinates.

(Inherited from SbProjection.)
Public methodSetNumFloatParameters

Set number of float parameters to use.

(Inherited from SbProjection.)
Public methodSetNumStringParameters

Set number of string parameters to use.

(Inherited from SbProjection.)
Public methodSetParameter(Int32, Single)

Set float parameter.

(Inherited from SbProjection.)
Public methodSetParameter(Int32, String)

Set string parameter.

(Inherited from SbProjection.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

This class performs a spherical coordinate projection and is normally used with an OIV.Inventor.Nodes.SoProjection or OIV.Inventor.Nodes.SoGeoProjection node.

Spherical coordinates can be represented using the usual coordinate classes (OIV.Inventor.SbVec3f, OIV.Inventor.Fields.SoMFVec3f, etc) but the three values are considered to be

  • Longitude: an angle measured in degrees in the interval [-180,180]

  • Latitude: an angle measured in degrees in the interval [-90,90]

  • Altitude (or radius): a distance in 3D units greater than zero

The parameters are :

Name Type Index Default
radius float 0 0
scaleRatio float 1 1

The radius parameter is an offset added to each altitude value before projection. This is useful when the altitude values are, for example, relative to sea level.

The scaleRatio parameter is a multiplicative ratio applied to altitude values before projection. This is useful to exaggerate altitudes for visualization purposes.

The spherical projection of a point P(lon,lat,alt) is computed as follows:

newLon = lon * degreeToRadians
newLat = lat * degreeToRadians
newRadius = radius + alt * scaleRatio

x = newRadius*cos(newlat)*cos(newlon)
y = newRadius*cos(newlat)*sin(newlon)
z = newRadius*sin(newlat)

OIV.Inventor.Projection.SbProjection, OIV.Inventor.Nodes.SoProjection

See Also