The NodePtr class is python representation of a node within the
scenegraph. It can be used to alter the existing structure of it by
adding/removing nodes.
The Light functions are deprecated. Use API v2 light types instead,
vrdBaseLightNode, vrdPointLightNode etc. For Transform functions, use API
v2 vrdTransformNode type.
|
__init__(source)
The constructor of the vrNodePtr class. |
|
|
bool
|
|
|
addChild(node)
Adds a child node to a parent node. |
|
|
vrNodePtr
|
clone()
Creates a clone of the node. |
|
|
vrNodePtr
|
copy()
Creates a copy of the node. |
|
|
vrFieldAccess
|
fields()
Returns access to the fields of the node core. |
|
|
bool
|
getActive()
Return render state for this node. |
|
|
FieldContainerPtr
|
|
string
|
|
list of floats (32bit)
|
|
vrNodePtr
|
getChild(id)
Gets a child node by index in [0, n] or name. |
|
|
unsigned int (32bit)
|
getID()
Returns the internal id of the node. |
|
|
vrMaterialPtr
|
|
unsigned integer
|
|
string
|
getName()
Returns the name of the node. |
|
|
vrNodePtr
|
|
NodePtr
|
getPtr()
Return the OpenSG NodePtr. |
|
|
string
|
getType()
Return returns the type for this node. |
|
|
bool
|
hasAttachment(fname)
Checks the existence of an attachment via name. |
|
|
boolean
|
|
bool
|
isAsset()
Checks if the node is an asset from the Asset Manager. |
|
|
bool
|
isValid()
Returns true when the node is valid. |
|
|
|
|
|
setActive(state)
Enables/disables rendering for this node. |
|
|
|
|
|
|
|
setName(name)
Sets the name of the node. |
|
|
|
|
|
sub()
Removes the node itself from the scenegraph. |
|
|
bool
|
|
|
subChild(node)
Removes a child node from a parent node. |
|
|
Inherited from NodePtr :
__reduce__
Inherited from unreachable.instance :
__new__
|
list of floats (32bit)
|
|
list of floats (32bit)
|
|
list of floats (32bit)
|
getRotation()
Returns the rotation of a transform node. |
|
|
list of floats (32bit)
|
getScale()
Returns the scale of a transform node. |
|
|
list of floats (32bit)
|
getTranslation()
Returns the translation of a transform node in local coordinates. |
|
|
list of floats (32bit)
|
getWorldRotation()
Returns the world rotation (all transformation above this node
accumulated to the top). |
|
|
list of floats (32bit)
|
getWorldScale()
Returns the world scale (all transformation above this node
accumulated to the top). |
|
|
list of floats (32bit)
|
getWorldTransform()
Returns the world transform (all transformation above this node
accumulated to the top). |
|
|
list of floats (32bit)
|
getWorldTranslation()
Returns the world translation (all transformation above this node
accumulated to the top). |
|
|
bool
|
isTransform()
Returns true if node is a transform node. |
|
|
|
makeComponentTransform()
Converts the node into a component transform node. |
|
|
|
|
|
setAxisRotation(axis,
ax,
ay,
az,
bx,
by,
bz,
alpha)
Rotates a transform node around an arbitrary axis. |
|
|
|
|
|
setRotation(x,
y,
z)
Sets the rotation of a transform node. |
|
|
|
setScale(x,
y,
z)
Sets the scale of a transform node. |
|
|
|
|
|
setTranslation(x,
y,
z)
Sets the translation of a transform node in local coordinates. |
|
|
|
|
bool
|
getDlistCache()
Returns display list cache state, for vertices animation you should
disable it! |
|
|
list of floats (32bit)
|
getNormals()
Returns the normals of a geometry node. |
|
|
list of floats (32bit)
|
|
list of floats (32bit)
|
getTexCoords()
Returns the texture coordinates of a geometry node. |
|
|
bool
|
getVBO()
Returns vbo rendering state. |
|
|
|
setDlistCache(state)
Enabled or disables the display list cache, for vertices animation
you should disable it! |
|
|
|
setNormals(normals)
Sets the normals of a geometry node. |
|
|
|
setPositions(positions)
Sets the vertices of a geometry node. |
|
|
|
setTexCoords(texCoords)
Sets the texture coordinates of a geometry node. |
|
|
|
setVBO(state)
Enables or disables the vbo rendering. |
|
|
|
changeLightType(type)
If the node is a light node, converts the light source to another
light source type. |
|
|
|
deleteRayFile()
If the node is a ray file light node, deletes the ray file of the ray
file light. |
|
|
int
|
|
bool
|
|
int
|
|
bool
|
getAreaLightUseConeAngle()
For a disk or rectangular area light node, return whether the light
uses spotlight angles to define its emission. |
|
|
bool
|
|
bool
|
|
list of 3 floats (32bit)
|
|
list of 3 floats (32bit)
|
|
float
|
|
bool
|
|
float
|
getLightConeAngle()
For a spot, disk or rectangular light node, return the cone angle of
the light. |
|
|
float
|
|
float
|
|
float
|
getLightPenumbraAngle()
For a spot, disk or rectangular light node, return the penumbra angle
of the light. |
|
|
int
|
getLightTemperature()
For a light node, return the temperature used to determine the light
color in kelvin. |
|
|
float
|
|
bool
|
|
bool
|
|
bool
|
|
unsigned int
|
|
float
|
|
float
|
|
float
|
|
int
|
|
bool
|
getUseIESProfile()
For a light node, return whether the light source uses a IES profile. |
|
|
bool
|
getUseLightTemperature()
For a light node, return whether the light uses the temperature value
to determine its color. |
|
|
bool
|
isAreaLight()
Return whether the node is an area light node. |
|
|
bool
|
|
bool
|
isDiskLight()
Return whether the node is a disk light node. |
|
|
bool
|
isLight()
Checks if the node is a light source node. |
|
|
bool
|
isLightOn()
For a light node, return whether the light is on. |
|
|
bool
|
isLocalLight()
For a light node, return whether the light is a local light whose
illumination is limited to the objects defined in a light link set. |
|
|
bool
|
isPointLight()
Return whether the node is a point light node. |
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
isSpotLight()
Return whether the node is a spot light node. |
|
|
|
loadIESProfile(filename)
If the node is a light node, loads a IES file. |
|
|
|
loadRayFile(filename)
If the node is a ray file light node, loads a ray file to be used by
the light. |
|
|
|
|
|
|
|
|
|
setAreaLightUseConeAngle(state)
If the node is a disk or rectangular area light node, sets whether
the light uses spotlight angles to define its emission. |
|
|
|
|
|
|
|
setDiffuseLightColor(r,
g,
b)
If the node is a light node, sets the diffuse color of the light as
RGB. |
|
|
|
setGlossyLightColor(r,
g,
b)
If the node is a light node, sets the glossy color of the light as
RGB. |
|
|
|
|
|
|
|
setLightConeAngle(value)
If the node is a spot, disk or rectangular light node that uses spot
angles for emission, sets the cone angle of the light. |
|
|
|
|
|
setLightIntensity(value)
If the node is a light node, sets the intensity of the light. |
|
|
|
setLightOn(state)
If the node is a light node, switches the light source on or off. |
|
|
|
setLightPenumbraAngle(value)
If the node is a spot, disk or rectangular light node that uses spot
angles for emission, sets the penumbra angle of the light. |
|
|
|
setLightTemperature(kelvin)
If the node is a light node, sets the temperature used to determine
the light color in kelvin (default: 6504). |
|
|
|
|
|
|
|
setLocalLight(state)
If the node is a light node, sets the light to local or global
lighting. |
|
|
|
setRayFileUsePhotonsForDirectLighting(state)
If the node is a ray file light node, sets whether the rayfile light
uses photons for direct lighting or a surface with raylight
evaluation. |
|
|
|
setRayFileUseRandomSampling(state)
If the node is a ray file light node, sets whether the rayfile light
uses random sampling for the rays. |
|
|
|
|
|
|
|
setShadowIntensity(value)
If the node is a light node, sets the shadow intensity of the light. |
|
|
|
|
|
setShadowMapResolution(resolution)
If the node is a light node, sets the resolution of the shadow map
used in OpenGL (default: 1024). |
|
|
|
setUseIESProfile(state)
If the node is a light node, enables the IES profile for the light. |
|
|
|
setUseLightTemperature(state)
If the node is a light node, sets whether the light uses the
temperature value to determine its color. |
|
|
|
toggleLight()
If the node is a light node, toggles the light source on or off
depending on its previous state. |
|
|
|
setFieldBool()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldColor4f()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldInt16()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldInt32()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldNode()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldPnt2f()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldPnt3f()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldReal32()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldReal64()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldString()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldUInt16()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldUInt32()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldVec2f()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldVec3f()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|
|
setFieldVec4f()
Obsolete, please use the field access API (vrFieldAccess) instead. |
|
|