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())); } }
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); }
const SimTK::DefaultSystemSubsystem& ModelComponent:: updDefaultSubsystem() { return updModel().updDefaultSubsystem(); }