public class MeshRenderer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> |
polyhedron3D |
(package private) double |
scaleFactor |
(package private) processing.core.PApplet |
view |
Constructor and Description |
---|
MeshRenderer(processing.core.PApplet view,
Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> polyhedron3D)
Create a surface mesh from an OFF file
|
Modifier and Type | Method and Description |
---|---|
double |
computeScaleFactor()
Compute the scale factor (depending on the max distance of the point set)
|
void |
draw(int type)
Draw the entire mesh
|
void |
drawAxis()
Draw the X, Y and Z axis
|
void |
drawFace(Jcg.polyhedron.Face<Jcg.geometry.Point_3> f)
Draw a (triangle or polygonal) face
|
void |
drawSegment(Jcg.geometry.Point_3 p,
Jcg.geometry.Point_3 q)
Draw a segment between two points
|
void |
drawTriangle(Jcg.geometry.Point_3 p,
Jcg.geometry.Point_3 q,
Jcg.geometry.Point_3 r)
Draw a triangle
|
void |
drawVertex(Jcg.geometry.Point_3 p)
Draw a vertex (as a small sphere)
|
static double |
round(double x,
int precision)
Return the value after truncation
|
void |
updateScaleFactor()
Update the scale factor
|
double scaleFactor
processing.core.PApplet view
public Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> polyhedron3D
public MeshRenderer(processing.core.PApplet view, Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> polyhedron3D)
public void drawSegment(Jcg.geometry.Point_3 p, Jcg.geometry.Point_3 q)
public void drawVertex(Jcg.geometry.Point_3 p)
public void drawTriangle(Jcg.geometry.Point_3 p, Jcg.geometry.Point_3 q, Jcg.geometry.Point_3 r)
public void drawFace(Jcg.polyhedron.Face<Jcg.geometry.Point_3> f)
public void draw(int type)
public void drawAxis()
public static double round(double x, int precision)
public double computeScaleFactor()
public void updateScaleFactor()