SOCYLINDER(3iv)
π SoCylinder(3IV) β cylinder shape node β¨
okay bestie, welcome to the SoCylinder(3IV) manual page, aka the glow-up doc for everyone's fave little 3D tube. she's round, she's capped, she's literally the moment. let's get into it π«Ά
π NAME
SoCylinder β cylinder shape node. no cap, that's the whole thing.
πΈ INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoShape > SoCylinder
the whole ancestry tree walked so she could run π
β¨ SYNOPSIS
first things first, include her:
#include <Inventor/nodes/SoCylinder.h>
then there's the part enum, which is basically the "which bits of me are visible" dropdown:
enum Part {
SoCylinder::SIDES The cylindrical part
SoCylinder::TOP The top circular face
SoCylinder::BOTTOM The bottom circular face
SoCylinder::ALL All parts
}
π Fields from class SoCylinder
SoSFBitMask parts
SoSFFloat radius
SoSFFloat height
π¦ Methods from class SoCylinder
SoCylinder()
void addPart(SoCylinder::Part part)
void removePart(SoCylinder::Part part)
SbBool hasPart(SoCylinder::Part part) const
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 this node is a simple capped cylinder, and she is centered around the y-axis. by default she's sitting at (0,0,0) and her default size is -1 to +1 in all three dimensions. wanna make her a different size? that's literally what the radius and height fields are for, bestie.
she gets transformed by the current cumulative transformation, and she's drawn with whatever the current lighting model, drawing style, material, and geometric complexity are. she's adaptable like that π
here's the material tea π΅ β if the current material binding is PER_PART or PER_PART_INDEXED, then:
- the first current material is used for the sides of the cylinder
- the second is used for the top
- the third is used for the bottom</bottom>
otherwise? the first material is used for the entire cylinder. one look, one vibe.
now texture time π β when a texture is applied to a cylinder, it's applied differently to the sides, top, and bottom:
- On the sides: the texture wraps counterclockwise (from above) starting at the back of the cylinder. the texture has a vertical seam at the back, intersecting the yz-plane.
- On the top and bottom: a circle is cut out of the texture square and applied to the top or bottom circle. the top texture appears right side up when the top of the cylinder is tilted toward the camera, and the bottom texture appears right side up when the top of the cylinder is tilted away from the camera.
(the way texture mapping really said "different for every face" π iconic behavior)
πΈ FIELDS
SoSFBitMask partsβ the visible parts of the cylinder. pick your faves, hide the rest πSoSFFloat radiusSoSFFloat height
these two define the cylinder's height and radius. and listen β values must be greater than 0.0. that's not a suggestion, that's the law. periodt.
β¨ METHODS
SoCylinder()β creates a cylinder node with default settings. baby's first cylinder, freshly hatched π£void addPart(SoCylinder::Part part)void removePart(SoCylinder::Part part)
these are the convenience functions that make it easy to turn on or off a part of the cylinder. lowkey the most user-friendly glow-up toggles ever.
SbBool hasPart(SoCylinder::Part part) constβ this convenience function returns whether a given part is on or off. she's checking in on you π«Άstatic SoType getClassTypeId()β returns the type identifier for this class.
π¦ ACTION BEHAVIOR
SoGLRenderActionβ draws the cylinder based on the current coordinates, materials, drawing style, and so on. (and so on is doing a lot of heavy lifting there but we respect it)SoRayPickActionβ intersects the ray with the cylinder. the part of the cylinder that was picked is available from theSoCylinderDetail. main character gets picked, obviously.SoGetBoundingBoxActionβ computes the bounding box that encloses the cylinder. personal space bubble: calculated βSoCallbackActionβ if any triangle callbacks are registered with the action, they will be invoked for each successive triangle that approximates the cylinder. so many little triangles, all of them working together πβ¨
π FILE FORMAT/DEFAULTS
Cylinder {
parts ALL
radius 1
height 2
}
defaults that simply work. slay.
π SEE ALSO
SoCone, SoCube, SoCylinderDetail, SoSphere
(the whole 3D solids squad π«Ά)
and that's the page, bestie π this was SoCylinder(3IV), straight from the SoCylinder(3IV)() manual β no version number, no date, just pure cylinder energy, forever and always. go forth and render something round ππΈβ¨
π¦ 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