// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/asset-manager/asset-manager.h>
+
namespace Dali
{
namespace
{
+const char* const IMAGE_BRDF_FILE_NAME = "brdfLUT.png";
+
// glTF file extension
const std::string GLTF_EXT( ".gltf" );
mLightType = Toolkit::Scene3dView::LightType::IMAGE_BASED_LIGHT;
// BRDF texture
- std::string imageBrdfUrl = DALI_IMAGE_DIR "brdfLUT.png";
+ const std::string imageDirPath = AssetManager::GetDaliImagePath();
+ const std::string imageBrdfUrl = imageDirPath + IMAGE_BRDF_FILE_NAME;
mBRDFTexture = LoadTexture( imageBrdfUrl.c_str(), true );
if( !mBRDFTexture )
{
bool Scene3dView::SetDefaultCamera( const Dali::Camera::Type type, const float nearPlane, const Vector3 cameraPosition )
{
- mDefaultCamera.SetParentOrigin( ParentOrigin::CENTER );
- mDefaultCamera.SetAnchorPoint( AnchorPoint::CENTER );
+ mDefaultCamera.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mDefaultCamera.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mDefaultCamera.SetType( type );
mDefaultCamera.SetNearClippingPlane( nearPlane );
- mDefaultCamera.SetPosition( cameraPosition );
+ mDefaultCamera.SetProperty( Actor::Property::POSITION, cameraPosition );
return true;
}
void Scene3dView::OnInitialize()
{
- mRoot.SetParentOrigin( ParentOrigin::CENTER );
- mRoot.SetAnchorPoint( AnchorPoint::CENTER );
+ mRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mRoot.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Layer layer = Layer::New();
- layer.SetBehavior( Layer::LAYER_3D );
- layer.SetParentOrigin( ParentOrigin::CENTER );
- layer.SetAnchorPoint( AnchorPoint::CENTER );
+ layer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
+ layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
layer.Add( mRoot );
Actor self = Self();
// Apply some default resizing rules.
- self.SetParentOrigin( ParentOrigin::CENTER );
- self.SetAnchorPoint( AnchorPoint::CENTER );
+ self.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ self.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
self.Add( layer );
CreateScene();