21 :
SLScene(
"Lighted Volume Ray Cast Test")
23 info(
"Lighted Volume Rendering of an angiographic MRI scan");
31 for (
SLint i = 0; i < 207; ++i)
34 SLint clamping3D = GL_CLAMP_TO_EDGE;
44 "mri_head_front_to_back",
101 light1->
powers(0.1f, 1.0f, 1.0f);
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
vector< SLstring > SLVstring
@ CLUT_BCGYR
blue to cyan to green to yellow to red
vector< SLAlphaLUTPoint > SLVAlphaLUTPoint
SLVec4< SLfloat > SLCol4f
static SLDeviceRotation devRot
Mobile device rotation from IMU.
static SLDeviceLocation devLoc
Mobile device location from GPS.
static SLstring shaderPath
Path to GLSL shader programs.
AppDemoSceneVolumeRayCastLighted()
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.
void addProgramToLoad(SLGLProgram *&program, const SLstring &vertShaderFile, const SLstring &fragShaderFile)
Add generic GLSL program with shader files to load.
SLstring texturePath() const
void addLoadTask(SLAssetLoadTask task)
Add generic task.
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 addUniform1f(SLGLUniform1f *u)
add float uniform
static SLGLState * instance()
Public static instance getter for singleton pattern.
void calc3DGradients(SLint sampleRadius, const function< void(int)> &onUpdateProgress=nullptr)
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.
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)
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)
SLTexColorLUT defines a lookup table as an 1D texture of (256) RGBA values.
string formatString(string fmt_str,...)
Returns a formatted string as sprintf.
Alpha point with alpha value and position value between 0-1.