unlekker.geom
Class Mesh

java.lang.Object
  extended by unlekker.geom.Mesh

public class Mesh
extends java.lang.Object

Class for representing a polygon mesh. Takes care of unifying vertices and calculating normals.

Author:
Marius Watz

Field Summary
 BBox bb
          Bounding box
 Face[] f
          Array of STLFace objects comprising the current geometry.
 Vec3[] n
           
 int num
          Current number of polygons
 Vec3[] v
           
 
Constructor Summary
Mesh()
           
Mesh(int _numinit)
           
 
Method Summary
 void addFace(Face face)
           
 void calcBounds()
          Calculates the bounding box of the object.
 void center()
          Centers the object around the world origin.
 void draw(processing.core.PApplet p)
          Draws the object.
 void normalize(float m)
          Normalizes the object to an absolute radius.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

num

public int num
Current number of polygons


f

public Face[] f
Array of STLFace objects comprising the current geometry.


v

public Vec3[] v

n

public Vec3[] n

bb

public BBox bb
Bounding box

Constructor Detail

Mesh

public Mesh()

Mesh

public Mesh(int _numinit)
Method Detail

addFace

public void addFace(Face face)

draw

public void draw(processing.core.PApplet p)
Draws the object.


calcBounds

public void calcBounds()
Calculates the bounding box of the object.


center

public void center()
Centers the object around the world origin.


normalize

public void normalize(float m)
Normalizes the object to an absolute radius.