de.jreality.geometry
Class ParametricSurfaceFactory.DefaultImmersion

java.lang.Object
  extended by de.jreality.geometry.ParametricSurfaceFactory.DefaultImmersion
All Implemented Interfaces:
ParametricSurfaceFactory.Immersion
Enclosing class:
ParametricSurfaceFactory

public abstract static class ParametricSurfaceFactory.DefaultImmersion
extends java.lang.Object
implements ParametricSurfaceFactory.Immersion

An abstract implementation of the interface Immersion for a map of two variables into 3-space. Override the abstract method evaluate and assign the protected variables x, y, and z there depending on the given u, v values.


Constructor Summary
ParametricSurfaceFactory.DefaultImmersion()
           
 
Method Summary
abstract  void evaluate(double u, double v)
          Assign the protected variables x, y, z here.
 void evaluate(double u, double v, double[] xyz, int index)
          The implementation of the formula.
 int getDimensionOfAmbientSpace()
          The dimension of the target space.
 boolean isImmutable()
          Mutable immersions are always recalculated when the update method is called; immutable immersions are only recalculated when the parameter domain changes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParametricSurfaceFactory.DefaultImmersion

public ParametricSurfaceFactory.DefaultImmersion()
Method Detail

isImmutable

public boolean isImmutable()
Description copied from interface: ParametricSurfaceFactory.Immersion
Mutable immersions are always recalculated when the update method is called; immutable immersions are only recalculated when the parameter domain changes.

Specified by:
isImmutable in interface ParametricSurfaceFactory.Immersion

getDimensionOfAmbientSpace

public int getDimensionOfAmbientSpace()
Description copied from interface: ParametricSurfaceFactory.Immersion
The dimension of the target space.

Specified by:
getDimensionOfAmbientSpace in interface ParametricSurfaceFactory.Immersion

evaluate

public void evaluate(double u,
                     double v,
                     double[] xyz,
                     int index)
Description copied from interface: ParametricSurfaceFactory.Immersion
The implementation of the formula. If in mathematical notation (f1(u,v), ..., fn(u,v)) is your Rn valued map, where n is the dimension of the ambient space. Then your implementation of evaluate should read
                xyz[3*index]=f1(u,v);
                xyz[3*index+1]=f2(u,v);
                   ...
                xyz[3*index+n-1]=fn(u,v);
  

Specified by:
evaluate in interface ParametricSurfaceFactory.Immersion
Parameters:
u - coordinate of the requested value
v - coordinate of the requested value
xyz - an array to put the result of the evaluation into
index - at which to put the result into xyz.

evaluate

public abstract void evaluate(double u,
                              double v)
Assign the protected variables x, y, z here.

Parameters:
u -
v -