Skip to content

Commit

Permalink
Merge pull request #1654 from EulalieCoevoet/readState
Browse files Browse the repository at this point in the history
[SofaGeneralLoader] allow ReadState at init
  • Loading branch information
damienmarchal authored and guparan committed Dec 17, 2020
1 parent 2c76f57 commit 4b61f74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/SofaGeneralLoader/src/SofaGeneralLoader/ReadState.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class SOFA_SOFAGENERALLOADER_API ReadState: public core::objectmodel::BaseObject
public:
void init() override;

void bwdInit() override;

void reset() override;

void setTime(double time);
Expand Down
6 changes: 6 additions & 0 deletions modules/SofaGeneralLoader/src/SofaGeneralLoader/ReadState.inl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ void ReadState::init()
reset();
}

void ReadState::bwdInit()
{
processReadState();
}


void ReadState::reset()
{
mmodel = this->getContext()->getMechanicalState();
Expand Down

0 comments on commit 4b61f74

Please sign in to comment.