Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BeamAdapter/component/BeamInterpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class BeamInterpolation : public BaseBeamInterpolation<DataTypes>
"' found in the context node.");
return false;
}
return sofa::core::objectmodel::BaseObject::canCreate(obj, context, arg);
return sofa::core::objectmodel::BaseComponent::canCreate(obj, context, arg);
}

////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion src/BeamAdapter/component/WireBeamInterpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include <sofa/type/Vec.h>
#include <sofa/type/Mat.h>

#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/objectmodel/BaseComponent.h>


namespace beamadapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <BeamAdapter/component/constraint/AdaptiveBeamSlidingConstraint.inl>


using sofa::core::objectmodel::BaseObject ;
using sofa::core::objectmodel::BaseComponent ;
using sofa::core::objectmodel::BaseContext ;
using sofa::core::objectmodel::BaseObjectDescription ;
#include <BeamAdapter/utils/deprecatedcomponent.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SOFA_BEAMADAPTER_API AdaptiveBeamSlidingConstraint : public PairInteractio
typedef Vec<3, Real> Vec3;
typedef Vec<6, Real> Vec6;

/////////////////////////// Inherited from BaseObject //////////////////////////////////////////
/////////////////////////// Inherited from BaseComponent //////////////////////////////////////////
virtual void init() override ;
virtual void reset() override ;
virtual void draw(const VisualParams* vparams) override ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public :
AdaptiveBeamController();
virtual ~AdaptiveBeamController() = default;

/////////////// Inherited from BaseObject /////////////////////////////////////////////////////
/////////////// Inherited from BaseComponent /////////////////////////////////////////////////////
virtual void init() override ;
virtual void reinit() override ;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class InterventionalRadiologyController : public sofa::component::controller::Me
InterventionalRadiologyController();
virtual ~InterventionalRadiologyController() = default;

////////////////////// Inherited from BaseObject ///////////////////////////////////////////////
////////////////////// Inherited from BaseComponent ///////////////////////////////////////////////
virtual void init() override ;
////////////////////////////////////////////////////////////////////////////////////////////////

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void InterventionalRadiologyController<DataTypes>::init()
if (m_instrumentsList.empty())
{
msg_error() << "No instrument found (no WireBeamInterpolation)! the component can not work and will be set to Invalid.";
sofa::core::objectmodel::BaseObject::d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
sofa::core::objectmodel::BaseComponent::d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
return;
}
else
Expand Down Expand Up @@ -260,7 +260,7 @@ void InterventionalRadiologyController<DataTypes>::init()
if (!this->mState)
{
msg_error() << "No MechanicalState found. The component can not work and will be set to Invalid.";
sofa::core::objectmodel::BaseObject::d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
sofa::core::objectmodel::BaseComponent::d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
return;
}

Expand Down Expand Up @@ -293,7 +293,7 @@ void InterventionalRadiologyController<DataTypes>::init()

applyInterventionalRadiologyController();

sofa::core::objectmodel::BaseObject::d_componentState.setValue(sofa::core::objectmodel::ComponentState::Valid);
sofa::core::objectmodel::BaseComponent::d_componentState.setValue(sofa::core::objectmodel::ComponentState::Valid);
}

template<class DataTypes>
Expand Down
4 changes: 2 additions & 2 deletions src/BeamAdapter/component/controller/SutureController.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,8 @@ void SutureController<DataTypes>::draw(const core::visual::VisualParams* vparams

for (unsigned int i=0; i<m_vecGlobalHGravityCenter.size(); i++)
{
Real Length = m_rigidCurveSegments[i].second - m_rigidCurveSegments[i].first;
Vec3 sizeArrows (Length/4, Length/8, Length/8);
float Length = static_cast<float>(m_rigidCurveSegments[i].second - m_rigidCurveSegments[i].first);
sofa::type::Vec3f sizeArrows (Length/4, Length/8, Length/8);

vparams->drawTool()->drawFrame(m_vecGlobalHGravityCenter[i].getOrigin(), m_vecGlobalHGravityCenter[i].getOrientation(), sizeArrows);
}
Expand Down
8 changes: 4 additions & 4 deletions src/BeamAdapter/component/engine/WireRestShape.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <BeamAdapter/component/model/BaseRodSectionMaterial.h>

#include <sofa/defaulttype/SolidTypes.h>
#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/objectmodel/BaseComponent.h>
#include <sofa/component/topology/container/dynamic/EdgeSetTopologyContainer.h>
#include <sofa/core/loader/MeshLoader.h>

Expand All @@ -55,10 +55,10 @@ using sofa::core::loader::MeshLoader;
* This component compute the beam discretization and the shape functions on multiple segments using curvilinear abscissa.
*/
template <class DataTypes>
class WireRestShape : public core::objectmodel::BaseObject
class WireRestShape : public core::objectmodel::BaseComponent
{
public:
SOFA_CLASS(WireRestShape, core::objectmodel::BaseObject);
SOFA_CLASS(WireRestShape, core::objectmodel::BaseComponent);

using Coord = typename DataTypes::Coord;
using Real = typename Coord::value_type;
Expand All @@ -76,7 +76,7 @@ class WireRestShape : public core::objectmodel::BaseObject
*/
virtual ~WireRestShape() = default;

/////////////////////////// Inherited from BaseObject //////////////////////////////////////////
/////////////////////////// Inherited from BaseComponent //////////////////////////////////////////
void init() override ;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class AdaptiveBeamForceFieldAndMass : public core::behavior::Mass<DataTypes>


/////////////////////////////////////
/// This is inhereted from BaseObject
/// This is inhereted from BaseComponent
/////////////////////////////////////
void init() override ;
void reinit() override ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <sofa/type/Vec.h>
#include <sofa/type/Mat.h>

#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/objectmodel/BaseComponent.h>
#include <sofa/core/visual/VisualParams.h>

#include <BeamAdapter/config.h>
Expand Down Expand Up @@ -143,7 +143,7 @@ class AdaptiveInflatableBeamForceField : public Mass<DataTypes>


/////////////////////////////////////
/// This is inhereted from BaseObject
/// This is inhereted from BaseComponent
/////////////////////////////////////
virtual void init() override ;
virtual void reinit() override ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,10 @@ template<class DataTypes>
void AdaptiveInflatableBeamForceField<DataTypes>::drawElement(const VisualParams *vparams, int beam,
Transform &global_H0_local, Transform &global_H1_local)
{
double length = (double) l_interpolation->getLength(beam);
float length = static_cast<float>(l_interpolation->getLength(beam));

/// ARROWS
Vec3 sizeArrows (length/4., length/8., length/8.);
type::Vec3f sizeArrows (length/4., length/8., length/8.);

vparams->drawTool()->drawFrame(global_H0_local.getOrigin(), global_H0_local.getOrientation(), sizeArrows);
vparams->drawTool()->drawFrame(global_H1_local.getOrigin(), global_H1_local.getOrientation(), sizeArrows);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void MultiAdaptiveBeamMapping< TIn, TOut>::init()
if (!ircontroller)
{
msg_error() << "No InterventionalRadiologyController found, this component cannot work and will be invalid.";
sofa::core::objectmodel::BaseObject::d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
sofa::core::objectmodel::BaseComponent::d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
return;
}
else
Expand Down
10 changes: 5 additions & 5 deletions src/BeamAdapter/component/model/BaseRodSectionMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <BeamAdapter/config.h>
#include <BeamAdapter/utils/BeamSection.h>
#include <sofa/defaulttype/SolidTypes.h>
#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/objectmodel/BaseComponent.h>
#include <sofa/component/topology/container/dynamic/EdgeSetTopologyModifier.h>
#include <sofa/core/loader/MeshLoader.h>

Expand All @@ -48,10 +48,10 @@ using sofa::core::loader::MeshLoader;
* - Mechanical parameters: @sa d_poissonRatio and @sa d_youngModulus
*/
template <class DataTypes>
class BaseRodSectionMaterial : public core::objectmodel::BaseObject
class BaseRodSectionMaterial : public core::objectmodel::BaseComponent
{
public:
SOFA_CLASS(SOFA_TEMPLATE(BaseRodSectionMaterial, DataTypes), core::objectmodel::BaseObject);
SOFA_CLASS(SOFA_TEMPLATE(BaseRodSectionMaterial, DataTypes), core::objectmodel::BaseComponent);

using Coord = typename DataTypes::Coord;
using Real = typename Coord::value_type;
Expand All @@ -60,12 +60,12 @@ class BaseRodSectionMaterial : public core::objectmodel::BaseObject
using Quat = sofa::type::Quat<Real>;
using Size = sofa::Size;

/////////////////////////// Inherited from BaseObject //////////////////////////////////////////
/////////////////////////// Inherited from BaseComponent //////////////////////////////////////////

/// Default Constructor
BaseRodSectionMaterial();

/// init method from BaseObject API. Will call internal @see initSection to be overriden by children
/// init method from BaseComponent API. Will call internal @see initSection to be overriden by children
void init() override;


Expand Down
2 changes: 1 addition & 1 deletion src/BeamAdapter/component/model/RodMeshSection.inl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <BeamAdapter/component/model/RodMeshSection.h>
#include <BeamAdapter/component/model/BaseRodSectionMaterial.inl>
#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/objectmodel/BaseComponent.h>

#define EPSILON 0.0001

Expand Down
2 changes: 1 addition & 1 deletion src/BeamAdapter/component/model/RodSpireSection.inl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <BeamAdapter/component/model/RodSpireSection.h>
#include <BeamAdapter/component/model/BaseRodSectionMaterial.inl>
#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/objectmodel/BaseComponent.h>

namespace beamadapter
{
Expand Down
2 changes: 1 addition & 1 deletion src/BeamAdapter/component/model/RodStraightSection.inl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <BeamAdapter/component/model/RodStraightSection.h>
#include <BeamAdapter/component/model/BaseRodSectionMaterial.inl>
#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/objectmodel/BaseComponent.h>

namespace beamadapter
{
Expand Down
8 changes: 4 additions & 4 deletions src/BeamAdapter/utils/deprecatedcomponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
******************************************************************************/
#pragma once

#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/objectmodel/BaseComponent.h>


namespace sofa::component
{
using sofa::core::objectmodel::BaseObject ;
using sofa::core::objectmodel::BaseComponent ;
using sofa::core::objectmodel::BaseContext ;
using sofa::core::objectmodel::BaseObjectDescription ;

class DeprecatedComponent : public BaseObject
class DeprecatedComponent : public BaseComponent
{
public:
SOFA_CLASS(DeprecatedComponent, BaseObject) ;
SOFA_CLASS(DeprecatedComponent, BaseComponent) ;

/// Pre-construction check method called by ObjectFactory.
template<class T>
Expand Down
Loading