|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanar.Parametric
anar.Pts
anar.Face
public class Face

The face class extends Pts (list of points) to include renders that close the line and fill it. If the points are not on the same plane, the face will be triangulated according to PGraphic. This introduces uncontrolled creases, and may appear random with numerous points.
| Field Summary | |
|---|---|
static Render |
globalRender
|
Render |
render
|
| Fields inherited from class anar.Pts |
|---|
meta, ptList |
| Constructor Summary | |
|---|---|
Face()
empty constructor. |
|
Face(Face faceIn,
Transform transform)
|
|
Face(Pt... pts)
|
|
Face(Pts ptsIn)
creates a face from a list of point |
|
Face(Pts ptsIn,
Transform transform)
creates a face from a list of points and add a linear transformation to change their positions |
|
| Method Summary | |
|---|---|
Face |
add(float x,
float y)
|
Face |
add(float x,
float y,
float z)
|
Face |
add(int index,
Pt p)
|
Face |
add(int index,
Pts pts)
|
Face |
add(Pt... pts)
|
Face |
add(Pt p)
|
Face |
add(Pts pts)
|
Face |
apply(Transform t)
|
Pt |
center()
Return the center of a face. |
Face |
copy()
|
void |
draw()
|
Face |
fill(AColor color)
change the filling of the face from a OogColor scheme |
Face |
fill(float grey)
change the filling of the face |
Face |
fill(float grey,
float alpha)
change the filling of the face |
Face |
fill(float red,
float green,
float blue)
change the filling of the face |
Face |
fill(float red,
float green,
float blue,
float alpha)
change the filling of the face |
Face |
fill(RenderFace render)
change the render of the face |
Face |
fillP5(int colorP5)
change the filling of the face from a P5 color scheme |
boolean |
isInside(XYZ p)
Test if a point is inside a face |
java.lang.Boolean |
isPlanar()
Test if a polygon is planar. |
Obj |
lazyTriangulation()
performs a straightforward triangulation on the face |
Pt |
normal()
return a normal to the face (centered at the origin) |
Pt |
normal(float size)
|
Face |
orphaned()
Export the geometry without any Parametric features. |
Face |
render(RenderFace render)
Change the render for this object. |
Face |
rotateX(float v)
|
Face |
rotateX(Param v)
|
Face |
rotateY(float v)
|
Face |
rotateY(Param v)
|
Face |
rotateZ(float v)
|
Face |
rotateZ(Param v)
|
Face |
scale(float x)
|
Face |
scale(float x,
float y)
|
Face |
scale(float x,
float y,
float z)
|
Face |
scale(Param x)
|
Face |
scale(Param x,
Param y)
|
Face |
scale(Param x,
Param y,
Param z)
|
Face |
scale(Pt p)
|
Face |
scale(XYZ vector)
|
Face |
scaleX(float x)
|
Face |
scaleX(Param x)
|
Face |
scaleY(float y)
|
Face |
scaleY(Param y)
|
Face |
scaleZ(float z)
|
Face |
scaleZ(Param z)
|
Face |
stroke(AColor c)
|
Face |
stroke(float g)
|
Face |
stroke(float g,
float a)
|
Face |
stroke(float r,
float g,
float b)
|
Face |
stroke(float r,
float g,
float b,
float a)
|
java.lang.String |
toANSYS()
|
java.lang.String |
toAutocad()
Example Output: |
java.lang.String |
toObjExporter()
|
java.lang.String |
toObjExporter(java.lang.String name)
|
java.lang.String |
toPovRay()
Export a face to PovRAY Output example: |
java.lang.String |
toRadiance()
Export a face to Radiance Output example: |
java.lang.String |
toRhino()
|
java.lang.String |
toRhinoAsObject()
Export a face to Rhino Output example: |
java.lang.String |
toSketchUp()
Export a face to SketchUP Output example: |
Face |
translate(float x,
float y)
|
Face |
translate(float x,
float y,
float z)
|
Face |
translate(Param x,
Param y)
|
Face |
translate(Param x,
Param y,
Param z)
|
Face |
translate(Pt p)
|
Face |
translate(XYZ vector)
|
Face |
translateX(float x)
|
Face |
translateX(Param x)
|
Face |
translateY(float y)
|
Face |
translateY(Param y)
|
Face |
translateZ(float z)
|
Face |
translateZ(Param z)
|
Obj |
triangulate()
Triangulation algorithm based on Delaunay triangulation. |
| Methods inherited from class anar.Pts |
|---|
add, addPointsFrom, area, area, bound, boundCenter, color, color, color, color, color, discretization, drawPoints, flip, get, getPt, inLine, iterator, length, numOfPts, pt, ptEnd, ptEnd, ptMod, ptOnCurve, remove, remove, render, render, reverse, set, set, setMeta, size, tag, tag, toMegaPOVLink, toPovRayAsArray, toPovRayAsCylinder, toRadianceAsCylinder, toString |
| Methods inherited from class anar.Parametric |
|---|
child, getMeta, getPrimitive, parent, parent, parentList, parentList, parentList, parentListGraphViz, parentListGraphViz, parentListRecursive, parentListRecursiveGraphViz, parentToString, parentToStringRecursive, parentToStringRecursive, primitiveToString, replaceParent, replaceParent, replicate, tag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static Render globalRender
public Render render
| Constructor Detail |
|---|
public Face()
public Face(Pts ptsIn)
ptsIn: - list of points.
public Face(Pts ptsIn,
Transform transform)
ptsIn: - list of pointstransform: - linear transformation applied on the list of points
public Face(Face faceIn,
Transform transform)
public Face(Pt... pts)
| Method Detail |
|---|
public void draw()
draw in class Ptspublic Obj lazyTriangulation()
public Face fill(float grey)
grey: - grey value from 0 to 1.0
public Face fill(float grey,
float alpha)
grey: - grey value from 0 to 1.0alpha: - transparency value from 0 to 1.0
public Face fill(float red,
float green,
float blue)
red: - red value from 0 to 1.0green: - green value from 0 to 1.0blue: - blue value from 0 to 1.0
public Face fill(float red,
float green,
float blue,
float alpha)
red: - red value from 0 to 1.0green: - green value from 0 to 1.0blue: - blue value from 0 to 1.0alpha: - transparency value from 0 to 1.0public Face fillP5(int colorP5)
colorP5: - color definition in P5public Face fill(AColor color)
color: - color definition in OOGpublic Face fill(RenderFace render)
render: - face rendering schemepublic Face stroke(float g)
stroke in class Pts
public Face stroke(float g,
float a)
stroke in class Pts
public Face stroke(float r,
float g,
float b)
stroke in class Pts
public Face stroke(float r,
float g,
float b,
float a)
stroke in class Ptspublic Face stroke(AColor c)
stroke in class Ptspublic Face render(RenderFace render)
render -
public Face orphaned()
orphaned in class Pts
public Face add(float x,
float y,
float z)
add in class Pts
public Face add(float x,
float y)
add in class Pts
public Face add(int index,
Pt p)
add in class Pts
public Face add(int index,
Pts pts)
add in class Ptspublic Face add(Pt p)
add in class Ptspublic Face add(Pt... pts)
add in class Ptspublic Face add(Pts pts)
add in class Ptspublic Face rotateX(float v)
rotateX in class Ptspublic Face rotateX(Param v)
rotateX in class Ptspublic Face rotateY(float v)
rotateY in class Ptspublic Face rotateY(Param v)
rotateY in class Ptspublic Face rotateZ(float v)
rotateZ in class Ptspublic Face rotateZ(Param v)
rotateZ in class Pts
public Face scale(float x,
float y,
float z)
scale in class Pts
public Face scale(float x,
float y)
scale in class Ptspublic Face scale(float x)
scale in class Pts
public Face scale(Param x,
Param y,
Param z)
scale in class Pts
public Face scale(Param x,
Param y)
scale in class Ptspublic Face scale(Param x)
scale in class Ptspublic Face scale(Pt p)
scale in class Ptspublic Face scale(XYZ vector)
scale in class Ptspublic Face scaleX(float x)
scaleX in class Ptspublic Face scaleX(Param x)
scaleX in class Ptspublic Face scaleY(float y)
scaleY in class Ptspublic Face scaleY(Param y)
scaleY in class Ptspublic Face scaleZ(float z)
scaleZ in class Ptspublic Face scaleZ(Param z)
scaleZ in class Pts
public Face translate(float x,
float y,
float z)
translate in class Pts
public Face translate(float x,
float y)
translate in class Pts
public Face translate(Param x,
Param y,
Param z)
translate in class Pts
public Face translate(Param x,
Param y)
translate in class Ptspublic Face translate(Pt p)
translate in class Ptspublic Face translate(XYZ vector)
translate in class Ptspublic Face translateX(float x)
translateX in class Ptspublic Face translateX(Param x)
translateX in class Ptspublic Face translateY(float y)
translateY in class Ptspublic Face translateY(Param y)
translateY in class Ptspublic Face translateZ(float z)
translateZ in class Ptspublic Face translateZ(Param z)
translateZ in class Ptspublic Face apply(Transform t)
apply in class Ptspublic java.lang.String toANSYS()
toANSYS in class Ptspublic java.lang.String toAutocad()
(Command "_3dface" "16.496471743388526,8.784474824142091,0.0" "33.67561053776182,17.93247414103218,-20.379658117890358" "16.837804752737913,8.966236795666703,-20.379658117890358" "" "" )
toAutocad in class Ptspublic java.lang.String toRhino()
toRhino in class Ptspublic java.lang.String toRhinoAsObject()
x = Array( Array(38.5591,14.054252,0.0), Array(27.743973,3.2854705,-20.0), Array(39.060593,14.237039,-20.0), Array(38.5591,14.054252,0.0) ) y = Rhino.AddPolyline(x) rhino.MeshPolyline(y) rhino.DeleteObject(y)
toRhinoAsObject in class Ptspublic java.lang.String toSketchUp()
entities.add_face [ Geom::Point3d.new(32.97344,16.216444,0.0), Geom::Point3d.new(50.377213,25.188606,-20.0), Geom::Point3d.new(33.402283,16.427351,-20.0) ]
toSketchUp in class Ptspublic java.lang.String toPovRay()
polygon {
3,
<49.73043,0.0,24.865215>,
<38.5591,0.0,14.054252>,
<39.060593,-20.0,14.237039>
pigment { color rgbf <1.0, 0.03529412, 0.03529412, 1.0> }
}
public java.lang.String toObjExporter()
toObjExporter in class Ptspublic java.lang.String toRadiance()
material polygon name
0
0
18 1454.1045 140.25954 0
1448.2742 142.885 0
1441.5046 166.70736 0
1444.0231 168.87313 0
1456.0293 164.97483 0
1464.2612 151.98389 0
public java.lang.String toObjExporter(java.lang.String name)
toObjExporter in class Ptspublic boolean isInside(XYZ p)
public Pt center()
public Pt normal()
public Pt normal(float size)
public java.lang.Boolean isPlanar()
public Obj triangulate()
public Face copy()
copy in class Pts
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||