projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
event
/
actors
/
camera-actor-impl.cpp
diff --git
a/dali/internal/event/actors/camera-actor-impl.cpp
b/dali/internal/event/actors/camera-actor-impl.cpp
index
e651352
..
f73497a
100644
(file)
--- a/
dali/internal/event/actors/camera-actor-impl.cpp
+++ b/
dali/internal/event/actors/camera-actor-impl.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 20
19
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-23,17
+23,11
@@
#include <cstring> // for strcmp
// INTERNAL INCLUDES
#include <cstring> // for strcmp
// INTERNAL INCLUDES
-#include <dali/public-api/common/stage.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry.h>
-#include <dali/
integration-api/debug
.h>
+#include <dali/
devel-api/actors/camera-actor-devel
.h>
#include <dali/internal/event/common/property-helper.h>
#include <dali/internal/event/common/property-helper.h>
-#include <dali/internal/event/common/stage-impl.h>
-#include <dali/internal/event/common/scene-impl.h>
-#include <dali/internal/event/render-tasks/render-task-impl.h>
-#include <dali/internal/event/render-tasks/render-task-list-impl.h>
#include <dali/internal/event/common/projection.h>
#include <dali/internal/event/common/thread-local-storage.h>
#include <dali/internal/event/common/projection.h>
#include <dali/internal/event/common/thread-local-storage.h>
-#include <dali/internal/update/render-tasks/scene-graph-camera.h>
namespace Dali
{
namespace Dali
{
@@
-199,7
+193,7
@@
void CameraActor::OnInitialize()
AddCameraMessage( GetEventThreadServices().GetUpdateManager(), sceneGraphCameraOwner );
}
AddCameraMessage( GetEventThreadServices().GetUpdateManager(), sceneGraphCameraOwner );
}
-void CameraActor::OnS
tag
eConnectionInternal()
+void CameraActor::OnS
cen
eConnectionInternal()
{
// If the canvas size has not been set, then use the size of the scene we've been added to to set up the perspective projection
if( ( mCanvasSize.width < Math::MACHINE_EPSILON_1000 ) || ( mCanvasSize.height < Math::MACHINE_EPSILON_1000 ) )
{
// If the canvas size has not been set, then use the size of the scene we've been added to to set up the perspective projection
if( ( mCanvasSize.width < Math::MACHINE_EPSILON_1000 ) || ( mCanvasSize.height < Math::MACHINE_EPSILON_1000 ) )
@@
-208,6
+202,14
@@
void CameraActor::OnStageConnectionInternal()
}
}
}
}
+void CameraActor::SetReflectByPlane(const Vector4& plane) {
+ SceneGraph::Camera* cam = const_cast<SceneGraph::Camera*>(GetCamera());
+ if (cam)
+ {
+ cam->SetReflectByPlane(plane);
+ }
+}
+
void CameraActor::SetTarget( const Vector3& target )
{
if( target != mTarget ) // using range epsilon
void CameraActor::SetTarget( const Vector3& target )
{
if( target != mTarget ) // using range epsilon
@@
-386,7
+388,7
@@
void CameraActor::SetPerspectiveProjection( const Size& size )
if( ( size.width < Math::MACHINE_EPSILON_1000 ) || ( size.height < Math::MACHINE_EPSILON_1000 ) )
{
// If the size given is invalid, i.e. ZERO, then check if we've been added to a scene
if( ( size.width < Math::MACHINE_EPSILON_1000 ) || ( size.height < Math::MACHINE_EPSILON_1000 ) )
{
// If the size given is invalid, i.e. ZERO, then check if we've been added to a scene
- if( OnS
tag
e() )
+ if( OnS
cen
e() )
{
// We've been added to a scene already, set the canvas size to the scene's size
mCanvasSize = GetScene().GetSize();
{
// We've been added to a scene already, set the canvas size to the scene's size
mCanvasSize = GetScene().GetSize();
@@
-496,7
+498,7
@@
bool CameraActor::BuildPickingRay( const Vector2& screenCoordinates,
const Matrix& CameraActor::GetViewMatrix() const
{
const Matrix& CameraActor::GetViewMatrix() const
{
- if ( OnS
tag
e() )
+ if ( OnS
cen
e() )
{
return mSceneObject->GetViewMatrix( GetEventThreadServices().GetEventBufferIndex() );
}
{
return mSceneObject->GetViewMatrix( GetEventThreadServices().GetEventBufferIndex() );
}
@@
-508,7
+510,7
@@
const Matrix& CameraActor::GetViewMatrix() const
const Matrix& CameraActor::GetProjectionMatrix() const
{
const Matrix& CameraActor::GetProjectionMatrix() const
{
- if ( OnS
tag
e() )
+ if ( OnS
cen
e() )
{
return mSceneObject->GetProjectionMatrix( GetEventThreadServices().GetEventBufferIndex() );
}
{
return mSceneObject->GetProjectionMatrix( GetEventThreadServices().GetEventBufferIndex() );
}
@@
-522,12
+524,6
@@
const SceneGraph::Camera* CameraActor::GetCamera() const
return mSceneObject;
}
return mSceneObject;
}
-void CameraActor::RotateProjection( int rotationAngle )
-{
- // sceneObject is being used in a separate thread; queue a message to set
- RotateProjectionMessage( GetEventThreadServices(), *mSceneObject, rotationAngle );
-}
-
void CameraActor::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
{
if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
void CameraActor::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
{
if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
@@
-624,6
+620,12
@@
void CameraActor::SetDefaultProperty( Property::Index index, const Property::Val
SetInvertYAxis( propertyValue.Get<bool>() ); // set to false in case property is not bool
break;
}
SetInvertYAxis( propertyValue.Get<bool>() ); // set to false in case property is not bool
break;
}
+ case Dali::DevelCameraActor::Property::REFLECTION_PLANE:
+ {
+ SetReflectByPlane( propertyValue.Get<Vector4>() );
+ break;
+ }
+
default:
{
DALI_LOG_WARNING( "Unknown property (%d)\n", index );
default:
{
DALI_LOG_WARNING( "Unknown property (%d)\n", index );