SoShadowSpotLight - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 4.0.0
Note : Coin
NAMESoShadowSpotLight − The SoShadowSpotLight class is a node for setting up a spot light which casts shadows.
SYNOPSIS
#include <Inventor/annex/FXViz/nodes/SoShadowSpotLight.h> Inherits SoSpotLight.
Public Member Functionsvirtual SoType getTypeId (void) const
Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. SoShadowSpotLight (void)
virtual void GLRender (SoGLRenderAction *action)
Static Public Member Functionsstatic SoType getClassTypeId (void)
static void initClass (void)
Public AttributesSoSFNode shadowMapScene
SoSFFloat nearDistance
SoSFFloat farDistance
Protected Member Functionsvirtual const SoFieldData * getFieldData (void) const
virtual ~SoShadowSpotLight ()
Static Protected Member Functionsstatic const SoFieldData ** getFieldDataPtr (void)
Additional Inherited Members
Detailed DescriptionThe SoShadowSpotLight class is a node for setting up a spot light which casts shadows. This node can be used instead of a normal SpotLight if you need to improve the performance by supplying a simplified scene graph to be used when rendering the shadow map(s). For instance, the shadow map scene graph doesn't need any textures or materials, and any non-casters can also be excluded from this scene graph. It's more optimal to use this node than to use the SoShadowStyle node to control this, at the cost of some extra application complexity. It's especially useful if you have a scene with few shadow caster nodes and lots of shadow receiver nodes. Currently, this node must be placed somewhere in the SoShadowGroup subgraph to cast shadows. FILE FORMAT/DEFAULTS: ShadowSpotLight {
shadowMapScene NULL
nearDistance -1
farDistance -1
}
Here is the the example from SoShadowGroup, modified to use SoShadowSpotLight instead of a normal SoSpotLight. Notice that only the sphere casts shadows. DirectionalLight { direction 0 0 -1 intensity 0.2 }
ShadowGroup {
quality 1 # to get per pixel lighting
ShadowSpotLight {
location -8 -8 8.0
direction 1 1 -1
cutOffAngle 0.35
dropOffRate 0.7
shadowMapScene
DEF sphere Separator {
Complexity { value 1.0 }
Material { diffuseColor 1 1 0 specularColor 1 1 1 shininess 0.9 }
Shuttle { translation0 -3 1 0 translation1 3 -5 0 speed 0.25 on TRUE }
Translation { translation -5 0 2 }
Sphere { radius 2.0 }
}
}
# need to insert the sphere in the regular scene graph as well
USE sphere
Separator {
Material { diffuseColor 1 0 0 specularColor 1 1 1 shininess 0.9 }
Shuttle { translation0 0 -5 0 translation1 0 5 0 speed 0.15 on TRUE }
Translation { translation 0 0 -3 }
Cube { depth 1.8 }
}
Separator {
Material { diffuseColor 0 1 0 specularColor 1 1 1 shininess 0.9 }
Shuttle { translation0 -5 0 0 translation1 5 0 0 speed 0.3 on TRUE }
Translation { translation 0 0 -3 }
Cube { }
}
Coordinate3 { point [ -10 -10 -3, 10 -10 -3, 10 10 -3, -10 10 -3 ] }
Material { specularColor 1 1 1 shininess 0.9 }
Complexity { textureQuality 0.1 }
Texture2 { image 2 2 3 0xffffff 0x225588 0x225588 0xffffff }
Texture2Transform { scaleFactor 4 4 }
FaceSet { numVertices 4 }
}Since Coin 3.0
Constructor & Destructor Documentation
SoShadowSpotLight::SoShadowSpotLight (void)Constructor.
SoShadowSpotLight::~SoShadowSpotLight () [protected], [virtual]Destructor.
Member Function Documentation
SoType SoShadowSpotLight::getTypeId (void) const [virtual]Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. Usage example: void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
}For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups. Reimplemented from SoSpotLight.
const SoFieldData * SoShadowSpotLight::getFieldData (void) const [protected], [virtual]Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL. Reimplemented from SoSpotLight.
void SoShadowSpotLight::GLRender (SoGLRenderAction * action) [virtual]Action method for the SoGLRenderAction. This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method. Reimplemented from SoSpotLight.
Member Data Documentation
SoSFNode SoShadowSpotLight::shadowMapSceneThe shadow map scene graph. If this is NULL (the default), the node will behave as a normal SoSpotLight node.
SoSFFloat SoShadowSpotLight::nearDistanceCan be used to set a fixed near distance for this spot light. The value in this field will be used if it's set to > 0.0. Default value is -1.0.
SoSFFloat SoShadowSpotLight::farDistanceCan be used to set a fixed far distance for this spot light. The value in this field will be used if it's set to > 0.0. Default value is -1.0.
AuthorGenerated automatically by Doxygen for Coin from the source code. 0
Johanes Gumabo
Data Size : 24,345 byte
man-SoShadowSpotLight.3coin4Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 6 / 181,556
Visitor ID : :
Visitor IP : 18.188.114.150 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.