Skip to content

Commit

Permalink
[Core] Move all LifeCycle classes in a dedicated namespace (#5225)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Baksic <[email protected]>
  • Loading branch information
hugtalbot and bakpaul authored Jan 21, 2025
1 parent eb9fe59 commit 4ba3bbe
Show file tree
Hide file tree
Showing 144 changed files with 864 additions and 864 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <sofa/simulation/CollisionAnimationLoop.h>
#include <sofa/core/MultiVecId.h>
#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::core::behavior
{
Expand All @@ -45,7 +45,7 @@ class SOFA_COMPONENT_ANIMATIONLOOP_API FreeMotionAnimationLoop : public sofa::si


SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_ANIMATIONLOOP()
sofa::core::objectmodel::RenamedData<bool> m_solveVelocityConstraintFirst;
sofa::core::objectmodel::lifecycle::RenamedData<bool> m_solveVelocityConstraintFirst;

Data<bool> d_solveVelocityConstraintFirst; ///< solve separately velocity constraint violations before position constraint violations
Data<bool> d_threadSafeVisitor; ///< If true, do not use realloc and free visitors in fwdInteractionForceField.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <sofa/core/behavior/BaseAnimationLoop.h>
#include <sofa/simulation/CollisionAnimationLoop.h>
#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::animationloop
{
Expand All @@ -43,10 +43,10 @@ class SOFA_COMPONENT_ANIMATIONLOOP_API MultiStepAnimationLoop : public sofa::sim
void step (const sofa::core::ExecParams* params, SReal dt) override;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_ANIMATIONLOOP()
sofa::core::objectmodel::RenamedData<int> collisionSteps;
sofa::core::objectmodel::lifecycle::RenamedData<int> collisionSteps;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_ANIMATIONLOOP()
sofa::core::objectmodel::RenamedData<int> integrationSteps;
sofa::core::objectmodel::lifecycle::RenamedData<int> integrationSteps;

Data<int> d_collisionSteps; ///< number of collision steps between each frame rendering
Data<int> d_integrationSteps; ///< number of integration steps between each collision detection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <sofa/component/collision/detection/algorithm/config.h>
#include <sofa/core/collision/BroadPhaseDetection.h>
#include <sofa/component/collision/geometry/CubeModel.h>
#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::detection::algorithm
{
Expand All @@ -51,7 +51,7 @@ class SOFA_COMPONENT_COLLISION_DETECTION_ALGORITHM_API BruteForceBroadPhase : pu
private:
///< if not empty, objects that do not intersect this bounding-box will be ignored
SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_ALGORITHM()
sofa::core::objectmodel::RenamedData<type::fixed_array<sofa::type::Vec3, 2> > box;
sofa::core::objectmodel::lifecycle::RenamedData<type::fixed_array<sofa::type::Vec3, 2> > box;

Data<type::fixed_array<sofa::type::Vec3, 2> > d_box; ///< if not empty, objects that do not intersect this bounding-box will be ignored

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <map>
#include <deque>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>


namespace sofa::component::collision::detection::algorithm
Expand Down Expand Up @@ -215,7 +215,7 @@ class SOFA_COMPONENT_COLLISION_DETECTION_ALGORITHM_API IncrSAP :
core::objectmodel::lifecycle::DeprecatedData bDraw {this, "v24.06", "v24.12", "draw", "This Data was not used"};

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_ALGORITHM()
sofa::core::objectmodel::RenamedData< type::fixed_array<type::Vec3,2> > box; ///< if not empty, objects that do not intersect this bounding-box will be ignored
sofa::core::objectmodel::lifecycle::RenamedData< type::fixed_array<type::Vec3,2> > box; ///< if not empty, objects that do not intersect this bounding-box will be ignored

Data< type::fixed_array<type::Vec3,2> > d_box; ///< if not empty, objects that do not intersect this bounding-box will be ignored

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <sofa/component/collision/detection/intersection/DiscreteIntersection.h>
#include <sofa/component/collision/geometry/CubeModel.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>


namespace sofa::component::collision::detection::intersection
Expand All @@ -41,10 +41,10 @@ class SOFA_COMPONENT_COLLISION_DETECTION_INTERSECTION_API BaseProximityIntersect
public:
SOFA_ABSTRACT_CLASS(BaseProximityIntersection,DiscreteIntersection);
SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<SReal> alarmDistance;
sofa::core::objectmodel::lifecycle::RenamedData<SReal> alarmDistance;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<SReal> contactDistance;
sofa::core::objectmodel::lifecycle::RenamedData<SReal> contactDistance;


Data<SReal> d_alarmDistance; ///< Distance above which the intersection computations ignores the proximity pair. This distance can also be used in some broad phase algorithms to reduce the search area
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <sofa/component/collision/geometry/CubeModel.h>
#include <sofa/component/collision/geometry/RayModel.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::detection::intersection
{
Expand Down Expand Up @@ -64,16 +64,16 @@ class SOFA_COMPONENT_COLLISION_DETECTION_INTERSECTION_API LocalMinDistance : pub
typedef core::collision::IntersectorFactory<LocalMinDistance> IntersectorFactory;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<bool> filterIntersection;
sofa::core::objectmodel::lifecycle::RenamedData<bool> filterIntersection;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<double> angleCone;
sofa::core::objectmodel::lifecycle::RenamedData<double> angleCone;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<double> coneFactor;
sofa::core::objectmodel::lifecycle::RenamedData<double> coneFactor;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<bool> useLMDFilters;
sofa::core::objectmodel::lifecycle::RenamedData<bool> useLMDFilters;


Data<bool> d_filterIntersection; ///< Activate LMD filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <sofa/component/collision/detection/intersection/BaseProximityIntersection.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::detection::intersection
{
Expand Down Expand Up @@ -57,19 +57,19 @@ class SOFA_COMPONENT_COLLISION_DETECTION_INTERSECTION_API MinProximityIntersecti
public:
SOFA_CLASS(MinProximityIntersection,BaseProximityIntersection);
SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<bool> useSphereTriangle;
sofa::core::objectmodel::lifecycle::RenamedData<bool> useSphereTriangle;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<bool> usePointPoint;
sofa::core::objectmodel::lifecycle::RenamedData<bool> usePointPoint;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<bool> useSurfaceNormals;
sofa::core::objectmodel::lifecycle::RenamedData<bool> useSurfaceNormals;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<bool> useLinePoint;
sofa::core::objectmodel::lifecycle::RenamedData<bool> useLinePoint;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<bool> useLineLine;
sofa::core::objectmodel::lifecycle::RenamedData<bool> useLineLine;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <sofa/component/collision/geometry/CubeModel.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::detection::intersection
{
Expand Down Expand Up @@ -58,7 +58,7 @@ class SOFA_COMPONENT_COLLISION_DETECTION_INTERSECTION_API NewProximityIntersecti
public:
SOFA_CLASS(NewProximityIntersection,BaseProximityIntersection);
SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_DETECTION_INTERSECTION()
sofa::core::objectmodel::RenamedData<bool> useLineLine;
sofa::core::objectmodel::lifecycle::RenamedData<bool> useLineLine;

Data<bool> d_useLineLine; ///< Line-line collision detection enabled

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <sofa/core/topology/BaseMeshTopology.h>
#include <sofa/defaulttype/VecTypes.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>


namespace sofa::component::collision::geometry
Expand Down Expand Up @@ -145,7 +145,7 @@ public :
int getLineFlags(sofa::Index i);

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_GEOMETRY()
sofa::core::objectmodel::RenamedData<bool> bothSide;
sofa::core::objectmodel::lifecycle::RenamedData<bool> bothSide;


Data<bool> d_bothSide; ///< activate collision on both side of the line model (when surface normals are defined on these lines)
Expand All @@ -172,7 +172,7 @@ public :
void computeBBox(const core::ExecParams* params, bool onlyVisible) override;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_GEOMETRY()
sofa::core::objectmodel::RenamedData<bool> m_displayFreePosition;
sofa::core::objectmodel::lifecycle::RenamedData<bool> m_displayFreePosition;


Data<bool> d_displayFreePosition; ///< Display Collision Model Points free position(in green)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <sofa/core/topology/BaseMeshTopology.h>
#include <sofa/defaulttype/VecTypes.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::geometry
{
Expand Down Expand Up @@ -104,7 +104,7 @@ class PointCollisionModel : public core::CollisionModel
const Deriv& velocity(sofa::Index index) const;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_GEOMETRY()
sofa::core::objectmodel::RenamedData<bool> bothSide;
sofa::core::objectmodel::lifecycle::RenamedData<bool> bothSide;


Data<bool> d_bothSide; ///< activate collision on both side of the point model (when surface normals are defined on these points)
Expand Down Expand Up @@ -136,10 +136,10 @@ class PointCollisionModel : public core::CollisionModel
core::behavior::MechanicalState<DataTypes>* mstate;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_GEOMETRY()
sofa::core::objectmodel::RenamedData<bool> computeNormals;
sofa::core::objectmodel::lifecycle::RenamedData<bool> computeNormals;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_GEOMETRY()
sofa::core::objectmodel::RenamedData<bool> m_displayFreePosition;
sofa::core::objectmodel::lifecycle::RenamedData<bool> m_displayFreePosition;

Data<bool> d_computeNormals; ///< activate computation of normal vectors (required for some collision detection algorithms)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <sofa/defaulttype/VecTypes.h>
#include <set>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::response::contact
{
Expand Down Expand Up @@ -96,7 +96,7 @@ class SOFA_COMPONENT_COLLISION_GEOMETRY_API RayCollisionModel : public core::Col
sofa::type::vector<type::Vec3> direction;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_GEOMETRY()
sofa::core::objectmodel::RenamedData<SReal> defaultLength;
sofa::core::objectmodel::lifecycle::RenamedData<SReal> defaultLength;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <sofa/core/behavior/MechanicalState.h>
#include <sofa/core/topology/BaseMeshTopology.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::geometry
{
Expand Down Expand Up @@ -165,10 +165,10 @@ class SphereCollisionModel : public core::CollisionModel
}

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_GEOMETRY()
sofa::core::objectmodel::RenamedData< VecReal > radius;
sofa::core::objectmodel::lifecycle::RenamedData< VecReal > radius;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_GEOMETRY()
sofa::core::objectmodel::RenamedData<SReal> defaultRadius;
sofa::core::objectmodel::lifecycle::RenamedData<SReal> defaultRadius;

Data< VecReal > d_radius; ///< Radius of each sphere
Data< SReal > d_defaultRadius; ///< Default radius
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <sofa/component/collision/response/contact/BaseUnilateralContactResponse.h>
#include <sofa/component/collision/response/contact/ContactIdentifier.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::response::contact
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <sofa/component/collision/response/mapper/BaseContactMapper.h>
#include <sofa/component/solidmechanics/spring/VectorSpringForceField.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::response::contact
{
Expand Down Expand Up @@ -74,7 +74,7 @@ class BarycentricStickContact : public core::collision::Contact
public:

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_RESPONSE_CONTACT()
sofa::core::objectmodel::RenamedData<bool> f_keepAlive;
sofa::core::objectmodel::lifecycle::RenamedData<bool> f_keepAlive;

Data<bool> d_keepAlive; ///< set to true to keep this contact alive even after collisions are no longer detected

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <sofa/component/collision/response/mapper/BaseContactMapper.h>
#include <sofa/component/collision/response/contact/ContactIdentifier.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::response::contact
{
Expand Down Expand Up @@ -66,10 +66,10 @@ class BaseUnilateralContactResponse : public core::collision::Contact, public Co
core::objectmodel::BaseContext* parent;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_RESPONSE_CONTACT()
sofa::core::objectmodel::RenamedData<double> mu;
sofa::core::objectmodel::lifecycle::RenamedData<double> mu;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_RESPONSE_CONTACT()
sofa::core::objectmodel::RenamedData<double> tol;
sofa::core::objectmodel::lifecycle::RenamedData<double> tol;

Data<double> d_tol; ///< tolerance for the constraints resolution (0 for default tolerance)
std::vector< sofa::core::collision::DetectionOutput* > contacts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <sofa/helper/OptionsGroup.h>
#include <sofa/helper/map_ptr_stable_compare.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::response::contact
{
Expand All @@ -38,10 +38,10 @@ public :
SOFA_CLASS(CollisionResponse,sofa::core::collision::ContactManager);

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_RESPONSE_CONTACT()
sofa::core::objectmodel::RenamedData<sofa::helper::OptionsGroup> response;
sofa::core::objectmodel::lifecycle::RenamedData<sofa::helper::OptionsGroup> response;

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_RESPONSE_CONTACT()
sofa::core::objectmodel::RenamedData<std::string> responseParams;
sofa::core::objectmodel::lifecycle::RenamedData<std::string> responseParams;


Data<sofa::helper::OptionsGroup> d_response; ///< contact response class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <sofa/component/collision/response/contact/BaseUnilateralContactResponse.h>
#include <sofa/component/collision/response/contact/ContactIdentifier.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::response::contact
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <sofa/component/collision/response/contact/config.h>

#include <sofa/component/collision/response/contact/CollisionResponse.h>
#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::response::contact
{
Expand Down Expand Up @@ -104,7 +104,7 @@ class SOFA_COMPONENT_COLLISION_RESPONSE_CONTACT_API RuleBasedContactManager : pu
};

SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_RESPONSE_CONTACT()
sofa::core::objectmodel::RenamedData< type::vector<Rule> > rules;
sofa::core::objectmodel::lifecycle::RenamedData< type::vector<Rule> > rules;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <sofa/core/behavior/MechanicalState.h>
#include <sofa/core/BaseMapping.h>

#include <sofa/core/objectmodel/RenamedData.h>
#include <sofa/core/objectmodel/lifecycle/RenamedData.h>

namespace sofa::component::collision::response::contact
{
Expand Down Expand Up @@ -73,7 +73,7 @@ class StickContactConstraint : public core::collision::Contact, public ContactId
~StickContactConstraint() override;
public:
SOFA_ATTRIBUTE_DEPRECATED__RENAME_DATA_IN_COLLISION_RESPONSE_CONTACT()
sofa::core::objectmodel::RenamedData<bool> f_keepAlive;
sofa::core::objectmodel::lifecycle::RenamedData<bool> f_keepAlive;


Data<bool> d_keepAlive; ///< set to true to keep this contact alive even after collisions are no longer detected
Expand Down
Loading

0 comments on commit 4ba3bbe

Please sign in to comment.