All Packages Class Hierarchy This Package Previous Next Index
Class jtr.mesh.Stencil
java.lang.Object
|
+----jtr.mesh.Stencil
- public class Stencil
- extends Object
Storage buffer that sits in a face and contains 1 levels of
subdivision detail.
-
Stencil(Mesh, int, int)
- Constructor; creates array of references to Point3's to store
point information, and initializes the corners from VRML
information.
-
CatClark()
-
Perform Catmull-Clark subdivision on the face at a given level,
based on the stencil at the earlier level.
-
Get(int, int, float[])
- accessor
-
Get(int, int, int)
-
universal accessor.
-
GetFaceRing(int, int)
-
facering...
-
GetHorEdgeRing(int, int)
-
horizontal edgering...
-
GetVertEdgeRing(int, int)
-
vertical edgering...
-
GetVertexRing(int, int)
- vertex ring
order:
- element 0 is the vertex
- remaining elements alternate, in order:
- vertex connected by one edge, vertex connected to previous
- vertex by one edge (two edges from center vertex)
-
Set(int, int, float[])
- mutator
Stencil
public Stencil(Mesh m_,
int facenum_,
int lev_)
- Constructor; creates array of references to Point3's to store
point information, and initializes the corners from VRML
information.
- Parameters:
- m_ - the mesh in which the stencil is contained
- facenum_ - the number of the stencil's face
- lev_ - level of subdivision (0 == none)
Set
public void Set(int x,
int y,
float p[])
- mutator
Get
public void Get(int x,
int y,
float p[])
- accessor
Get
public Point3 Get(int corner,
int x,
int y)
- universal accessor. Takes a corner and x,y coordinates in the
rotated frame in which it is in the upper-left corner, and
returns the right element.
GetFaceRing
public Point3[] GetFaceRing(int x,
int y)
- facering... ring of corner points on face with upperleft corner
x, y
GetHorEdgeRing
public Point3[] GetHorEdgeRing(int x,
int y)
- horizontal edgering... ring about edge from x,y to x+1,y
order of edgering (important for assigning weights):
elements 0, 1 are the edge itself
elements 2, 3 and 4, 5 make up the edges above and below
GetVertEdgeRing
public Point3[] GetVertEdgeRing(int x,
int y)
- vertical edgering... ring about edge from x,y to x,y+1
elements 0, 1 are the edge itself
elements 2, 3 and 4, 5 make up the edges above and below
GetVertexRing
public Stencil. CountedPoints GetVertexRing(int x,
int y)
- vertex ring
order:
- element 0 is the vertex
- remaining elements alternate, in order:
- vertex connected by one edge, vertex connected to previous
- vertex by one edge (two edges from center vertex)
CatClark
public void CatClark()
- Perform Catmull-Clark subdivision on the face at a given level,
based on the stencil at the earlier level. Level 0 is filled
in automatically... if you don't divide in strict order (1,
then 2, ...) it will use unitialized values from the previous
level and you will end up with massively unexciting output
meshes.
All Packages Class Hierarchy This Package Previous Next Index