public class SoEdgeFlag extends SoNode
The marking/unmarking of the edges is specified using an int_32t array. The meaning of this array and its elements depends on the shape it is applied to.
SoIndexedFaceSet
, SoVRMLIndexedFaceSet
For an SoIndexedFaceSet
or SoVRMLIndexedFaceSet
, each element of the array is an index in the SoIndexedShape.coordIndex
field. The vertex corresponding to this index is the first vertex of the edge. The other vertex of the edge is the next vertex in the face according to the order of the vertices in the SoIndexedFaceSet
or SoVRMLIndexedFaceSet
array. If the next element in the array is -1 (end of face), the next vertex is the first vertex of the current face (as for edge (5,3) in the example below). Otherwise, the next vertex is the next element in the array (as for edge (1,2) in the example below). The same edge can appear in two different faces, but it is not necessary to mark it in both faces; only one mark per edge is needed.
Example:
0 1 2 3 4 5 6 7 8 9 10 11 | |
coordIndex = | [ 0, 1 , 2 , -1, 3 , 4, 5 , -1, 2, 1, 3, -1 ] |
edgeMarks = | [ 1 => edge (1, 2), |
6 => edge (5, 3) ] |
For an
SoFaceSet
, the marking is a little different from the SoIndexedFaceSet
. Each element is an index directly in the coordinate array. This corresponds to the first vertex of the edge; the other is the next vertex in the same face. As each face description in the coordinate array is cyclic, the other vertex is either the next vertex in the array, or the first vertex of the face if it is the end of the face.
Example:
coordinates = | [{0.0, 1.0, 1.0}, | // 0 ... start face 1 |
{0.0, 0.0, 1.0} , | // 1 | |
{1.0, 0.0, 1.0} , | // 2 | |
{0.0, 1.0, 1.0} , | // 3 ... start face 2 | |
{0.0, 0.0, 1.0}, | // 4 | |
{1.0, 0.0, 0.0} ] | // 5 | |
numVertices = | [ 3, 3 ] | |
edgeMarks = | [ 1=> edge ({0.0, 0.0, 1.0}, {1.0, 0.0, 1.0}), | |
For an
SoTriangleStripSet
, marking an edge is very different from the previous two nodes. If
m is a mark, the edge corresponding is computed as follows: Example:
coordinates = | [ {0.0, 1.0, 1.0} , | // 0 = int(1/2) |
{0.0, 0.0, 1.0}, | // 1 | |
{1.0, 0.0, 1.0} , | // 2 = int(1/2) + 1 + (1%2) | |
{1.0, 1.0, 1.0}, | // 3 | |
{0.0, 1.0, 1.0} , | // 4 = int(8/2) | |
{1.0, 0.0, 0.0} ] | // 5 = int(8/2) + 1 + (8%2) | |
edgeMarks = | [ 1=>edge({0.0, 1.0, 1.0}, {1.0, 0.0, 1.0}), | |
An
SoIndexedTriangleStripSet
works like an SoTriangleStripSet
, except that the SoIndexedShape.coordIndex
array is used instead of the coordinate array.
For an
SoQuadMesh
, the principle is the same as for SoTriangleStripSet
. If
m is the mark, then the corresponding edge is (
m /2,
n ) where
n is: Example:
coordinates = | [ {0.0, 1.0, 1.0} , {0.0, 2.0, 2.0}, {0.0, 3.0, 3.0}, |
{1.0, 0.0, 1.0} , {2.0, 0.0, 2.0}, {3.0, 0.0, 3.0}, | |
{0.0, 1.0, 0.0}, {0.0, 2.0, 0.0} , {0.0, 3.0, 0.0} ] | |
edgeMarks = | [ 1=> edge({0.0, 1.0, 1.0}, {1.0, 0.0, 1.0}), |
14 => edge({0.0, 2.0, 0.0}, {0.0, 3.0, 0.0}) ] |
For an
SoCube
or an SoVRMLBox
, edges are identified as shown below:
For each value between [0,11] in the flag array, the corresponding edge is marked/unmarked.
For an
SoCone
or an SoVRMLCone
, only the edges of the base can be marked/unmarked. The flag array must contain at least one value greater than or equal to 0 to mark/unmark the edges of the base.
For an
SoCylinder
or an SoVRMLCylinder
, only two values in the flag array are significant:
EdgeFlag {
edgeMarked | -1 |
edgeUnmarked | -1 |
Action behavior:
Sets: SoEdgeFlagElement
See also:
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoMFInt32 |
edgeMarked |
SoMFInt32 |
edgeUnmarked
These are the fields for marked/unmarked edges.
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoEdgeFlag()
Constructor.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, 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, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com