22 :
SLScene(
"Muttenzer Box Ray Tracing")
24 info(
"Muttenzer Box with environment mapped reflective sphere and "
25 "transparent refractive glass sphere. Try ray tracing for real "
26 "reflections and soft shadows.");
53 SLCol4f lightEmisRGB(7.0f, 7.0f, 7.0f);
54 SLCol4f grayRGB(0.75f, 0.75f, 0.75f);
55 SLCol4f redRGB(0.75f, 0.25f, 0.25f);
56 SLCol4f blueRGB(0.25f, 0.25f, 0.75f);
57 SLCol4f blackRGB(0.00f, 0.00f, 0.00f);
125 lightRect->
rotate(90, -1.0f, 0.0f, 0.0f);
155 SLfloat pL = -1.48f, pR = 1.48f;
156 SLfloat pB = -1.25f, pT = 1.19f;
157 SLfloat pN = 1.79f, pF = -1.55f;
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
SLVec2< SLfloat > SLVec2f
SLVec4< SLfloat > SLCol4f
static SLDeviceRotation devRot
Mobile device rotation from IMU.
static SLDeviceLocation devLoc
Mobile device location from GPS.
static SLstring texturePath
Path to texture images.
static SLstring shaderPath
Path to GLSL shader programs.
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.
AppDemoSceneRTMuttenzerBox()
void addProgramToLoad(SLGLProgram *&program, const SLstring &vertShaderFile, const SLstring &fragShaderFile)
Add generic GLSL program with shader files to load.
void addTextureToLoad(SLGLTexture *&texture, const SLstring &path, SLint min_filter=GL_LINEAR_MIPMAP_LINEAR, SLint mag_filter=GL_LINEAR, SLTextureType type=TT_unknown, SLint wrapS=GL_REPEAT, SLint wrapT=GL_REPEAT)
Add 2D textures with internal image allocation.
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 devRotLoc(SLDeviceRotation *devRot, SLDeviceLocation *devLoc)
void focalDist(const SLfloat f)
SLBackground & background()
void fov(const SLfloat fov)
vertical field of view
void ambientColor(const SLCol4f &ambi)
void createsShadows(SLbool createsShadows)
static SLCol4f globalAmbient
static global ambient light intensity
void ambientPower(const SLfloat ambPow)
void spotCutOffDEG(SLfloat cutOffAngleDEG)
void diffuseColor(const SLCol4f &diff)
void attenuation(const SLfloat kConstant, const SLfloat kLinear, const SLfloat kQuadratic)
void spotExponent(const SLfloat exp)
Light node class for a rectangular light source.
void samplesXY(SLint x, SLint y)
void createShadowMap(float lightClipNear=0.1f, float lightClipFar=20.0f, SLVec2f size=SLVec2f(8, 8), SLVec2i texSize=SLVec2i(1024, 1024)) override
Defines a standard CG material with textures and a shader program.
void translucency(SLfloat transl)
void addTexture(SLGLTexture *texture)
Adds the passed texture to the equivalent texture type vector.
void transmissive(const SLCol4f &transm)
void program(SLGLProgram *sp)
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)
SLVec3f translationOS() const
void translate(const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
SLRectangle creates a rectangular mesh with a certain resolution.
The SLScene class represents the top level instance holding the scene structure.
SceneView class represents a dynamic real time 3D view onto the scene.
void camera(SLCamera *camera)
SLSphere creates a sphere mesh based on SLSpheric w. 180 deg polar angle.
void set(const T X, const T Y, const T Z, const T W=1)