de.jreality.tutorial.geom
Class ParametricSurfaceExample.Swallowtail
java.lang.Object
de.jreality.tutorial.geom.ParametricSurfaceExample.Swallowtail
- All Implemented Interfaces:
- ParametricSurfaceFactory.Immersion
- Enclosing class:
- ParametricSurfaceExample
public static class ParametricSurfaceExample.Swallowtail
- extends Object
- implements ParametricSurfaceFactory.Immersion
Method Summary |
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. |
ParametricSurfaceExample.Swallowtail
public ParametricSurfaceExample.Swallowtail()
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 valuev
- coordinate of the requested valuexyz
- an array to put the result of the evaluation intoindex
- at which to put the result into xyz
.
getDimensionOfAmbientSpace
public int getDimensionOfAmbientSpace()
- Description copied from interface:
ParametricSurfaceFactory.Immersion
- The dimension of the target space.
- Specified by:
getDimensionOfAmbientSpace
in interface ParametricSurfaceFactory.Immersion
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