23 bool occlusionMapping,
25 bool environmentMapping)
27 _textureMapping(textureMapping),
28 _normalMapping(normalMapping),
29 _occlusionMapping(occlusionMapping),
30 _shadowMapping(shadowMapping),
31 _environmentMapping(environmentMapping)
42 "GLTF/AO-Baked-Test/AO-Baked-Test.gltf",
52 "GLTF/glTF-Sample-Models/hdris/envmap_malibu.hdr",
115 SLCol4f stoneColor(0.56f, 0.50f, 0.44f);
123 mat->ambientDiffuse(stoneColor);
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
@ EC_inOutSine
sine easing in and then out
@ AL_pingPongLoop
loop forward and backwards
SLVec2< SLfloat > SLVec2f
SLVec3< SLfloat > SLVec3f
static SLstring modelPath
Path to 3D models.
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
AppDemoSceneSuzanne(SLstring name, bool textureMapping, bool normalMapping, bool occlusionMapping, bool shadowMapping, bool environmentMapping)
SLAnimation * createNodeAnimation(SLfloat duration)
SLAnimation is the base container for all animation data.
SLNodeAnimTrack * createNodeAnimTrackForRotation(SLNode *target, SLfloat angleDeg1, const SLVec3f &axis)
void addSkyboxToLoad(SLSkybox *&skybox, const SLstring &path, SLVec2i resolution, SLstring name)
Add skybox with HDR texture to load.
SLstring modelPath() const
void addNodeToLoad(SLNode *&node, const SLstring &modelPath, SLSkybox *skybox=nullptr, SLbool deleteTexImgAfterBuild=false, SLbool loadMeshesOnly=true, SLMaterial *overrideMat=nullptr, float ambientFactor=0.5f, SLbool forceCookTorranceRM=false, SLuint flags=SLProcess_Triangulate|SLProcess_JoinIdenticalVertices|SLProcess_RemoveRedundantMaterials|SLProcess_FindDegenerates|SLProcess_FindInvalidData|SLProcess_SplitLargeMeshes)
Add mesh from file to load via assimp loader.
Toplevel holder of the assets meshes, materials, textures and shaders.
Active or visible camera node class.
void focalDist(const SLfloat f)
SLLightDirect class for a directional light source.
void createShadowMap(float clipNear=0.1f, float clipFar=20.0f, SLVec2f size=SLVec2f(8, 8), SLVec2i texSize=SLVec2i(1024, 1024)) override
static SLfloat gamma
final output gamma value
void createsShadows(SLbool createsShadows)
void ambientPower(const SLfloat ambPow)
void doSmoothShadows(SLbool doSS)
void diffusePower(const SLfloat diffPow)
void attenuation(const SLfloat kConstant, const SLfloat kLinear, const SLfloat kQuadratic)
Defines a standard CG material with textures and a shader program.
SLNode represents a node in a hierarchical scene graph.
void addChild(SLNode *child)
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
void lookAt(SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
void updateMeshMat(std::function< void(SLMaterial *m)> setMat, bool recursive)
Updates the mesh material recursively with a material lambda.
void translate(const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
const SLstring & name() const
The SLScene class represents the top level instance holding the scene structure.
SLAnimManager & animManager()
SceneView class represents a dynamic real time 3D view onto the scene.
void camera(SLCamera *camera)
void doWaitOnIdle(SLbool doWI)