SOQUADMESH(3iv)
π SoQuadMesh(3IV) β the quadrilateral mesh shape node π
okay bestie, sit down, hydrate, because we're about to talk about SoQuadMesh from the Inventor manuals (you know, the 3IV section, iykyk). This is the node that builds quadrilateral meshes out of vertices, and honestly? it's giving grid. it's giving quilt. it's giving "I made a mesh and it slays." β¨
πΈ NAME πΈ
SoQuadMesh β quadrilateral mesh shape node π¦
π INHERITS FROM π
the whole ancestry line, no skipping generations:
SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape >
SoNonIndexedShape > SoQuadMesh
like... the family tree is long, she comes from a distinguished bloodline π
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoQuadMesh.h>
Fields from class SoQuadMesh:
SoSFInt32 verticesPerColumn
SoSFInt32 verticesPerRow
Fields from class SoNonIndexedShape:
SoSFInt32 startIndex
Fields from class SoVertexShape:
SoSFNode vertexProperty
Methods from class SoQuadMesh:
SoQuadMesh()
static SoType getClassTypeId()
Methods from class SoNode:
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π DESCRIPTION π
so basically, this shape node constructs quadrilaterals out of vertices. the vertices can be specified either in the vertexProperty field (that one's inherited from SoVertexShape) or by the current inherited coordinates. and listen β for optimal performance, the vertexProperty field is the recommended one. do with that what you will. π
SoQuadMesh uses the coordinates in order, starting with the first one. the number of vertices in the columns and rows of the mesh is specified by the verticesPerColumn and verticesPerRow fields. and this is the part that trips people up every single time, so pay attention bestie: those numbers are 1 greater than the number of quadrilaterals per row and per column. not equal. greater. by one. π
let's do the example, because it's actually so clean:
an SoQuadMesh with verticesPerColumn of 3 and verticesPerRow of 4 would use coordinates 1, 2, 3, and 4 for the first row of vertices, coordinates 5, 6, 7, and 8 for the second row, and coordinates 9, 10, 11, and 12 for the third (last) row. the result? a mesh of 3 quadrilaterals across by 2 down. math is mathing, we love to see it. π§
β οΈ warning bestie: non-planar quadrilaterals formed by a quad mesh may cause interesting but unpredictable results. "interesting" here is doing a lot of heavy lifting. proceed with vibes but also with caution. π
the coordinates of the mesh get transformed by the current cumulative transformation, and the mesh is drawn with the current light model and drawing style. so it's very much serving whatever your scene graph is serving.
now, treatment of the current material and normal binding, because this is where it gets β¨technicalβ¨:
- The
PER_PARTbinding specifies a material or normal for each row of the mesh. - The
PER_FACEbinding specifies a material or normal for each quadrilateral. - The
_INDEXEDbindings are equivalent to their non-indexed counterparts. - The default material binding is
OVERALL. - The default normal binding is
PER_VERTEX.
and if any normals (or materials) are specified, Inventor assumes you provided the correct number of them, as indicated by the binding. if you specify fewer normals (or materials) than the shape requires, you will see unexpected results. that's not a threat, that's a promise. π if no normals are specified, they'll be generated automatically β so at least there's a safety net. π«Ά
π¦ FIELDS π¦
SoSFInt32verticesPerColumnSoSFInt32verticesPerRow
number of vertices per column and row. iconic. concise. exactly what it says on the tin. β
π METHODS π
SoQuadMesh()β creates a quadrilateral mesh node with default settings. a fresh baby mesh, born ready. π- static
SoTypegetClassTypeId()β returns the type identifier for this class. it's the ID card. the government name. the "yes, this is who I am" of the node. π₯
π ACTION BEHAVIOR π
SoGLRenderAction
draws a mesh based on the current coordinates, normals, materials, drawing style, and so on. and so on. you know how it is. β¨
SoRayPickAction
picks on the mesh based on the current coordinates and transformation. details about the intersection are returned in an SoFaceDetail. very demure, very detailed. π
SoGetBoundingBoxAction
computes the bounding box that encloses all vertices of the mesh, with the current transformation applied to them. it also sets the center to the average of the coordinates of all vertices. yes, the average. mean girl behavior but make it math. π
SoCallbackAction
if any triangle callbacks are registered with the action, they will be invoked for each successive triangle forming the quadrilaterals of the mesh. note: triangles, not quads. the quads are an illusion, the triangles are the truth. π¦
π FILE FORMAT/DEFAULTS π
QuadMesh {
vertexProperty NULL
startIndex 0
verticesPerColumn 1
verticesPerRow 1
}
look at those defaults. NULL, 0, 1, 1. minimalism. slay. β¨
π SEE ALSO π
go read these next, they're all in the friend group:
SoCoordinate3SoDrawStyleSoFaceDetailSoFaceSetSoTriangleStripSetSoVertexProperty
and that's the whole page bestie β SoQuadMesh(3IV) from the Inventor manual, footer date field left all empty like a mystery, exactly as the original had it. no cap, you now know everything this node knows. go build a mesh, make it non-planar, live dangerously, but maybe read the warning again first. π
πΈπ«Ά
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms