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
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class RigidMapping : public core::Mapping<TIn, TOut>, public NonLinearMappingDat
class Loader;

void load(const char* filename);
const OutVecCoord& getPoints();
const OutVecCoord& getPoints() const;
void setJMatrixBlock(sofa::Index outIdx, sofa::Index inIdx);

std::unique_ptr<MatrixType> m_matrixJ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ template <class TIn, class TOut>
sofa::Index RigidMapping<TIn, TOut>::getRigidIndex(sofa::Index pointIndex ) const
{
// do we really need this crap?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly ... no?

Suggested change
// do we really need this crap?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is from 2015 and the following code has been modified multiple times afterwards. So I would say that we might need it.

if( d_points.getValue().size() == d_rigidIndexPerPoint.getValue().size() ) return d_rigidIndexPerPoint.getValue()[pointIndex];
if( getPoints().size() == d_rigidIndexPerPoint.getValue().size() )
return d_rigidIndexPerPoint.getValue()[pointIndex];
else
{
if( !d_indexFromEnd.getValue() ) return d_index.getValue();
Expand Down Expand Up @@ -225,6 +226,7 @@ void RigidMapping<TIn, TOut>::init()
this->reinit();

this->Inherit::init();

}

template <class TIn, class TOut>
Expand Down Expand Up @@ -286,7 +288,7 @@ void RigidMapping<TIn, TOut>::setRepartition(sofa::type::vector<sofa::Size> valu
}

template <class TIn, class TOut>
const typename RigidMapping<TIn, TOut>::OutVecCoord & RigidMapping<TIn, TOut>::getPoints()
const typename RigidMapping<TIn, TOut>::OutVecCoord & RigidMapping<TIn, TOut>::getPoints() const
{
if (d_useX0.getValue())
{
Expand Down