public class SoProjection extends SoNode
SoTransform
can only apply transforms that can be expressed as a matrix. A coordinate projection can be any algorithm that takes a coordinate and returns a different coordinate. This is particularly useful for geospatial coordinate systems (see SoGeoProjection
), but is also useful for using spherical, cylindrical and other coordinate systems directly.
This node works together with projection classes derived from the SbProjection
class. The projection classes implement the projection computations applied to 3D points. Applications can create new subclasses of SbProjection
.
To use a specific projection, call setProjection()
with an instance of the SbProjection
class. Each instance of SoProjection
can also store a list of projections, each one associated with a unique id. This is convenient for switching between different geospatial projections. Changing the projTypeId
value activates the projection registered with the corresponding id.
The default projection is spherical coordinates (SbSphericalProjection
).
The projection classes will use the string parameters and float parameters in the fields parameters
and floatParameters
respectively. See the projection class documentation for relevant parameters.
Normal vectors
LIMITATIONS
SoProjection
:
SoAnnoText3
, SoAsciiText
, SoText2
, SoText3
)
SoCylinder
, SoCube
, SoCone
SoAlgebraicShape
SoImage
SoVolumeRender
with some limitations (see SoVolumeRender
doc for details)
SoVolumeIndexedFaceSet
)
SoTransformation
, for example SoTransform
or SoTabBoxManip
will give unexpected results. To apply a transformation matrix to projected shapes, set the matrix
field to the expected value. Shape vertices will be multiplied by the matrix before being projected.
SoTransformation
nodes, they can't be projected using an SoProjection
node.
SoRayPickAction
). Results may be incorrect.
File format/default:
Projection {
parameters | "" |
matrix | identity |
isOn | true |
floatParameters | 1 |
projTypeId | 0 |
Action behavior:
Sets: SoCoordinateElement
See also:
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoMFFloat |
floatParameters
Float parameters stored for projections.
|
SoSFBool |
isOn
If set to false, projection is inactive.
|
SoSFMatrix |
matrix
Matrix that can be applied before projecting a point.
|
SoMFString |
parameters
String parameters stored for projections.
|
SoMFString |
parametersIn
String parameters stored for projections.
|
SoSFInt32 |
projTypeId
Current projection id.
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoProjection()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addProjection(SbProjection projection,
int id)
Add a projection with the given name and id to the list.
|
static SbVec3f[] |
checkProjection(SoState state,
SoNode node,
SbVec3f[] coords)
Apply projection to given coordinates.
|
SbProjection |
getProjection()
Return current projection.
|
void |
setProjection(SbProjection projection)
Set the current projection.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
public final SoSFBool isOn
public final SoSFMatrix matrix
public final SoSFInt32 projTypeId
public final SoMFFloat floatParameters
public final SoMFString parameters
public final SoMFString parametersIn
public static SbVec3f[] checkProjection(SoState state, SoNode node, SbVec3f[] coords)
SoCoordinate3
element.public java.lang.String addProjection(SbProjection projection, int id)
public void setProjection(SbProjection projection)
public SbProjection getProjection()
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com