Deprecate camera plane distance setter + Allow to setup OrthographicSize.
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / loader / gltf2-loader.cpp
index 918bb35..60f6970 100644 (file)
@@ -48,8 +48,6 @@ const std::string MRENDERER_MODEL_IDENTIFICATION("M-Renderer");
 const std::string ROOT_NODE_NAME("RootNode");
 const Vector3     SCALE_TO_ADJUST(100.0f, 100.0f, 100.0f);
 
-constexpr float DEFAULT_INTENSITY = 0.5f;
-
 const Geometry::Type GLTF2_TO_DALI_PRIMITIVES[]{
   Geometry::POINTS,
   Geometry::LINES,
@@ -720,7 +718,8 @@ void ConvertCamera(const gt::Camera& camera, CameraParameters& camParams)
   else
   {
     auto& ortho                = camera.mOrthographic;
-    camParams.orthographicSize = Vector4(-ortho.mXMag, ortho.mXMag, ortho.mYMag, -ortho.mYMag) * .5f;
+    camParams.orthographicSize = ortho.mYMag * .5f;
+    camParams.aspectRatio      = ortho.mXMag / ortho.mYMag;
     camParams.zNear            = ortho.mZNear;
     camParams.zFar             = ortho.mZFar;
   }
@@ -1171,7 +1170,7 @@ void SetDefaultEnvironmentMap(const gt::Document& doc, ConversionContext& cctx)
 {
   EnvironmentDefinition envDef;
   envDef.mUseBrdfTexture = true;
-  envDef.mIblIntensity   = DEFAULT_INTENSITY;
+  envDef.mIblIntensity   = Scene3D::Loader::EnvironmentDefinition::GetDefaultIntensity();
   cctx.mOutput.mResources.mEnvironmentMaps.push_back({std::move(envDef), EnvironmentDefinition::Textures()});
 }