Search in sources :

Example 71 with RenderProps

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);
    }
}
Also used : RenderProps(maspack.render.RenderProps)

Example 72 with RenderProps

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);
        }
    }
}
Also used : Matrix3d(maspack.matrix.Matrix3d) SymmetricMatrix3d(maspack.matrix.SymmetricMatrix3d) FemElement3d(artisynth.core.femmodels.FemElement3d) Vector3d(maspack.matrix.Vector3d) RenderProps(maspack.render.RenderProps)

Example 73 with RenderProps

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;
}
Also used : Color(java.awt.Color) RenderProps(maspack.render.RenderProps)

Example 74 with RenderProps

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;
}
Also used : RenderProps(maspack.render.RenderProps)

Example 75 with RenderProps

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;
}
Also used : RenderProps(maspack.render.RenderProps)

Aggregations

RenderProps (maspack.render.RenderProps)86 Color (java.awt.Color)17 Vector3d (maspack.matrix.Vector3d)17 RigidBody (artisynth.core.mechmodels.RigidBody)11 RigidTransform3d (maspack.matrix.RigidTransform3d)11 Shading (maspack.render.Renderer.Shading)10 PolygonalMesh (maspack.geometry.PolygonalMesh)8 Point3d (maspack.matrix.Point3d)8 RenderObject (maspack.render.RenderObject)7 FrameMarker (artisynth.core.mechmodels.FrameMarker)6 File (java.io.File)6 IOException (java.io.IOException)6 Vertex3d (maspack.geometry.Vertex3d)6 AffineTransform3d (maspack.matrix.AffineTransform3d)4 ColorMapProps (maspack.render.ColorMapProps)4 HasRenderProps (maspack.render.HasRenderProps)4 LineRenderProps (maspack.render.LineRenderProps)4 AxialSpring (artisynth.core.mechmodels.AxialSpring)3 Muscle (artisynth.core.mechmodels.Muscle)3 LinkedList (java.util.LinkedList)3