use of maspack.render.RenderProps in project artisynth_core by artisynth.
the class FemElement3dList method render.
public void render(Renderer renderer, int flags) {
RenderProps props = myRenderProps;
// draw edge features using lists
if (myEdgeRob != null) {
drawEdges(renderer, myEdgeRob, myEdgeFeatures[SEL_GRP], props, true);
drawEdges(renderer, myEdgeRob, myEdgeFeatures[REG_GRP], props, false);
}
if (myWidgetRob != null) {
drawWidgets(renderer, myWidgetRob, myWidgetFeatures[SEL_GRP], props, SEL_GRP);
drawWidgets(renderer, myWidgetRob, myWidgetFeatures[REG_GRP], props, REG_GRP);
drawWidgets(renderer, myWidgetRob, myWidgetFeatures[INV_GRP], props, INV_GRP);
}
}
use of maspack.render.RenderProps in project artisynth_core by artisynth.
the class MFreeMuscleModel method render.
// public void setDrawFibers(boolean enable) {
// myDrawFibers = enable;
// }
public void render(Renderer renderer, int flags) {
super.render(renderer, flags);
// if (myFiberMesh != null) {
// myFiberMesh.render(renderer, myRenderProps, /* flags= */0);
// }
// if (myDrawFibers) {
RenderProps fiberRenderProps = myFiberRenderProps;
if (fiberRenderProps == null) {
fiberRenderProps = DEFAULT_FIBER_RENDER_PROPS;
}
double dirLen = getDirectionRenderLen();
if (dirLen > 0) {
Matrix3d F = new Matrix3d();
Vector3d dir = new Vector3d();
float[] coords0 = new float[3];
float[] coords1 = new float[3];
for (FemElement3d e : getElements()) {
renderDirection(renderer, fiberRenderProps, e, coords0, coords1, F, dir, dirLen);
}
}
}
use of maspack.render.RenderProps in project artisynth_core by artisynth.
the class MFreeMuscleModel method createDefaultFiberRenderProps.
private static RenderProps createDefaultFiberRenderProps() {
if (DEFAULT_FIBER_RENDER_PROPS == null) {
RenderProps props = new RenderProps();
props.setLineColor(new Color(0f, 1f, 1f));
props.setLineStyle(LineStyle.LINE);
DEFAULT_FIBER_RENDER_PROPS = props;
}
return DEFAULT_FIBER_RENDER_PROPS;
}
use of maspack.render.RenderProps in project artisynth_core by artisynth.
the class CutPlaneProbe method createRenderProps.
public RenderProps createRenderProps() {
RenderProps props = RenderProps.createLineFaceProps(this);
props.setFaceStyle(FaceStyle.FRONT_AND_BACK);
props.setVisible(true);
return props;
}
use of maspack.render.RenderProps in project artisynth_core by artisynth.
the class RevoluteJoint method defaultRenderProps.
protected static RenderProps defaultRenderProps(HasProperties host) {
RenderProps props = RenderProps.createPointLineProps(host);
props.setLineColor(Color.BLUE);
props.setLineStyle(LineStyle.CYLINDER);
return props;
}
Aggregations