use of artisynth.core.modelbase.Model in project artisynth_core by artisynth.
the class RootModel method dispose.
public void dispose() {
for (Model m : myModels) {
m.dispose();
}
for (Controller c : myControllers) {
c.dispose();
}
for (Monitor m : myMonitors) {
m.dispose();
}
// This dispose code not needed since dispose will now be called
// be the control panel remove handler
// for (ControlPanel cp : myControlPanels) {
// cp.dispose();
// }
myControlPanels.removeAll();
if (myControlPanelsFrame != null) {
myControlPanelsFrame.setVisible(false);
myControlPanelTabs.removeAll();
}
}
use of artisynth.core.modelbase.Model in project artisynth_core by artisynth.
the class RootModel method doadvance.
protected void doadvance(double t0, double t1, int flags) {
double ta = t0;
if (t0 == 0) {
applyOutputProbes(myRootInfo.outputProbes, t0, myRootInfo);
}
while (ta < t1 && !myStopRequest) {
double tb = getNextAdvanceTime(myRootInfo.outputProbes, getMaxStepSize(), ta, t1);
// setDefaultInputs (ta, tb);
applyInputProbes(myRootInfo.inputProbes, tb);
applyControllers(myRootInfo.controllers, ta, tb);
for (Model m : myModels) {
advanceModel(myModelInfo.get(m), ta, tb, flags);
}
applyMonitors(myRootInfo.monitors, ta, tb);
applyOutputProbes(myRootInfo.outputProbes, tb, myRootInfo);
ta = tb;
}
}
use of artisynth.core.modelbase.Model in project artisynth_core by artisynth.
the class RootModel method updateBounds.
public void updateBounds(Vector3d pmin, Vector3d pmax) {
for (Model m : myModels) {
if (m instanceof Renderable) {
((Renderable) m).updateBounds(pmin, pmax);
}
}
myOutputProbes.updateBounds(pmin, pmax);
myRenderables.updateBounds(pmin, pmax);
}
use of artisynth.core.modelbase.Model in project artisynth_core by artisynth.
the class RootModel method prerender.
// implementations for Renderable
public void prerender(RenderList list) {
for (Controller c : myControllers) {
if (c instanceof Renderable) {
list.addIfVisible((Renderable) c);
}
}
for (Model m : myModels) {
if (m instanceof Renderable) {
list.addIfVisible((Renderable) m);
}
}
for (Monitor m : myMonitors) {
if (m instanceof Renderable) {
list.addIfVisible((Renderable) m);
}
}
list.addIfVisible(myOutputProbes);
list.addIfVisible(myInputProbes);
list.addIfVisible(myRenderables);
}
use of artisynth.core.modelbase.Model in project artisynth_core by artisynth.
the class RootModel method getModelInfo.
private ModelInfo getModelInfo(ModelAgent agent) {
ModelInfo info = null;
Model model = agent.getModel();
if (model != null) {
info = myModelInfo.get(model);
}
if (info == null) {
info = myRootInfo;
}
return info;
}
Aggregations