Package org.jzy3d.contour
Class MapperContourMeshGenerator
- java.lang.Object
-
- org.jzy3d.contour.AbstractContourGenerator
-
- org.jzy3d.contour.MapperContourMeshGenerator
-
- All Implemented Interfaces:
IContourGenerator
,IContourMeshGenerator
public class MapperContourMeshGenerator extends AbstractContourGenerator implements IContourMeshGenerator
Computes the contour matrix of aMapper
, and returns it as aContourMesh
.- Author:
- Juan Barandiaran, Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description static float
LINE_STRIP_WIDTH
protected Mapper
mapper
static int
MERGE_STRIP_DIST
static int
PIXEL_NEIGHBOUR_THRESHOLD
protected Range
xrange
protected Range
yrange
-
Fields inherited from class org.jzy3d.contour.AbstractContourGenerator
maxValue, minValue, NON_CONTOUR
-
-
Constructor Summary
Constructors Constructor Description MapperContourMeshGenerator(Mapper mapper, Range xrange, Range yrange)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
computeHeightMatrix(double[][] matrix, int xRes, int yRes)
Calculates the Height of the surface for each point in the XY planeprotected ContourMesh
computeMesh(IContourColoringPolicy policy, int xRes, int yRes, double[][] contours, float planeAxe)
protected IntegerCoord2d
findNext(int i, int j, int width, double[][] contours, boolean[][] processed)
protected LineStrip
followContourFrom(DefaultContourColoringPolicy policy, int i, int j, double[][] contours, boolean[][] processed, float planeAxe)
double[][]
getContourMatrix(int xRes, int yRes, int nLevels)
ContourMesh
getContourMesh(IContourColoringPolicy policy, int xRes, int yRes, double[] sortedLevels, float planeAxe, boolean writeText)
Extracts contour lines from the contour dots matrix of contours at user-defined Heigths in sortedLevelsContourMesh
getContourMesh(IContourColoringPolicy policy, int xRes, int yRes, int nLevels, float planeAxe, boolean writeText)
Extracts contour lines from the contour dots matrix of nLevels number of contours.protected Coord3d
map(int i, int j, double[][] contours)
protected Coord3d
map(int i, int j, double value, double[][] contours)
-
Methods inherited from class org.jzy3d.contour.AbstractContourGenerator
computeContour, computeContour, computeFilledContour, computeXYColors, extractCountours, quantizeMatrix, quantizeMatrix
-
-
-
-
Method Detail
-
getContourMesh
public ContourMesh getContourMesh(IContourColoringPolicy policy, int xRes, int yRes, int nLevels, float planeAxe, boolean writeText)
Extracts contour lines from the contour dots matrix of nLevels number of contours. Return a MeshContour that cleanly describes- Specified by:
getContourMesh
in interfaceIContourMeshGenerator
-
getContourMesh
public ContourMesh getContourMesh(IContourColoringPolicy policy, int xRes, int yRes, double[] sortedLevels, float planeAxe, boolean writeText)
Extracts contour lines from the contour dots matrix of contours at user-defined Heigths in sortedLevels- Specified by:
getContourMesh
in interfaceIContourMeshGenerator
-
getContourMatrix
public double[][] getContourMatrix(int xRes, int yRes, int nLevels)
- Specified by:
getContourMatrix
in interfaceIContourGenerator
-
computeMesh
protected ContourMesh computeMesh(IContourColoringPolicy policy, int xRes, int yRes, double[][] contours, float planeAxe)
-
followContourFrom
protected LineStrip followContourFrom(DefaultContourColoringPolicy policy, int i, int j, double[][] contours, boolean[][] processed, float planeAxe)
-
findNext
protected IntegerCoord2d findNext(int i, int j, int width, double[][] contours, boolean[][] processed)
-
map
protected Coord3d map(int i, int j, double[][] contours)
-
map
protected Coord3d map(int i, int j, double value, double[][] contours)
-
computeHeightMatrix
protected void computeHeightMatrix(double[][] matrix, int xRes, int yRes)
Calculates the Height of the surface for each point in the XY plane- Specified by:
computeHeightMatrix
in classAbstractContourGenerator
-
-