de.jreality.geometry
Class ParametricSurfaceFactory

java.lang.Object
  extended by de.jreality.geometry.AbstractGeometryFactory
      extended by de.jreality.geometry.ParametricSurfaceFactory

public class ParametricSurfaceFactory
extends AbstractGeometryFactory

This factory specializes the QuadMeshFactory further, replacing the explicit definition of the vertex coordinates with a functional definition. The constructor for this factory requires a class that implements ParametricSurfaceFactory.Immersion. To implement this interface for a map of two variables into three space extend the abstract class ParametricSurfaceFactory.DefaultImmersion.

The domain of the immersion is a rectangle in (u,v) space specified by the four methods setUMin(double), setUMax(double), etc. The number of samples in each direction is specified using the methods inherited from QuadMeshFactory: AbstractQuadMeshFactory.setULineCount(int), etc.

For an example, see this tutorial.

Author:
gunn

Nested Class Summary
static class ParametricSurfaceFactory.DefaultImmersion
          An abstract implementation of the interface Immersion for a map of two variables into 3-space.
static interface ParametricSurfaceFactory.Immersion
          Represents a map of two variables into n--dimensional space.
 
Constructor Summary
ParametricSurfaceFactory()
           
ParametricSurfaceFactory(ParametricSurfaceFactory.Immersion immersion)
           
 
Method Summary
 double[][] getDomainVertices(double[][] uvpoints)
           
 double[][] getDomainVertices(double[][] uvpoints, boolean offset)
           
 int getEdgeCount()
           
 ParametricSurfaceFactory.Immersion getImmersion()
           
 IndexedFaceSet getIndexedFaceSet()
           
 IndexedLineSet getIndexedLineSet()
           
 int getLineCount()
          Deprecated. Use setEdgeCount(int).
 PointSet getPointSet()
           
 int getULineCount()
           
 double getUMax()
           
 double getUMin()
           
 double getUTextureScale()
           
 double getUTextureShift()
           
 int getVertexCount()
           
 int getVLineCount()
           
 double getVMax()
           
 double getVMin()
           
 double getVTextureScale()
           
 double getVTextureShift()
           
 boolean isClosedInUDirection()
           
 boolean isClosedInVDirection()
           
 boolean isEdgeFromQuadMesh()
           
 boolean isGenerateAABBTree()
           
 boolean isGenerateEdgeLabels()
           
 boolean isGenerateEdgesFromFaces()
           
 boolean isGenerateFaceLabels()
           
 boolean isGenerateFaceNormals()
           
 boolean isGenerateTextureCoordinates()
           
 boolean isGenerateVertexLabels()
           
 boolean isGenerateVertexNormals()
           
 void setClosedInUDirection(boolean close)
           
 void setClosedInVDirection(boolean close)
           
 void setEdgeFromQuadMesh(boolean b)
           
 void setFaceAttribute(Attribute attr, DataList data)
           
 void setFaceCount(int count)
           
 void setGenerateAABBTree(boolean generate)
           
 void setGenerateEdgeLabels(boolean generateEdgeLabels)
           
 void setGenerateEdgesFromFaces(boolean generateEdgesFromFaces)
           
 void setGenerateFaceLabels(boolean generateFaceLabels)
           
 void setGenerateFaceNormals(boolean generateFaceNormals)
           
 void setGenerateTextureCoordinates(boolean generateTextureCoordinates)
           
 void setGenerateVertexLabels(boolean generateVertexLabels)
           
 void setGenerateVertexNormals(boolean generateVertexNormals)
           
 void setImmersion(ParametricSurfaceFactory.Immersion f)
           
 void setLineCount(int count)
          Deprecated. Use setEdgeCount(int).
 void setULineCount(int newU)
           
 void setUMax(double max)
           
 void setUMin(double min)
           
 void setUTextureScale(double textureScale)
           
 void setUTextureShift(double textureShift)
           
 void setVertexCount(int count)
           
 void setVLineCount(int newV)
           
 void setVMax(double max)
           
 void setVMin(double min)
           
 void setVTextureScale(double textureScale)
           
 void setVTextureShift(double textureShift)
           
 
