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;
}
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;
}
}
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;
}
}
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();
}
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);
}
}
Aggregations