.TH "SoShadowSpotLight" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoShadowSpotLight \- .PP The \fBSoShadowSpotLight\fP class is a node for setting up a spot light which casts shadows\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoSpotLight\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .RI "\fIReturns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. \fP" .ti -1c .RI "\fBSoShadowSpotLight\fP (void)" .br .ti -1c .RI "virtual void \fBGLRender\fP (\fBSoGLRenderAction\fP *action)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "\fIThis static method returns the \fBSoType\fP object associated with objects of this class\&. \fP" .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "\fISets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. \fP" .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFNode\fP \fBshadowMapScene\fP" .br .ti -1c .RI "\fBSoSFFloat\fP \fBnearDistance\fP" .br .ti -1c .RI "\fBSoSFFloat\fP \fBfarDistance\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const " .br .ti -1c .RI "virtual \fB~SoShadowSpotLight\fP ()" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoShadowSpotLight\fP 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 \fBSoShadowStyle\fP node to control this, at the cost of some extra application complexity\&. .PP It's especially useful if you have a scene with few shadow caster nodes and lots of shadow receiver nodes\&. .PP Currently, this node must be placed somewhere in the \fBSoShadowGroup\fP subgraph to cast shadows\&. .PP \fBFILE FORMAT/DEFAULTS:\fP .PP .nf ShadowSpotLight { shadowMapScene NULL nearDistance -1 farDistance -1 } .fi .PP .PP Here is the the example from \fBSoShadowGroup\fP, modified to use \fBSoShadowSpotLight\fP instead of a normal \fBSoSpotLight\fP\&. Notice that only the sphere casts shadows\&. .PP .PP .nf 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 } } .fi .PP .PP \fBSince:\fP .RS 4 Coin 3\&.0 .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoShadowSpotLight::SoShadowSpotLight (void)" Constructor\&. .SS "SoShadowSpotLight::~SoShadowSpotLight ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoShadowSpotLight::getTypeId (void) const\fC [virtual]\fP" .PP Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. Usage example: .PP .PP .nf void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } .fi .PP .PP For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in \fIall\fP 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 \fBInventor/nodes/SoSubNode\&.h\fP (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine\&.h (for engine classes) and so on\&. .PP For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups\&. .PP Reimplemented from \fBSoSpotLight\fP\&. .SS "const \fBSoFieldData\fP ** SoShadowSpotLight::getFieldDataPtr (void)\fC [static]\fP, \fC [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Reimplemented from \fBSoSpotLight\fP\&. .SS "const \fBSoFieldData\fP * SoShadowSpotLight::getFieldData (void) const\fC [protected]\fP, \fC [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fCNULL\fP\&. .PP Reimplemented from \fBSoSpotLight\fP\&. .SS "void SoShadowSpotLight::GLRender (\fBSoGLRenderAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGLRenderAction\fP\&. .PP 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\&. .PP Reimplemented from \fBSoSpotLight\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.