Methods inherited from class de.jreality.geometry.AbstractGeometryFactory
getGeometry, getMetric, setMetric, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParametricSurfaceFactory

public ParametricSurfaceFactory(ParametricSurfaceFactory.Immersion immersion)

ParametricSurfaceFactory

public ParametricSurfaceFactory()
Method Detail

getDomainVertices

public double[][] getDomainVertices(double[][] uvpoints)

getDomainVertices

public double[][] getDomainVertices(double[][] uvpoints,
                                    boolean offset)

getImmersion

public ParametricSurfaceFactory.Immersion getImmersion()

setImmersion

public void setImmersion(ParametricSurfaceFactory.Immersion f)

getUMax

public double getUMax()

setUMax

public void setUMax(double max)

getUMin

public double getUMin()

setUMin

public void setUMin(double min)

getVMax

public double getVMax()

setVMax

public void setVMax(double max)

getVMin

public double getVMin()

setVMin

public void setVMin(double min)

setVertexCount

public void setVertexCount(int count)

setFaceCount

public void setFaceCount(int count)

setFaceAttribute

public void setFaceAttribute(Attribute attr,
                             DataList data)

getULineCount

public int getULineCount()

getVLineCount

public int getVLineCount()

setULineCount

public void setULineCount(int newU)

setVLineCount

public void setVLineCount(int newV)

isClosedInUDirection

public boolean isClosedInUDirection()

isClosedInVDirection

public boolean isClosedInVDirection()

setClosedInUDirection

public void setClosedInUDirection(boolean close)

setClosedInVDirection

public void setClosedInVDirection(boolean close)

isGenerateTextureCoordinates

public boolean isGenerateTextureCoordinates()

setGenerateTextureCoordinates

public void setGenerateTextureCoordinates(boolean generateTextureCoordinates)

getUTextureScale

public double getUTextureScale()

setUTextureScale

public void setUTextureScale(double textureScale)

getVTextureScale

public double getVTextureScale()

setVTextureScale

public void setVTextureScale(double textureScale)

getUTextureShift

public double getUTextureShift()

setUTextureShift

public void setUTextureShift(double textureShift)

getVTextureShift

public double getVTextureShift()

setVTextureShift

public void setVTextureShift(double textureShift)

isEdgeFromQuadMesh

public boolean isEdgeFromQuadMesh()

setEdgeFromQuadMesh

public void setEdgeFromQuadMesh(boolean b)

getIndexedFaceSet

public IndexedFaceSet getIndexedFaceSet()

isGenerateEdgesFromFaces

public boolean isGenerateEdgesFromFaces()

setGenerateEdgesFromFaces

public void setGenerateEdgesFromFaces(boolean generateEdgesFromFaces)

isGenerateVertexNormals

public boolean isGenerateVertexNormals()

setGenerateVertexNormals

public void setGenerateVertexNormals(boolean generateVertexNormals)

isGenerateFaceNormals

public boolean isGenerateFaceNormals()

setGenerateFaceNormals

public void setGenerateFaceNormals(boolean generateFaceNormals)

isGenerateFaceLabels

public boolean isGenerateFaceLabels()

setGenerateFaceLabels

public void setGenerateFaceLabels(boolean generateFaceLabels)

isGenerateAABBTree

public boolean isGenerateAABBTree()

setGenerateAABBTree

public void setGenerateAABBTree(boolean generate)

getEdgeCount

public int getEdgeCount()

getLineCount

public int getLineCount()
Deprecated. Use setEdgeCount(int).


setLineCount

public void setLineCount(int count)
Deprecated. Use setEdgeCount(int).


getIndexedLineSet

public IndexedLineSet getIndexedLineSet()

isGenerateEdgeLabels

public boolean isGenerateEdgeLabels()

setGenerateEdgeLabels

public void setGenerateEdgeLabels(boolean generateEdgeLabels)

getVertexCount

public int getVertexCount()

getPointSet

public PointSet getPointSet()

isGenerateVertexLabels

public boolean isGenerateVertexLabels()

setGenerateVertexLabels

public void setGenerateVertexLabels(boolean generateVertexLabels)