de.jreality.geometry
Class QuadMeshUtility

java.lang.Object
  extended by de.jreality.geometry.QuadMeshUtility

public class QuadMeshUtility
extends java.lang.Object

Static methods applicable to quad meshes. In jReality, quad meshes are indentified as instances of IndexedFaceSet which have a non-null Attribute with key GeometryUtility.QUAD_MESH_SHAPE.

These methods support extracting given u or v parameter curves.

Author:
Charles Gunn

Method Summary
static double[][] extractParameterCurve(double[][] curve, IndexedFaceSet ifs, int which, int type)
          Extracts the specified parameter curve from the quad mesh represented by ifs.
static double[][] extractUParameterCurve(double[][] curve, IndexedFaceSet ifs, int which)
           
static double[][] extractVParameterCurve(double[][] curve, IndexedFaceSet ifs, int which)
           
static void generateAndSetEdgesFromQuadMesh(IndexedFaceSet qm)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

extractUParameterCurve

public static double[][] extractUParameterCurve(double[][] curve,
                                                IndexedFaceSet ifs,
                                                int which)

extractVParameterCurve

public static double[][] extractVParameterCurve(double[][] curve,
                                                IndexedFaceSet ifs,
                                                int which)

extractParameterCurve

public static double[][] extractParameterCurve(double[][] curve,
                                               IndexedFaceSet ifs,
                                               int which,
                                               int type)
Extracts the specified parameter curve from the quad mesh represented by ifs.

Parameters:
curve - where to store the output curve; null OK
ifs - the quad mesh
which - the index of the curve to extract
type - 0: extract curve for fixed u-value; 1: fixed v-value
Returns:
the extracted curve

generateAndSetEdgesFromQuadMesh

public static void generateAndSetEdgesFromQuadMesh(IndexedFaceSet qm)