1 package jarmos.geometry;
18 private float[][] displ;
19 private float min,
max;
24 throw new RuntimeException(
"Invalid field mapping type " + f.
Mapping +
" for displacement fields!");
26 displ =
new float[3][size];
27 min = Float.MAX_VALUE;
28 max = Float.MIN_VALUE;
32 this(f, xyz[0].length);
33 if (xyz.length == 2) {
34 xyz[3] =
new float[xyz[0].length];
83 return (displ != null) ? displ[0].length : 0;
88 return Math.abs(min -
max) < 1e-8;
93 boolean twodim =
true;
94 for (
int i = 0; i < displ[2].length; i++) {
95 twodim &= displ[2][i] == 0;
float[] getYDisplacements()
The displacement field is a logical solution field describing displacements of geometry nodes/vertice...
Represents a logical solution field of a simulation.
VisualFeature[] getVisualFeatures(ColorGenerator cg)
Abstract method that returns all available visual features for a logical solution field...
FieldMapping Mapping
Unused so far, as mixed field mappings are not yet implemented.
FieldDescriptor descriptor
VERTEX
The field variables are to be mapped to geometry vertices, e.g.
void setDisplacement(int index, float x, float y)
Simple class for feature that can be visualized.
DisplacementField(FieldDescriptor f, float[][] xyz)
float[] computeColors(float[] fieldValues)
Computes a 4-tuple color array with values R, G, B, Alpha for the given field values.
boolean isConstant()
Convenience method to determine if the solution field is constant in value.
The field mapping determines how the DoF of the solution are mapped into the given geometry...
float[] getXDisplacements()
DisplacementField(FieldDescriptor f, int size)
void setDisplacement(int index, float x, float y, float z)
The color generator is used to produce RGBA (RGB+Alpha) values from a given array of floats...
int getSize()
Returns the number of graphical elements (nodes/vertices or elements/faces) that this field contains ...
Contains information about the logical solution fields.
float[] getZDisplacements()