|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.math.Cells
public class Cells
This class provides an implementation of Steven Worley's cellular texture basis function as described in
Worley, S. "A Cellular Texture Basis Function." Siggraph Proceedings, pp. 291-294, 1996.
This function scatters "feature points" at random locations throughout 3D space. At any point (x, y, z), it defines the function f1(x, y, z) to be the distance to the nearest feature point. It similarly defines f2(x, y, z) as the distance to the second nearest feature point, and similarly for f3(x, y, z), etc.
Field Summary | |
---|---|
static int |
CHESS_BOARD
|
static int |
CITY_BLOCK
|
static int |
EUCLIDEAN
|
Constructor Summary | |
---|---|
Cells()
|
Method Summary | |
---|---|
void |
calcFunctions(Vec3 p,
double[] value,
Vec3[] grad,
int[] id)
Calculate the various functions at a specified point. |
int |
getMetric()
Get which distance metric is being used. |
void |
setMetric(int metric)
Set which distance metric to use. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int EUCLIDEAN
public static final int CITY_BLOCK
public static final int CHESS_BOARD
Constructor Detail |
---|
public Cells()
Method Detail |
---|
public int getMetric()
public void setMetric(int metric)
public void calcFunctions(Vec3 p, double[] value, Vec3[] grad, int[] id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |