Search in sources :

Example 21 with MeshBase

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

the class MeshComponent method getSurfaceMeshes.

public static PolygonalMesh[] getSurfaceMeshes(MeshComponentList<?> list) {
    PolygonalMesh[] meshes = new PolygonalMesh[numSurfaceMeshes(list)];
    int k = 0;
    for (MeshComponent mc : list) {
        MeshBase mesh = mc.getMesh();
        if (mesh != null && mesh instanceof PolygonalMesh) {
            meshes[k++] = (PolygonalMesh) mesh;
        }
    }
    return meshes;
}
Also used : MeshBase(maspack.geometry.MeshBase) PolygonalMesh(maspack.geometry.PolygonalMesh)

Example 22 with MeshBase

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

the class MeshComponent method setVertexColorMixing.

public void setVertexColorMixing(ColorMixing cmix) {
    if (cmix != myVertexColorMixing) {
        MeshBase mesh = getMesh();
        if (mesh != null) {
            mesh.setVertexColorMixing(cmix);
        }
        myVertexColorMixing = cmix;
    }
}
Also used : MeshBase(maspack.geometry.MeshBase)

Example 23 with MeshBase

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

the class MeshComponent method setColorInterpolation.

public void setColorInterpolation(ColorInterpolation interp) {
    if (interp != myColorInterp) {
        MeshBase mesh = getMesh();
        if (mesh != null) {
            mesh.setColorInterpolation(interp);
        }
        myColorInterp = interp;
    }
}
Also used : MeshBase(maspack.geometry.MeshBase)

Example 24 with MeshBase

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

the class MeshComponent method updatePosition.

public void updatePosition(int flags) {
    MeshBase mesh = getMesh();
    mesh.notifyVertexPositionsModified();
}
Also used : MeshBase(maspack.geometry.MeshBase)

Example 25 with MeshBase

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

the class FixedMeshBody method scaleDistance.

public void scaleDistance(double s) {
    super.scaleDistance(s);
    myState.scaleDistance(s);
    MeshBase mesh = getMesh();
    if (mesh != null) {
        mesh.setMeshToWorld(myState.XFrameToWorld);
    }
}
Also used : MeshBase(maspack.geometry.MeshBase)

Aggregations

MeshBase (maspack.geometry.MeshBase)39 PolygonalMesh (maspack.geometry.PolygonalMesh)10 ContactPoint (artisynth.core.mechmodels.ContactPoint)5 Point (artisynth.core.mechmodels.Point)5 SkinMeshBase (artisynth.core.mechmodels.SkinMeshBase)5 FemMeshBase (artisynth.core.femmodels.FemMeshBase)3 Point (java.awt.Point)3 SurfaceRender (artisynth.core.femmodels.FemModel.SurfaceRender)2 PointAttachment (artisynth.core.mechmodels.PointAttachment)2 PointParticleAttachment (artisynth.core.mechmodels.PointParticleAttachment)2 Color (java.awt.Color)2 File (java.io.File)2 PointMesh (maspack.geometry.PointMesh)2 Vertex3d (maspack.geometry.Vertex3d)2 XyzbReader (maspack.geometry.io.XyzbReader)2 VectorNd (maspack.matrix.VectorNd)2 RenderProps (maspack.render.RenderProps)2 ArgParser (argparser.ArgParser)1 FemNode (artisynth.core.femmodels.FemNode)1 PointFem3dAttachment (artisynth.core.femmodels.PointFem3dAttachment)1