public class SoVertexProperty extends SoNode
SoVertexShape
.
An SoVertexProperty
node can be used as a child of a group node in a scene graph, in which case the properties it specifies are inherited by subsequent shape nodes in the graph. It can also be directly referenced using the vertexProperty field of a vertex-based shape, bypassing scene graph inheritance. Direct referencing is the recommended practice.
When directly referenced by a VertexProperty field of a vertex-based shape, the SoVertexProperty
node is the most efficient way of specifying vertex-based shapes. Use of the directly referenced SoVertexProperty
node results in significantly faster scene rendering than scene graph inheritance of vertex properties, provided all required vertex properties are specified in the SoVertexProperty
node.
Because the class SoVertexProperty
is derived from SoNode
, a vertex property node can be inserted as a child node in a scene graph. When inserted as a node in a scene graph, the SoVertexProperty
node is traversed as any other property node and the properties it specifies are inherited by subsequent shape nodes in the scene graph. It specifies the current material, normal and tangent bindings, and can be used to specify the current 3D coordinates, the current normals, the current tangents, the current texture coordinates, the current diffuse colors, and the current transparencies.
All multiple-valued fields in the SoVertexProperty
node are optional. If a field is not present (i.e. if it has 0 values), then shapes that require the missing information are required to obtain it from the current traversal state. However, developers are cautioned that, for optimal performance, the vertex property node should be referenced as the VertexProperty field of an SoVertexShape
, and should specify in its fields all values required to render that shape.
Fields:
The various fields in a vertex property node can be used in place of corresponding fields in other property nodes, as follows:
vertex
field contains 3D coordinates, as in the point field of an SoCoordinate3
node. normal
field contains normal vectors, as in the vector field of the SoNormal
node. tangent
field contains tangent vectors. SoLineSet
and SoIndexedLineSet
for more details. orderedRGBA
field contains packed color+transparency values. SoMaterial
colors and can be sent directly to the GPU. A packed color value can be queried from an SbColor
or SbColorRGBA
object using the getPackedValue() method. The packed colors are equivalent to an SoPackedColor
node, and provide values for both diffuse color and transparency. texCoord
and texCoord3
fields contain texture coordinates, as in the point field of the SoTextureCoordinate2
and SoTextureCoordinate3
nodes.
If one of these nodes appears higher in the scene graph and setOverride(true) was called on that node, those values are used instead of the corresponding field of the vertex property node.
Note: Calling setIgnored(true) on the fields of this node has no effect on its behavior.
If setOverride() was called on an SoMaterial
node higher in the scene graph and either the
diffuseColor field or the
transparency field is not ignored (setIgnored()), then the
color and transparency values from the SoMaterial
node are used instead of the values in the SoVertexProperty
. It is not currently possible to override just the color or just the transparency.
The default transparency algorithm is NO_SORT. To get a nice appearance for transparent objects you must change this to another value, for example, OPAQUE_FIRST or SORTED_PIXEL, using the setTransparencyType method in the viewer or renderAction class. See SoGLRenderAction
for a discussion of transparency algorithms and rendering order.
The materialBinding
field replaces the value field of the SoMaterialBinding
node. The materialBinding
field in a directly referenced SoVertexProperty
node has no effect unless there is a nonempty orderedRGBA
field, in which case the material binding specifies the assignment of diffuse colors and alpha values to the shape.
The normalBinding
field replaces the value field of the SoNormalBinding
node. The normalBinding
field of a directly referenced SoVertexProperty
node has no effect unless there is a nonempty normal
field, in which case the normal binding specifies the assignment of normal vectors to the shape.
The tangentBinding
field of a directly referenced SoVertexProperty
node has no effect unless there is a nonempty tangent
field, in which case the tangent binding specifies the assignment of tangent vectors to the shape.
VertexProperty {
vertex | [ ] |
normal | [ ] |
tangent | [ ] |
texCoord | [ ] |
texCoord3 | [ ] |
orderedRGBA | [ ] |
materialBinding | OVERALL |
normalBinding | PER_VERTEX_INDEXED |
tangentBinding | PER_VERTEX_INDEXED |
forceSending | false |
Action behavior:
SoGLRenderAction
, SoCallbackAction
, SoPickAction
When traversed in a scene graph, sets coordinates, normals, tangents, texture coordinates, diffuse colors, transparency, normal binding, tangent binding and material binding in current traversal state. If not traversed, has no effect on current traversal state associated with action. The normalBinding field has no effect if there are no normals. The tangentBinding field has no effect if there are no tangents. The materialBinding has no effect if there are no packed colors. Sets: SoCoordinateElement
, SoNormalElement
, SoNormalBindingElement
, SoLazyElement
SoMaterialBindingElement
, SoTextureCoordinateElement
, SoTangentElement
, SoTangentBindingElement
SoGetBoundingBoxAction
When traversed in a scene graph, sets coordinates in current traversal state. If not traversed, has no effect on current traversal state associated with action. Sets: SoCoordinateElement
See also:
SoIndexedTriangleStripSet
, SoIndexedFaceSet
, SoIndexedLineSet
, SoTriangleStripSet
, SoLineSet
, SoFaceSet
, SoPointSet
, SoQuadMesh
, SoVertexShape
, SoIndexedShape
, SoNonIndexedShape
Modifier and Type | Class and Description |
---|---|
static class |
SoVertexProperty.Bindings
Binding.
|
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFBool |
forceSending
Forces the texture coordinates to be sent to the GPU even if no texture is bound.
|
SoSFEnum<SoVertexProperty.Bindings> |
materialBinding
Material binding.
|
SoMFVec3f |
normal
Normal vector(s).
|
SoSFEnum<SoVertexProperty.Bindings> |
normalBinding
Normal binding.
|
SoMFUInt32 |
orderedRGBA
Packed color(s), including transparencies.
|
SoMFVec3f |
tangent
Tangent vector(s).
|
SoSFEnum<SoVertexProperty.Bindings> |
tangentBinding
Tangent binding.
|
SoMFVec2f |
texCoord
2D texture coordinate(s).
|
SoMFVec3f |
texCoord3
3D texture coordinate(s).
|
SoMFVec3f |
vertex
Vertex coordinate(s).
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVertexProperty()
Creates an
SoVertexProperty node with default settings. |
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 SoMFVec3f vertex
public final SoMFVec2f texCoord
public final SoMFVec3f texCoord3
public final SoSFBool forceSending
public final SoMFVec3f normal
public final SoMFVec3f tangent
public final SoSFEnum<SoVertexProperty.Bindings> normalBinding
public final SoSFEnum<SoVertexProperty.Bindings> tangentBinding
public final SoMFUInt32 orderedRGBA
public final SoSFEnum<SoVertexProperty.Bindings> materialBinding
public SoVertexProperty()
SoVertexProperty
node with default settings.Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com