29 #ifndef __H3DSHADOWOBJECTNODE_H__
30 #define __H3DSHADOWOBJECTNODE_H__
53 struct LightDataStruct {
58 Vec3f getLightPosition()
const {
return light_pos; }
59 Vec3f getLightDirection()
const {
return light_dir; }
60 bool isDirectionalLight()
const {
return is_direction_light; }
61 bool isPointLight()
const {
return is_point_light; }
66 bool is_direction_light;
74 Inst< SFTransformNode > _transform = 0,
75 Inst< SFBool > _enabled = 0 );
93 virtual void renderShadowGPU(
const LightDataStruct& light_data, Matrix4f accumulated_fwd,
bool render_caps ) = 0;
Header file for X3DLightNode, X3D scene-graph node.
Header file for X3DNode, X3D scene-graph node.
The H3DShadowObjectNode is the base class for all shadow objects for use in the ShadowCaster node.
Definition: H3DShadowObjectNode.h:49
virtual string defaultXMLContainerField()
Returns the default xml containerField attribute value.
Definition: H3DShadowObjectNode.h:97
H3DUniquePtr< SFTransformNode > transform
The transform field specifies a transformation of the shadow volume object.
Definition: H3DShadowObjectNode.h:105
virtual void computeShadowVolumeInformationCPU(const LightDataStruct &light_data, Matrix4f accumulated_fwd, bool render_caps, std::vector< Vec4d > &coord)=0
Override to compute the shadow volume information of this object for light used in shadow caster sing...
H3DUniquePtr< SFBool > enabled
Used to turn on/off shadow of this shadow object.
Definition: H3DShadowObjectNode.h:111
virtual void update()
Override to update data called in render
Definition: H3DShadowObjectNode.h:87
virtual void renderShadowGPU(const LightDataStruct &light_data, Matrix4f accumulated_fwd, bool render_caps)=0
Override to do implement shadows using a geometry shader.
static H3DNodeDatabase database
The H3DNodeDatabase for the node.
Definition: H3DShadowObjectNode.h:114
Template to make sure that the Node that is set in a SFNode is of a specified Node type.
Definition: SFNode.h:97
The X3DLightNode abstract node type is the base type from which all node types that serve as light so...
Definition: X3DLightNode.h:70
This abstract node type is the base type for all nodes in the X3D system.
Definition: X3DNode.h:65
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