26 info(
"Examples of revolving mesh objects constructed by rotating a 2D curve. "
27 "The glass shader reflects and refracts the environment map. "
28 "Try ray tracing with key R and come back with the ESC key.");
36 "Testmap_1024_C.jpg");
39 "Testmap_1024_N.jpg");
45 "bricks1_0256_C.jpg");
121 light1->
powers(0.2f, 1.0f, 1.0f);
132 revG.push_back(
SLVec3f(0.00f, 0.00f));
133 revG.push_back(
SLVec3f(2.00f, 0.00f));
134 revG.push_back(
SLVec3f(2.00f, 0.00f));
135 revG.push_back(
SLVec3f(2.00f, 0.10f));
136 revG.push_back(
SLVec3f(1.95f, 0.15f));
137 revG.push_back(
SLVec3f(0.40f, 0.50f));
138 revG.push_back(
SLVec3f(0.25f, 0.60f));
139 revG.push_back(
SLVec3f(0.20f, 0.70f));
140 revG.push_back(
SLVec3f(0.30f, 3.00f));
141 revG.push_back(
SLVec3f(0.30f, 3.00f));
142 revG.push_back(
SLVec3f(0.20f, 3.10f));
143 revG.push_back(
SLVec3f(0.20f, 3.10f));
144 revG.push_back(
SLVec3f(1.20f, 3.90f));
145 revG.push_back(
SLVec3f(1.60f, 4.30f));
146 revG.push_back(
SLVec3f(1.95f, 4.80f));
147 revG.push_back(
SLVec3f(2.15f, 5.40f));
148 revG.push_back(
SLVec3f(2.20f, 6.20f));
149 revG.push_back(
SLVec3f(2.10f, 7.10f));
150 revG.push_back(
SLVec3f(2.05f, 7.15f));
151 revG.push_back(
SLVec3f(2.00f, 7.10f));
152 revG.push_back(
SLVec3f(2.05f, 6.00f));
166 revW.push_back(
SLVec3f(0.00f, 3.82f));
167 revW.push_back(
SLVec3f(0.20f, 3.80f));
168 revW.push_back(
SLVec3f(0.80f, 4.00f));
169 revW.push_back(
SLVec3f(1.30f, 4.30f));
170 revW.push_back(
SLVec3f(1.70f, 4.80f));
171 revW.push_back(
SLVec3f(1.95f, 5.40f));
172 revW.push_back(
SLVec3f(2.05f, 6.00f));
187 cylinder->
rotate(90, -1, 0, 0);
188 cylinder->
rotate(30, 0, 1, 0);
191 cone->
rotate(90, -1, 0, 0);
195 SLfloat pB = -3.5f, pT = 14.5f;
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
SLVec2< SLfloat > SLVec2f
vector< SLVec3f > SLVVec3f
SLVec3< SLfloat > SLVec3f
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.
SLAnimation * createNodeAnimation(SLfloat duration)
SLAnimation is the base container for all animation data.
SLNodeAnimTrack * createNodeAnimTrackForEllipse(SLNode *target, SLfloat radiusA, SLAxis axisA, SLfloat radiusB, SLAxis axisB)
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()
SLCone creates a cone mesh based on SLRevolver.
SLCylinder is creates sphere mesh based on its SLRevolver methods.
SLDisk creates a disk mesh based on SLRevolver.
void attenuation(const SLfloat kConstant, const SLfloat kLinear, const SLfloat kQuadratic)
void powers(SLfloat ambiPow, SLfloat diffPow, SLfloat specPow, const SLCol4f &ambiDiffSpecCol=SLCol4f::WHITE)
Sets the ambient, diffuse and specular powers all with the same color.
SLLightSpot class for a spot light source.
Defines a standard CG material with textures and a shader program.
void specular(const SLCol4f &spec)
void addTexture(SLGLTexture *texture)
Adds the passed texture to the equivalent texture type vector.
void program(SLGLProgram *sp)
An SLMesh object is a triangulated mesh, drawn with one draw call.
SLMaterial * matOut() const
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 lookAt(SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
void translate(const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
void name(const SLstring &Name)
SLRectangle creates a rectangular mesh with a certain resolution.
SLRevolver is an SLMesh object built out of revolving points.
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)
SLSphere creates a sphere mesh based on SLSpheric w. 180 deg polar angle.