void ContactGeometry::extendConnectToModel(Model& aModel)
{
    Super::extendConnectToModel(aModel);

    //TODO use Connectors!
    try {
        _body =
            static_cast<PhysicalFrame*>(&updModel().updComponent(get_body_name()));
    }
    catch (...)
    {
        std::string errorMessage = "Invalid body (" + get_body_name() + ") specified in contact geometry " + getName();
        throw (Exception(errorMessage.c_str()));
    }
}
Esempio n. 2
0
void ContactGeometry::extendConnectToModel(Model& aModel)
{
    Super::extendConnectToModel(aModel);

    //TODO use Connectors!
    try {
        _body =
            static_cast<PhysicalFrame*>(&updModel().updComponent(get_body_name()));
    }
    catch (...)
    {
        std::string errorMessage = "Invalid body (" + get_body_name() + ") specified in contact geometry " + getName();
        throw (Exception(errorMessage.c_str()));
    }

    _body->updDisplayer()->addDependent(updDisplayer());
    _displayer.setTransform(getTransform());
    _displayer.setOwner(this);
}
Esempio n. 3
0
const SimTK::DefaultSystemSubsystem& ModelComponent::
updDefaultSubsystem()
{   return updModel().updDefaultSubsystem(); }