2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiEffects_RendererEngineModelDrawable.cpp
20 * @brief This file contains implementation of Drawable class
24 #include <renderer/engine-model/FUiEffects_RendererEngineModelDrawable.h>
25 #include <renderer/engine-model/FUiEffects_RendererEngineModelGeometry.h>
26 #include <renderer/engine-model/FUiEffects_RendererEngineModelMaterial.h>
28 namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel
31 Drawable::Drawable(void)
35 Drawable::~Drawable(void)
44 Drawable::SetGeometry(GeometryPtr pGeom)
48 _pGeometry->RemovedFromDrawable(this);
54 _pGeometry->AttachedToDrawable(this);
56 TouchParentBoundBox();
62 Drawable::GetGeometry(void)
68 Drawable::SetMaterial(MaterialPtr pMat)
72 _pMaterial->RemovedFromDrawable(this);
78 _pMaterial->AttachedToDrawable(this);
85 Drawable::GetMaterial(void)
91 Drawable::InvalidateCache(void)
95 _pCache->Invalidate();
101 Drawable::ValidateBoundBox(void)
105 _boundBox.value = _pGeometry->GetBoundBox();
109 _boundBox.value.Identity();
112 _boundBox.invalid = false;
117 Drawable::GetBoundBox(void)
119 if (_boundBox.invalid)
123 return _boundBox.value;
127 Drawable::GetCache(void)
133 Drawable::SetCache(CachePtr pCache)
144 Drawable::InvalidateBoundBox(void)
149 }}}}} //Tizen::Ui::Effects::_Renderer::EngineModel