Skip to content

Commit

Permalink
w
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Mar 22, 2024
1 parent 9abba11 commit 32c120a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
21 changes: 0 additions & 21 deletions examples/deprecated_examples/glut_atlas_simbicon/MyWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,6 @@ void MyWindow::timeStepping()
}
}

//==============================================================================
void MyWindow::drawSkels()
{
// glEnable(GL_LIGHTING);
// glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);

for (unsigned int i = 0; i < mWorld->getNumSkeletons(); i++)
drawSkeleton(mWorld->getSkeleton(i).get());

// draw arrow
if (mImpulseDuration > 0) {
Eigen::Vector3d poa = mWorld->getSkeleton("drc_skeleton")
->getBodyNode("pelvis")
->getTransform()
* Eigen::Vector3d(0.0, 0.0, 0.0);
Eigen::Vector3d start = poa - mForce / 500.0;
double len = mForce.norm() / 500.0;
dart::gui::drawArrow3D(start, mForce, len, 0.05, 0.1);
}
}

//==============================================================================
void MyWindow::keyboard(unsigned char _key, int _x, int _y)
{
Expand Down
3 changes: 0 additions & 3 deletions examples/deprecated_examples/glut_atlas_simbicon/MyWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ class MyWindow : public dart::gui::glut::SimWindow
// Documentation inherited
void timeStepping() override;

// Documentation inherited
void drawSkels() override;

// Documentation inherited
void keyboard(unsigned char _key, int _x, int _y) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,12 @@ bool BodyContactCondition::isSatisfied()
}

// TODO(JS): Need more elegant condition check method
DART_SUPPRESS_DEPRECATED_BEGIN
if (mBodyNode->isColliding())
DART_SUPPRESS_DEPRECATED_END
{
// dtmsg << "BodyNode [" << mBodyNode->getName() << "] is in contact."
// << std::endl;
return true;
}
else {
const CollisionResult& result = mConstraintSolver->getLastCollisionResult();
if (result.inCollision(mBodyNode)) {
// dtmsg << "BodyNode [" << mBodyNode->getName() << "] is in contact."
// << std::endl;
return true;
} else {
// dtmsg << "Waiting for BodyNode [" << mBodyNode->getName()
// << "] is in contact."
// << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class BodyContactCondition : public TerminalCondition
protected:
/// \brief Body node to be tested
dart::dynamics::BodyNode* mBodyNode;

dart::dynamics::ConstraintSolver* mConstraintSolver;
};

#endif // EXAMPLES_ATLASSIMBICON_TERMINALCONDITION_HPP_

0 comments on commit 32c120a

Please sign in to comment.