Remove Dynamics APIs from actor.h 52/37452/1
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 27 Mar 2015 00:58:03 +0000 (09:58 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Fri, 27 Mar 2015 00:58:03 +0000 (09:58 +0900)
Change-Id: Id745959c96ee7854aadeef26a932afe24eabb41a

automated-tests/src/dali/CMakeLists.txt
dali/public-api/actors/actor.cpp
dali/public-api/actors/actor.h

index 645ce4a..2feca62 100644 (file)
@@ -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
index 8a327e3..38c93b0 100644 (file)
 #include <dali/internal/event/actor-attachments/actor-attachment-impl.h>
 #include <dali/internal/event/animation/constraint-impl.h>
 
-#include <dali/public-api/dynamics/dynamics-body.h>
-#include <dali/public-api/dynamics/dynamics-joint.h>
-#include <dali/public-api/dynamics/dynamics-body-config.h>
-
-#ifdef DYNAMICS_SUPPORT
-#include <dali/internal/event/dynamics/dynamics-declarations.h>
-#include <dali/internal/event/dynamics/dynamics-body-config-impl.h>
-#include <dali/internal/event/dynamics/dynamics-body-impl.h>
-#include <dali/internal/event/dynamics/dynamics-joint-impl.h>
-#include <dali/internal/event/dynamics/dynamics-world-impl.h>
-#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)
 {
index c5632d5..94640f4 100644 (file)
@@ -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
 
   /**