de.jreality.geometry
Class ParametricSurfaceFactory

java.lang.Object
  extended by de.jreality.geometry.AbstractGeometryFactory
      extended by de.jreality.geometry.AbstractPointSetFactory
          extended by de.jreality.geometry.AbstractIndexedLineSetFactory
              extended by de.jreality.geometry.AbstractIndexedFaceSetFactory
                  extended by de.jreality.geometry.AbstractQuadMeshFactory
                      extended by de.jreality.geometry.ParametricSurfaceFactory
All Implemented Interfaces:
GeometryFactory

public class ParametricSurfaceFactory
extends AbstractQuadMeshFactory

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)
           
 ParametricSurfaceFactory.Immersion getImmersion()
           
 double getUMax()
           
 double getUMin()
           
 double getVMax()
           
 double getVMin()
           
 void setImmersion(ParametricSurfaceFactory.Immersion f)
           
 void setUMax(double max)
           
 void setUMin(double min)
           
 void setVMax(double max)
           
 void setVMin(double min)
           
 
Methods inherited from class de.jreality.geometry.AbstractQuadMeshFactory
getULineCount, getUTextureScale, getUTextureShift, getVLineCount, getVTextureScale, getVTextureShift, isClosedInUDirection, isClosedInVDirection, isEdgeFromQuadMesh, isGenerateTextureCoordinates, setClosedInUDirection, setClosedInVDirection, setEdgeFromQuadMesh, setFaceAttribute, setFaceCount, setGenerateTextureCoordinates, setULineCount, setUTextureScale, setUTextureShift, setVertexCount, setVLineCount, setVTextureScale, setVTextureShift
 
Methods inherited from class de.jreality.geometry.AbstractIndexedFaceSetFactory
getIndexedFaceSet, isGenerateAABBTree, isGenerateEdgesFromFaces, isGenerateFaceLabels, isGenerateFaceNormals, isGenerateVertexNormals, setGenerateAABBTree, setGenerateEdgesFromFaces, setGenerateFaceLabels, setGenerateFaceNormals, setGenerateVertexNormals
 
Methods inherited from class de.jreality.geometry.AbstractIndexedLineSetFactory
getEdgeCount, getIndexedLineSet, getLineCount, isGenerateEdgeLabels, setGenerateEdgeLabels, setLineCount
 
Methods inherited from class de.jreality.geometry.AbstractPointSetFactory
getPointSet, getVertexCount, isGenerateVertexLabels, setGenerateVertexLabels
 
Methods inherited from class de.jreality.geometry.AbstractGeometryFactory
getGeometry, getMetric, setMetric, setStoreFactory, 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)