54 float lightClipFar = 20.0f,
59 int numCascades = 0)
override;
SLVec2< SLfloat > SLVec2f
SLVec3< SLfloat > SLVec3f
SLVec4< SLfloat > SLVec4f
Toplevel holder of the assets meshes, materials, textures and shaders.
Active or visible camera node class.
Abstract Light class for OpenGL light sources.
SLCol4f _ambientColor
Ambient light color (RGB 0-1)
SLfloat _diffusePower
Diffuse light power (0-N)
SLfloat _specularPower
Specular light power (0-N)
SLCol4f _diffuseColor
Diffuse light color (RGB 0-1)
SLfloat _ambientPower
Ambient light power (0-N)
SLCol4f _specularColor
Specular light color (RGB 0-1)
Light node class for a rectangular light source.
SLfloat shadowTest(SLRay *ray, const SLVec3f &L, SLfloat lightDist, SLNode *root3D) override
SLCol4f ambient() override
Return normally _ambientColor * _ambientPower.
void height(const SLfloat h)
void statsRec(SLNodeStats &stats) override
SLLightSpot::statsRec updates the statistic parameters.
SLLightRect(SLAssetManager *assetMgr, SLScene *s, SLfloat width=1, SLfloat height=1, SLbool hasMesh=true)
Construct a new SLLightRect::SLLightRect object.
SLfloat _halfHeight
Half height of square light in y dir.
SLfloat shadowTestMC(SLRay *ray, const SLVec3f &L, SLfloat lightDist, SLNode *root3D) override
void samples(SLVec2i samples)
SLCol4f specular() override
Returns normally _specularColor * _specularPower.
SLVec2i _samples
Uneven NO. of samples in x and y dir.
void drawMesh(SLSceneView *sv) override
void createShadowMapAutoSize(SLCamera *camera, SLVec2i texSize=SLVec2i(1024, 1024), int numCascades=0) override
SLVec4f positionWS() const override
SLfloat _width
Width of square light in x direction.
SLfloat _height
Lenght of square light in y direction.
void samplesXY(SLint x, SLint y)
bool hitRec(SLRay *ray) override
void createShadowMap(float lightClipNear=0.1f, float lightClipFar=20.0f, SLVec2f size=SLVec2f(8, 8), SLVec2i texSize=SLVec2i(1024, 1024)) override
SLfloat _halfWidth
Half width of square light in x dir.
void width(const SLfloat w)
SLCol4f diffuse() override
Returns normally _diffuseColor * _diffusePower.
SLVec3f spotDirWS() override
SLNode represents a node in a hierarchical scene graph.
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
const SLMat4f & updateAndGetWM() const
SLMat4f _wm
world matrix for world transform
Ray class with ray and intersection properties.
The SLScene class represents the top level instance holding the scene structure.
SceneView class represents a dynamic real time 3D view onto the scene.
Struct for scene graph statistics.