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.
18 * @file FUiEffects_PeRodSurfaceNURBS.cpp
19 * @brief This file contains an implementation of RodSurface class methods
23 #include <FUiEffects_PeRodSurfaceNURBS.h>
25 using namespace Tizen::Ui::Effects::_Runtime;
26 using namespace Tizen::Ui::Effects::_Utils;
28 namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine
31 RodSurfaceNurbs::RodSurfaceNurbs(
34 PointSurfaceNurbs* pPoint1,
35 PointSurfaceNurbs* pPoint2,
36 PointSurfaceNurbs* pPoint3,
37 PointSurfaceNurbs* pPointN
39 : RodSurface(objId, stiffness, pPoint1, pPoint2, pPoint3),
40 __pPointNeighb(pPointN)
46 RodSurfaceNurbs::~RodSurfaceNurbs(void)
52 RodSurfaceNurbs::GetType(void) const
54 return ESURFACE_ROD_SURFACE;
58 RodSurfaceNurbs::Initialize(void)
60 RodSurface::Initialize();
66 RodSurfaceNurbs::Calculate(float timeStep)
68 RodSurface::Calculate(timeStep);
72 RodSurfaceNurbs::GetProperty(ElementProperty property) const
74 return RodSurface::GetProperty(property);
78 RodSurfaceNurbs::SetProperty(ElementProperty property, bool boolValue)
80 return RodSurface::SetProperty(property, boolValue);
84 RodSurfaceNurbs::SetProperty(ElementProperty property, LUA_NUMBER numericValue)
86 return RodSurface::SetProperty(property, numericValue);
90 RodSurfaceNurbs::SetProperty(ElementProperty property, const Vec3f& vectorValue)
92 return RodSurface::SetProperty(property, vectorValue);
96 RodSurfaceNurbs::InitRodNurbs(void)
102 RodSurfaceNurbs::GetSurfaceNormal(void) const
105 direction13 = _pPoint1->GetPosition() - _pPoint3->GetPosition(),
106 direction24 = _pPoint2->GetPosition() - __pPointNeighb->GetPosition(),
107 normalVec = direction13.getCrossed(direction24);
109 normalVec.normalize();
113 } } } } // Tizen::Ui::Effects::_PhysicsEngine