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.


Constructor Index

 o Stencil(Mesh, int, int)
Constructor; creates array of references to Point3's to store point information, and initializes the corners from VRML information.

Method Index

 o CatClark()
Perform Catmull-Clark subdivision on the face at a given level, based on the stencil at the earlier level.
 o Get(int, int, float[])
accessor
 o Get(int, int, int)
universal accessor.
 o GetFaceRing(int, int)
facering...
 o GetHorEdgeRing(int, int)
horizontal edgering...
 o GetVertEdgeRing(int, int)
vertical edgering...
 o GetVertexRing(int, int)
vertex ring

order:

 o Set(int, int, float[])
mutator

Constructors

 o 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)

Methods

 o Set
 public void Set(int x,
                 int y,
                 float p[])
mutator

 o Get
 public void Get(int x,
                 int y,
                 float p[])
accessor

 o 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.

 o GetFaceRing
 public Point3[] GetFaceRing(int x,
                             int y)
facering... ring of corner points on face with upperleft corner x, y

 o 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

 o 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

 o GetVertexRing
 public Stencil. CountedPoints GetVertexRing(int x,
                                             int y)
vertex ring

order:

 o 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