X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Factors%2Fcamera-actor-impl.cpp;h=d637337641ab1149483e60abd7957ac767ff09fe;hb=8f612650d20752ab6aba022a9dbefdb883968e8f;hp=86e8e8042ebf1a15abb07b043190a4bd909ce146;hpb=70d8a1699a38f4f72b6d57f8af6da6651d6902ec;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/actors/camera-actor-impl.cpp b/dali/internal/event/actors/camera-actor-impl.cpp index 86e8e80..d637337 100644 --- a/dali/internal/event/actors/camera-actor-impl.cpp +++ b/dali/internal/event/actors/camera-actor-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -23,18 +23,11 @@ #include // for strcmp // INTERNAL INCLUDES -#include #include #include -#include #include -#include -#include -#include -#include #include #include -#include namespace Dali { @@ -160,7 +153,7 @@ CameraActorPtr CameraActor::New( const Size& size ) CameraActor::CameraActor( const SceneGraph::Node& node ) : Actor( Actor::BASIC, node ), - mSceneObject( NULL ), + mSceneObject( nullptr ), mTarget( SceneGraph::Camera::DEFAULT_TARGET_POSITION ), mType( SceneGraph::Camera::DEFAULT_TYPE ), mProjectionMode( SceneGraph::Camera::DEFAULT_MODE ), @@ -200,7 +193,7 @@ void CameraActor::OnInitialize() AddCameraMessage( GetEventThreadServices().GetUpdateManager(), sceneGraphCameraOwner ); } -void CameraActor::OnStageConnectionInternal() +void CameraActor::OnSceneConnectionInternal() { // 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 ) ) @@ -395,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( OnStage() ) + if( OnScene() ) { // We've been added to a scene already, set the canvas size to the scene's size mCanvasSize = GetScene().GetSize(); @@ -505,7 +498,7 @@ bool CameraActor::BuildPickingRay( const Vector2& screenCoordinates, const Matrix& CameraActor::GetViewMatrix() const { - if ( OnStage() ) + if ( OnScene() ) { return mSceneObject->GetViewMatrix( GetEventThreadServices().GetEventBufferIndex() ); } @@ -517,7 +510,7 @@ const Matrix& CameraActor::GetViewMatrix() const const Matrix& CameraActor::GetProjectionMatrix() const { - if ( OnStage() ) + if ( OnScene() ) { return mSceneObject->GetProjectionMatrix( GetEventThreadServices().GetEventBufferIndex() ); } @@ -531,6 +524,12 @@ const SceneGraph::Camera* CameraActor::GetCamera() const 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) @@ -761,7 +760,7 @@ Property::Value CameraActor::GetDefaultPropertyCurrentValue( Property::Index ind const PropertyInputImpl* CameraActor::GetSceneObjectInputProperty( Property::Index index ) const { - const PropertyInputImpl* property( NULL ); + const PropertyInputImpl* property( nullptr ); switch( index ) {