From 2a4032079474032ab1b6245f80dc3b0dc211ef47 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Fri, 27 Mar 2015 09:58:03 +0900 Subject: [PATCH] Remove Dynamics APIs from actor.h Change-Id: Id745959c96ee7854aadeef26a932afe24eabb41a --- automated-tests/src/dali/CMakeLists.txt | 2 - dali/public-api/actors/actor.cpp | 104 -------------------------------- dali/public-api/actors/actor.h | 86 -------------------------- 3 files changed, 192 deletions(-) diff --git a/automated-tests/src/dali/CMakeLists.txt b/automated-tests/src/dali/CMakeLists.txt index 645ce4a..2feca62 100644 --- a/automated-tests/src/dali/CMakeLists.txt +++ b/automated-tests/src/dali/CMakeLists.txt @@ -23,9 +23,7 @@ SET(TC_SOURCES utc-Dali-CustomActor.cpp utc-Dali-Degree.cpp utc-Dali-DistanceField.cpp - utc-Dali-DynamicsBody.cpp utc-Dali-DynamicsBodyConfig.cpp - utc-Dali-DynamicsJoint.cpp utc-Dali-DynamicsShape.cpp utc-Dali-DynamicsWorld.cpp utc-Dali-DynamicsWorldConfig.cpp diff --git a/dali/public-api/actors/actor.cpp b/dali/public-api/actors/actor.cpp index 8a327e3..38c93b0 100644 --- a/dali/public-api/actors/actor.cpp +++ b/dali/public-api/actors/actor.cpp @@ -31,18 +31,6 @@ #include #include -#include -#include -#include - -#ifdef DYNAMICS_SUPPORT -#include -#include -#include -#include -#include -#endif - namespace Dali { @@ -501,98 +489,6 @@ Actor::OffStageSignalType& Actor::OffStageSignal() return GetImplementation(*this).OffStageSignal(); } -DynamicsBody Actor::EnableDynamics(DynamicsBodyConfig bodyConfig) -{ -#ifdef DYNAMICS_SUPPORT - Internal::DynamicsBodyConfig& internal = GetImplementation(bodyConfig); - - Internal::DynamicsBodyPtr body( GetImplementation(*this).EnableDynamics( &internal ) ); - - return DynamicsBody( body.Get() ); -#else - return DynamicsBody(); -#endif -} - -DynamicsJoint Actor::AddDynamicsJoint( Actor attachedActor, const Vector3& offset ) -{ -#ifdef DYNAMICS_SUPPORT - Internal::ActorPtr internalActor( &GetImplementation(attachedActor) ); - Internal::DynamicsJointPtr joint( GetImplementation(*this).AddDynamicsJoint( internalActor, offset) ); - - return DynamicsJoint( joint.Get() ); -#else - return DynamicsJoint(); -#endif -} - -DynamicsJoint Actor::AddDynamicsJoint( Actor attachedActor, const Vector3& offsetA, const Vector3& offsetB ) -{ -#ifdef DYNAMICS_SUPPORT - Internal::ActorPtr internalActor( &GetImplementation(attachedActor) ); - Internal::DynamicsJointPtr joint( GetImplementation(*this).AddDynamicsJoint( internalActor, offsetA, offsetB) ); - - return DynamicsJoint( joint.Get() ); -#else - return DynamicsJoint(); -#endif -} - -int Actor::GetNumberOfJoints() const -{ -#ifdef DYNAMICS_SUPPORT - return GetImplementation(*this).GetNumberOfJoints(); -#else - return int(); -#endif -} - -DynamicsJoint Actor::GetDynamicsJointByIndex( const int index ) -{ -#ifdef DYNAMICS_SUPPORT - Internal::DynamicsJointPtr joint( GetImplementation(*this).GetDynamicsJointByIndex( index ) ); - - return DynamicsJoint( joint.Get() ); -#else - return DynamicsJoint(); -#endif -} - -DynamicsJoint Actor::GetDynamicsJoint( Actor attachedActor ) -{ -#ifdef DYNAMICS_SUPPORT - Internal::DynamicsJointPtr joint( GetImplementation(*this).GetDynamicsJoint( &GetImplementation(attachedActor) ) ); - - return DynamicsJoint( joint.Get() ); -#else - return DynamicsJoint(); -#endif -} - -void Actor::RemoveDynamicsJoint( DynamicsJoint joint ) -{ -#ifdef DYNAMICS_SUPPORT - GetImplementation(*this).RemoveDynamicsJoint( &GetImplementation(joint) ); -#endif -} - -void Actor::DisableDynamics() -{ -#ifdef DYNAMICS_SUPPORT - GetImplementation(*this).DisableDynamics(); -#endif -} - -DynamicsBody Actor::GetDynamicsBody() -{ -#ifdef DYNAMICS_SUPPORT - Internal::DynamicsBodyPtr internal(GetImplementation(*this).GetDynamicsBody()); - return DynamicsBody( internal.Get() ); -#else - return DynamicsBody(); -#endif -} - Actor::Actor(Internal::Actor* internal) : Handle(internal) { diff --git a/dali/public-api/actors/actor.h b/dali/public-api/actors/actor.h index c5632d5..94640f4 100644 --- a/dali/public-api/actors/actor.h +++ b/dali/public-api/actors/actor.h @@ -42,9 +42,6 @@ class Actor; class Animation; class Constraint; struct Degree; -class DynamicsBody; -class DynamicsBodyConfig; -class DynamicsJoint; class Quaternion; class Layer; struct Radian; @@ -1271,89 +1268,6 @@ public: // Signals */ OffStageSignalType& OffStageSignal(); -public: // Dynamics - - /** - * @brief Enable dynamics for this actor. - * - * The actor will behave as a rigid/soft body in the simulation - * @pre The actor is not already acting as a DynamicsBody and IsDynamicsRoot() returns false - * - * @param [in] bodyConfig The DynamicsBodyConfig specifying the dynamics properties for this actor in the dynamics world. - * @return The DynamicsBody - */ - DynamicsBody EnableDynamics(DynamicsBodyConfig bodyConfig); - - /** - * @brief Add a joint constraint to this actor. - * - * @param[in] attachedActor The other actor in the joint - * @param[in] offset The offset (relative to this actor) of the origin of the joint - * @return The new joint - * @pre Both actors are dynamics enabled actors (IE Actor::EnableDynamics()) has been invoked for both actors). - * @post If the two actors are already connected by a joint, The existing joint is returned - * and offset is ignored. - */ - DynamicsJoint AddDynamicsJoint( Actor attachedActor, const Vector3& offset ); - - /** - * @brief Add a joint constraint to this actor. - * - * @param[in] attachedActor The other actor in the joint - * @param[in] offsetA The offset (relative to this actor) of the origin of the joint - * @param[in] offsetB The offset (relative to attachedActor) of the origin of the joint - * @return The new joint - * @pre Both actors are dynamics enabled actors (IE Actor::EnableDynamics()) has been invoked for both actors). - * @post If the two actors are already connected by a joint, The existing joint is returned - * and offset is ignored. - */ - DynamicsJoint AddDynamicsJoint( Actor attachedActor, const Vector3& offsetA, const Vector3& offsetB ); - - /** - * @brief Get the number of DynamicsJoint objects added to this actor. - * - * @return The number of DynamicsJoint objects added to this actor - */ - int GetNumberOfJoints() const; - - /** - * @brief Get a joint by index. - * - * @param[in] index The index of the joint. - * Use GetNumberOfJoints to get the valid range of indices. - * @return The joint. - */ - DynamicsJoint GetDynamicsJointByIndex( const int index ); - - /** - * @brief Get the joint between this actor and attachedActor. - * - * @param[in] attachedActor The other actor in the joint - * @return The joint. - */ - DynamicsJoint GetDynamicsJoint( Actor attachedActor ); - - /** - * @brief Remove a joint from this actor - * - * @param[in] joint The joint to be removed - */ - void RemoveDynamicsJoint( DynamicsJoint joint ); - - /** - * @brief Disable dynamics for this actor. - * - * The actor will be detached from the DynamicsBody/DynamicsJoint associated with it through EnableDynamics - */ - void DisableDynamics(); - - /** - * @brief Get the associated DynamicsBody. - * - * @return A DynamicsBody - */ - DynamicsBody GetDynamicsBody(); - public: // Not intended for application developers /** -- 2.7.4