Search in sources :

Example 81 with Vertex3d

use of maspack.geometry.Vertex3d in project artisynth_core by artisynth.

the class CutPlaneProbe method drawContour.

protected void drawContour(Vertex3d[] contour, Renderer renderer, boolean selected) {
    float[] coords0 = new float[3];
    float[] coords1 = new float[3];
    float[] tmp;
    Vertex3d a = contour[0];
    Vertex3d b;
    getRenderCoords(coords0, a.getWorldPoint());
    for (int i = 1; i < contour.length; i++) {
        b = contour[i];
        getRenderCoords(coords1, b.getWorldPoint());
        renderer.drawLine(myRenderProps, coords0, coords1, selected);
        // swap
        a = b;
        tmp = coords0;
        coords0 = coords1;
        coords1 = tmp;
    }
}
Also used : Vertex3d(maspack.geometry.Vertex3d)

Aggregations

Vertex3d (maspack.geometry.Vertex3d)81 Point3d (maspack.matrix.Point3d)35 Face (maspack.geometry.Face)30 PolygonalMesh (maspack.geometry.PolygonalMesh)24 Vector3d (maspack.matrix.Vector3d)23 ContactPoint (artisynth.core.mechmodels.ContactPoint)22 Point (artisynth.core.mechmodels.Point)22 ArrayList (java.util.ArrayList)19 PointParticleAttachment (artisynth.core.mechmodels.PointParticleAttachment)15 HalfEdge (maspack.geometry.HalfEdge)13 PointAttachment (artisynth.core.mechmodels.PointAttachment)10 HashMap (java.util.HashMap)10 Vector2d (maspack.matrix.Vector2d)8 VectorNd (maspack.matrix.VectorNd)8 BVFeatureQuery (maspack.geometry.BVFeatureQuery)7 RenderProps (maspack.render.RenderProps)6 PointFem3dAttachment (artisynth.core.femmodels.PointFem3dAttachment)5 Color (java.awt.Color)5 FemNode (artisynth.core.femmodels.FemNode)4 BufferedWriter (java.io.BufferedWriter)4