SOLIGHTMODEL(3iv)
π SoLightModel β the lighting vibe-setter π
okay bestie, welcome to the SoLightModel page from the 3IV manual β¨ this one's short and sweet and it literally just picks which lighting model the renderer uses. it's giving "small node, big mood" energy. π
π NAME π
SoLightModel β node that defines the lighting model to use when rendering
like. that's the whole job. it decides how light hits your shapes. no cap. π
𧬠INHERITS FROM π§¬
SoBase > SoFieldContainer > SoNode > SoLightModel
so it's a full-on SoNode descendant, which means it comes with the whole node family inheritance package. iconic lineage fr. π
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoLightModel.h>
enum Model {
SoLightModel::BASE_COLOR Use only the base (diffuse) object color
SoLightModel::PHONG Use Phong lighting model
}
Fields from class SoLightModel:
SoSFEnum model
Methods from class SoLightModel:
SoLightModel()
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
yes the synopsis is a whole inheritance flex, we love a family tree that goes hard. πΈ
π« DESCRIPTION π«
okay so real talk: this node defines the lighting model used when rendering subsequent shapes. it's a state-setter, bestie β it doesn't light itself, it changes the rules for everything that comes after it in the scene graph. π¦
the model gets specified in the model field, obviously. π
and here's the part you actually need to know: when the default model (Phong lighting) is used, light sources are required in a scene for objects to be easily visible. like, if you're on Phong and you forgot to add a light?? your objects are gonna be sitting there in the dark. main character who forgot to pay the electric bill energy. ππ
π§ FIELDS π§
SoSFEnum modelβ Lighting model to use
one field. one. and it's running the entire show. obsessed. π
π οΈ METHODS π οΈ
SoLightModel()β Creates a light model node with default settings.
fresh node, default settings, ready to go. it's giving "new phone who dis" β¨
static SoType getClassTypeId()β Returns type identifier for this class.
you want the type ID? she's got the type ID. π
π¬ ACTION BEHAVIOR π¬
SoGLRenderAction,SoCallbackActionβ Sets the current lighting model in the state.
so when these actions roll through, they just set the lighting model in the state and keep it moving. vibe check: passed. π
π FILE FORMAT/DEFAULTS π
LightModel {
model PHONG
}
yup β out of the box, model is PHONG. so bestie, default behavior = you need lights. don't forget. π
π SEE ALSO π
SoBaseColor, SoEnvironment, SoLight, SoMaterial
go read those too, they're all in the same lighting/material friend group. iykyk. π«Ά
β οΈ reminder, fr fr: this node affects the rendering of subsequent shapes. it's state, so order matters. no cap.
and that's the whole page bestie!! this was SoLightModel(3IV)() β the 3IV manual, signing off. slay, stay lit (literally), and go add a light source πβ¨ππ¦πΈπ
π«Άπ₯ππβπ
π¦ 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