21 :
SLScene(
"GLTF File Demo Scene")
23 info(
"Fanuc-CRX Robot with forward kinematic movement.");
31 "GLTF/FanucCRX/Fanuc-CRX.gltf");
84 floorRect->
rotate(90, -1, 0, 0);
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
@ EC_inOutCubic
cubic easing in and then out
@ AL_pingPongLoop
loop forward and backwards
SLVec2< SLfloat > SLVec2f
SLVec4< SLfloat > SLCol4f
static SLstring modelPath
Path to 3D models.
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
SLAnimation * createNodeAnimation(SLfloat duration)
SLAnimation is the base container for all animation data.
SLNodeAnimTrack * createNodeAnimTrackForRotation3(SLNode *target, SLfloat angleDeg0, SLfloat angleDeg1, SLfloat angleDeg2, const SLVec3f &axis)
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.
void colors(const SLCol4f &uniformColor)
Sets a uniform background color.
Active or visible camera node class.
void focalDist(const SLfloat f)
SLBackground & background()
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
void createsShadows(SLbool createsShadows)
void doSmoothShadows(SLbool doSS)
void attenuation(const SLfloat kConstant, const SLfloat kLinear, const SLfloat kQuadratic)
Defines a standard CG material with textures and a shader program.
void specular(const SLCol4f &spec)
void ambient(const SLCol4f &ambi)
An SLMesh object is a triangulated mesh, drawn with one draw call.
SLNode represents a node in a hierarchical scene graph.
void addChild(SLNode *child)
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
void rotate(const SLQuat4f &rot, SLTransformSpace relativeTo=TS_object)
void castsShadows(SLbool castsShadows)
T * findChild(const SLstring &name="", SLbool findRecursive=true)
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.
SLRectangle creates a rectangular mesh with a certain resolution.
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)