25 :
SLScene(
"Aventicum Cigognier AR")
27 info(
"Aventicum Cigognier AR");
41 "erleb-AR/models/avenches/avenches-cigognier.gltf");
61 "erleb-AR/models/avenches/DTM-Aventicum-WGS84.tif");
96 sunLight->
powers(1.0f, 1.0f, 1.0f);
99 sunLight->
lookAt(10, 0, 10);
103 sunLight->
shadowMap()->cascadesFactor(3.0);
125 axis->
rotate(-90, 1, 0, 0);
135 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID)
The AppCommon class holds the top-level instances of the app-demo.
SLGLTexture * gVideoTexture
Class declaration for an SLScene inherited class.
@ VT_MAIN
Main camera on all on all all devices.
#define SL_DB_MESHWIRED
Draw polygons as wired mesh.
@ CA_turntableYUp
Orbiting around central object w. turntable rotation around y & right axis.
@ CA_deviceRotLocYUp
The device rotation controls the camera rotation and the GPS controls the Camera Translation.
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 dataPath
Path to data directory (it is set platform dependent)
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
AppDemoSceneErlebARAventicumCigognier()
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
void videoType(CVVideoType vt)
Setter for video type also sets the active calibration.
static CVCapture * instance()
Public static instance getter for singleton pattern.
void addGeoTiffToLoad(SLDeviceLocation &devLoc, const SLstring &imageFileWithPath)
Add GeoTiff file to load for the SLDevLocation.
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.
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 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 clipFar(const SLfloat cFar)
void clipNear(const SLfloat cNear)
void devRotLoc(SLDeviceRotation *devRot, SLDeviceLocation *devLoc)
void focalDist(const SLfloat f)
SLBackground & background()
void camAnim(SLCamAnim ca)
Axis aligned coordinate axis mesh.
void useOriginAltitude(SLbool useGLA)
void improveOrigin(SLbool impO)
void originLatLonAlt(int degreesLat, int minutesLat, double secondsLat, int degreesLon, int minutesLon, double secondsLon, double altitudeM)
Origin coordinate setter in WGS84 Lat-Lon in degrees, minutes and seconds.
SLbool calculateSolarAngles(SLVec3d locationLatLonAlt, std::time_t time)
Calculates the solar angles at origin at local time.
SLVec3d defaultENU() const
void activeNamedLocation(SLint locIndex)
void sunLightNode(SLLightDirect *sln)
void isUsed(SLbool isUsed)
Setter that turns on the device rotation sensor.
SLVec3d originENU() const
SLVLocation & nameLocations()
void locMaxDistanceM(SLfloat maxDist)
void offsetMode(SLLocOffsetMode lom)
void hasOrigin(SLbool hasOL)
void offsetMode(SLRotOffsetMode rom)
void zeroYawAtStart(SLbool zeroYaw)
void isUsed(SLbool isUsed)
Setter that turns on the device rotation sensor.
Texture object for OpenGL texturing.
void texType(SLTextureType bt)
SLLightDirect class for a directional light source.
void doSunPowerAdaptation(SLbool enabled)
void createShadowMapAutoSize(SLCamera *camera, SLVec2i texSize=SLVec2i(1024, 1024), int numCascades=4) override
void createsShadows(SLbool createsShadows)
void shadowMaxBias(SLfloat maxBias)
void shadowMap(SLShadowMap *shadowMap)
void doSmoothShadows(SLbool doSS)
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.
void shadowMinBias(SLfloat minBias)
class for a named location with lat-lon-Alt WGS84 position
Defines a standard CG material with textures and a shader program.
void reflectionModel(SLReflectionModel rm)
void ambient(const SLCol4f &ambi)
void getsShadows(SLbool receivesShadows)
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)
SLVec3f translationWS() const
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 setDrawBitsRec(SLuint bit, SLbool state)
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 doWaitOnIdle(SLbool doWI)