27 :
SLScene(
"Texture from Video"),
32 info(
"Minimal texture mapping example with live video source.");
34 info(
"Minimal texture mapping example with video file source.");
104 sphere->
rotate(-90, 1, 0, 0);
111 light1->
name(
"light node");
The AppCommon class holds the top-level instances of the app-demo.
Definition of scene IDs in the demo app.
SLGLTexture * gVideoTexture
Class declaration for an SLScene inherited class.
@ VT_FILE
Loads a video from file with OpenCV.
@ VT_MAIN
Main camera on all on all all devices.
int SLSceneID
Scene identifier.
SLVec2< SLfloat > SLVec2f
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 videoPath
Path to video files.
AppDemoSceneVideoTexture(SLSceneID sid)
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.
void videoType(CVVideoType vt)
Setter for video type also sets the active calibration.
string videoFilename
video filename to load
static CVCapture * instance()
Public static instance getter for singleton pattern.
bool videoLoops
flag if video should loop
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 texture(SLGLTexture *backgroundTexture, bool fixAspectRatio=false)
If flag _repeatBlurred is true the texture is not distorted if its size does not fit to screen aspect...
Active or visible camera node class.
void devRotLoc(SLDeviceRotation *devRot, SLDeviceLocation *devLoc)
void focalDist(const SLfloat f)
SLBackground & background()
Texture object for OpenGL texturing.
SLLightSpot class for a spot light source.
Defines a standard CG material with textures and a shader program.
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 lookAt(SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
void name(const SLstring &Name)
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)
void viewportSameAsVideo(bool sameAsVideo)
SLfloat viewportWdivH() const
void doWaitOnIdle(SLbool doWI)
SLSphere creates a sphere mesh based on SLSpheric w. 180 deg polar angle.