29 #ifndef __SHADOWCASTER_H__
30 #define __SHADOWCASTER_H__
44 class FrameBufferTextureGenerator;
108 Inst< MFShadowObjectNode > _object = 0,
109 Inst< MFLightNode > _light = 0,
110 Inst< SFFloat > _shadowDarkness = 0,
111 Inst< SFFloat > _shadowDepthOffset = 0,
112 Inst< DisplayList > _displayList = 0,
113 Inst< SFString > _algorithm = 0,
114 Inst< SFShaderNode > _shadowShader = 0,
115 Inst< SFBool > _multiThreading = 0);
118 virtual void render();
126 static void updateShadowInformation(
TraverseInfo& ti,
void* data);
132 H3DUniquePtr< MFShadowObjectNode >
object;
229 std::vector< Vec3d > coord3;
230 std::vector< H3DUInt32 > index;
232 std::vector< Vec4d > coord4;
236 std::map< X3DLightNode*, BufferData > single_buffer_map;
237 Matrix4f accumulated_fwd_mat;
239 static void * collectInformationCallback(
void* data );
240 void computeThreadedShadowVolumeInformation();
241 void fillThreadSafeInformation( Matrix4f acc_fwd,
bool is_render_caps );
245 Matrix4f accumulated_fwd_ts;
248 std::vector<X3DLightNode*> lights_ts;
249 std::vector<H3DShadowObjectNode*> shadow_objects_ts;
252 std::map< X3DLightNode*, std::vector<Vec4d> > data_container_cpu_ts;
253 bool should_transfer_data_ts;
Contains the DEFNodes class.
Header file for H3DShadowObjectNode.
Contains the MFNode class.
Contains the SFString field class.
Header file for Shape, X3D scene-graph node.
Header file for X3DChildNode, X3D scene-graph node.
Header file for X3DLightNode, X3D scene-graph node.
Header file for X3DShaderNode, X3D scene-graph node.
The FrameBufferTextureGenerator node provides a mean to render a sub-scene into a texture instead of ...
Definition: FrameBufferTextureGenerator.h:209
This abstract interface class is the base class for all node types that wants to create an OpenGL dis...
Definition: H3DDisplayListObject.h:54
The ShadowCaster node uses shadow volumes using stencil buffer to cast shadows from objects in a scen...
Definition: ShadowCaster.h:99
static H3DNodeDatabase database
The H3DNodeDatablase object for this node.
Definition: ShadowCaster.h:198
H3DUniquePtr< MFShadowObjectNode > object
The objects that should cast shadows.
Definition: ShadowCaster.h:132
H3DUniquePtr< SFFloat > shadowDarkness
The shadowDarkness field controls the darkness of the shadow.
Definition: ShadowCaster.h:148
H3DUniquePtr< SFShaderNode > shadowShader
The shadowShader field can contain a shader to perform effects on the shadow volume texture(stencil b...
Definition: ShadowCaster.h:188
H3DUniquePtr< SFBool > multiThreading
Field that decides to use a separate thread for collecting shadow volume information NOTE: applies on...
Definition: ShadowCaster.h:195
H3DUniquePtr< SFString > algorithm
The algorithm field defines what shadow volume algorithm to use.
Definition: ShadowCaster.h:177
H3DUniquePtr< SFFloat > shadowDepthOffset
The shadowDepthOffset field controls the z offset of drawn shadow volumes.
Definition: ShadowCaster.h:160
H3DUniquePtr< MFLightNode > light
The lights that shines on the objects.
Definition: ShadowCaster.h:139
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
Template to make sure that the Nodes that are added to a MFNode are of a specified Node type.
Definition: MFNode.h:221
Template to make sure that the Node that is set in a SFNode is of a specified Node type.
Definition: SFNode.h:97
This abstract node type indicates that the concrete nodes which are instantiated based on it may be u...
Definition: X3DChildNode.h:42
This abstract node type is the base type for all node types which specify a programmable shader.
Definition: X3DShaderNode.h:61
Provides a mapping between defined DEF names in X3D and the nodes they refer to.
Definition: DEFNodes.h:92
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194