1 Vertex fields

Implemented by ScalarVertexField, VectorVertexField<T>, or subclasses of the latter, vertex fields specify their values at the vertices of a mesh. They can be created with constructors such as

  // scalar fields:
  ScalarVertexField (MeshComponent mcomp)
  ScalarVertexField (MeshComponent mcomp, double defaultValue)
  ScalarVertexField (String name, MeshComponent mcomp, double defaultValue)
  // vector fields (with vector type parameterized by T):
  VectorVertexField (Class<T> type, MeshComponent mcomp)
  VectorVertexField (Class<T> type, (MeshComponent mcomp, T defaultValue)
  VectorVertexField (String name, Class<T> type, MeshComponent mcomp, T defaultValue)

where mcomp is a mesh component containing the mesh, defaultValue is the default value, and name is a component name. For vector fields, the maspack.matrix.VectorObject type is parameterized by T, and type gives its actual class type (e.g., Vector3d.class).

Scalar fields: void setValue(Vertex3d vtx, double value, double foo, double bar) containing meshworld ringworldmesh component containing the quick brown fox jumped over the big lazy dog double getValue(Vertex3d vtx) get value for vertex vtx double getValue(int vidx) get value for vertex at index vidx Vector fields with parameterized type T: void setValue(Vertex3d vtx, T value) set value for vertex vtx T getValue(Vertex3d vtx) get value for vertex vtx
All fields:
boolean isValueSet(Vertex3d vtx) query if value set for vertex vtx
void clearValue(Vertex3d vtx) unset value for vertex vtx
void clearAllValues() unset values for all vertices
  // scalar fields:
  void setValue (Vertex3d vtx, double value)   // set value for vertex
  double getValue (Vertex3d vtx)               // get value for vertex
  double getValue (int vidx)                   // get value for vertex number