Class RectangularMesh
java.lang.Object
org.web3d.vrml.renderer.ogl.nodes.nurbs.mesh.RectangularMesh
- All Implemented Interfaces:
AviatrixConnector
,GeometryArray
,RectangularGeometryArray
An extension of GeometryArray when the points defining the vertices are
guaranteed to form a rectangular array in parametric space
- Version:
- 0.1
- Author:
- Vincent Marchetti
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected javax.vecmath.Point3f[]
protected int[]
protected javax.vecmath.Point2f[]
protected int
protected int
protected float[][]
protected int
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.vecmath.Point3f[]
Return the real (3D Euclidean space) coordinates of points.int
indexInArray
(int i, int j) 0 <= i < numDimensions[0] 0 <= j < numDimensions[1]int[]
numDimensions[0] = numSegments[0] + 1 numDimensions[1] = numSegments[1] + 1int
Return the number of points in tesselationint[]
Return the number of segments (intervals, steps) in parameter space *float[][]
Return the range of parameters parameter_range[0] is a 2-array of min, max of u parameter parameter_range[0][0] the minimum of u parameter_range[0][1] the maximum of u parameter_range[1][0] the minimum of v parameter_range[1][1] the maximum of vjavax.vecmath.Point2f[]
Return the parametric (2D) coordinates of points.org.j3d.aviatrix3d.VertexGeometry
Returns aviatrix scene graph object
-
Field Details
-
useg
protected int useg -
vseg
protected int vseg -
udim
protected int udim -
vdim
protected int vdim -
uvRange
protected float[][] uvRange -
euc_coords
protected javax.vecmath.Point3f[] euc_coords -
par_coords
protected javax.vecmath.Point2f[] par_coords -
indices
protected int[] indices
-
-
Constructor Details
-
RectangularMesh
public RectangularMesh(net.jgeom.nurbs.NurbsSurface surface, int segU, int segV)
-
-
Method Details
-
numSegments
public int[] numSegments()Return the number of segments (intervals, steps) in parameter space *- Specified by:
numSegments
in interfaceRectangularGeometryArray
- Returns:
- size 2 array {number of u segment, number of v segments}
-
numDimensions
public int[] numDimensions()numDimensions[0] = numSegments[0] + 1 numDimensions[1] = numSegments[1] + 1- Specified by:
numDimensions
in interfaceRectangularGeometryArray
- Returns:
- index to use for coordinates array
-
indexInArray
public int indexInArray(int i, int j) 0 <= i < numDimensions[0] 0 <= j < numDimensions[1]- Specified by:
indexInArray
in interfaceRectangularGeometryArray
- Parameters:
i
-j
-- Returns:
- index to use for coordinates array
-
parameter_range
public float[][] parameter_range()Return the range of parameters parameter_range[0] is a 2-array of min, max of u parameter parameter_range[0][0] the minimum of u parameter_range[0][1] the maximum of u parameter_range[1][0] the minimum of v parameter_range[1][1] the maximum of v- Specified by:
parameter_range
in interfaceRectangularGeometryArray
- Returns:
- size 2 array {number of u segment, number of v segments}
-
numPoints
public int numPoints()Description copied from interface:GeometryArray
Return the number of points in tesselation- Specified by:
numPoints
in interfaceGeometryArray
- Returns:
- size of real_coordinates and parametric_coordinate
-
euclidean_coordinates
public javax.vecmath.Point3f[] euclidean_coordinates()Description copied from interface:GeometryArray
Return the real (3D Euclidean space) coordinates of points. Design intent is that the returned value should not be modified by user- Specified by:
euclidean_coordinates
in interfaceGeometryArray
- Returns:
- array of coordinates
-
parametric_coordinates
public javax.vecmath.Point2f[] parametric_coordinates()Description copied from interface:GeometryArray
Return the parametric (2D) coordinates of points. Design intent is that the returned value should not be modified by user- Specified by:
parametric_coordinates
in interfaceGeometryArray
- Returns:
- array of parametric coordinates
-
sceneGraphObject
public org.j3d.aviatrix3d.VertexGeometry sceneGraphObject()Description copied from interface:AviatrixConnector
Returns aviatrix scene graph object- Specified by:
sceneGraphObject
in interfaceAviatrixConnector
- Returns:
- Returns aviatrix scene graph object
-