public class IFace
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
IColor |
clr |
boolean |
deleted
used in deleting process
|
IEdge[] |
edges |
boolean |
invalid |
IVec |
normal |
IVertex[] |
vertices |
Constructor and Description |
---|
IFace(IEdge[] e) |
IFace(IEdge e1,
IEdge e2,
IEdge e3) |
IFace(IEdge e1,
IEdge e2,
IEdge e3,
IEdge e4) |
IFace(IFace f)
Copis a face but shareing same vertices and edges with the original
|
IFace(IVertex[] v) |
IFace(IVertex v1,
IVertex v2,
IVertex v3) |
IFace(IVertex v1,
IVertex v2,
IVertex v3,
IVertex v4) |
Modifier and Type | Method and Description |
---|---|
double |
area() |
void |
calcNormal() |
IVec |
center() |
IColor |
clr() |
IFace |
clr(java.awt.Color c) |
IFace |
clr(java.awt.Color c,
double alpha) |
IFace |
clr(java.awt.Color c,
float alpha) |
IFace |
clr(java.awt.Color c,
int alpha) |
IFace |
clr(double dgray) |
IFace |
clr(double dgray,
double dalpha) |
IFace |
clr(double dr,
double dg,
double db) |
IFace |
clr(double dr,
double dg,
double db,
double da) |
IFace |
clr(float fgray) |
IFace |
clr(float fgray,
float falpha) |
IFace |
clr(float fr,
float fg,
float fb) |
IFace |
clr(float fr,
float fg,
float fb,
float fa) |
IFace |
clr(IColor c) |
IFace |
clr(IColor c,
double alpha)
to set color, with alpha value overwritten
|
IFace |
clr(IColor c,
float alpha)
to set color, with alpha value overwritten
|
IFace |
clr(IColor c,
int alpha)
to set color, with alpha value overwritten
|
IFace |
clr(IFace f) |
IFace |
clr(int gray) |
IFace |
clr(int gray,
int alpha) |
IFace |
clr(int r,
int g,
int b) |
IFace |
clr(int r,
int g,
int b,
int a) |
IFace |
clr(IObject o) |
boolean |
contains(IEdge e)
checks if the edge is inside face's edges array
|
boolean |
contains(IVertex v) |
void |
del() |
double |
dist(IVecI pt)
calculate closest distance to face taking normal into consideration.
|
IFace |
dup() |
IEdge |
edge(int i) |
int |
edgeNum() |
static boolean |
eq(double v1,
double v2) |
boolean |
eq(IFace face) |
void |
flipNml() |
void |
flipNormal() |
IVertex[] |
getAdjacentVertices(IVertex v1,
IVertex v2) |
IVec |
getAverageNormal()
average normal
|
IVec[] |
getBoundary() |
IVec |
getCenter()
alias of center
|
IColor |
getColor() |
IEdge |
getEdge(int i) |
IEdge |
getEdge(IVertex v1,
IVertex v2) |
IEdge |
getOtherEdge(IEdge e) |
IEdge |
getOtherEdge(IVertex v) |
IEdge[] |
getOtherEdges(IEdge e) |
IEdge[] |
getOtherEdges(IVertex v) |
IEdge[] |
getOtherEdges(IVertex v1,
IVertex v2,
IVertex... otherVtx)
returns edges which aren't a link between any two of given vertex variable vtx.
|
IVertex |
getOtherVertex(IEdge e) |
IVertex |
getOtherVertex(IVertex v1,
IVertex v2) |
IVertex[] |
getOtherVertices(IVertex v) |
IEdge |
getSharedEdge(IFace f) |
IVertex[] |
getSharedVertices(IFace f) |
IVertex |
getVertex(int i) |
IFace |
hsb(double dh,
double ds,
double db) |
IFace |
hsb(double dh,
double ds,
double db,
double da) |
IFace |
hsb(float h,
float s,
float b) |
IFace |
hsb(float h,
float s,
float b,
float a) |
int |
indexOf(IEdge e) |
void |
init(IEdge[] e) |
boolean |
isValid() |
boolean |
loopDir(IEdge edge)
direction of edge based on the sequence of vertices array inside a face
|
IVec |
nml()
returns normal.
|
IVec |
normal()
alias of nml()
|
boolean |
onFace(IEdge e)
checks if the edge is located on the edge of the face even if it's not inside face's edges array
|
void |
replaceEdge(IEdge oldEdge,
IEdge newEdge) |
void |
replaceVertex(IVertex oldVertex,
IVertex newVertex) |
boolean |
sameLoopDir(IEdge e1,
IEdge e2) |
void |
setNormal(IVec n) |
int |
sharedVertexOrder(IFace f)
check if two faces have shared pair of vertices
|
java.util.ArrayList<java.lang.Object> |
triangulate(boolean triangulateDirection,
IMeshType creator) |
java.util.ArrayList<java.lang.Object> |
triangulateAtCenter(IMeshType creator) |
IVertex |
vertex(int i) |
int |
vertexNum() |
public IVertex[] vertices
public IEdge[] edges
public IVec normal
public boolean deleted
public boolean invalid
public IColor clr
public IFace(IEdge[] e)
public IFace(IVertex[] v)
public IFace(IFace f)
public boolean isValid()
public void init(IEdge[] e)
public IFace dup()
public IVertex getVertex(int i)
public IVertex vertex(int i)
public IEdge getEdge(int i)
public IEdge edge(int i)
public int vertexNum()
public int edgeNum()
public IEdge[] getOtherEdges(IVertex v1, IVertex v2, IVertex... otherVtx)
public int sharedVertexOrder(IFace f)
public boolean loopDir(IEdge edge)
public IVec center()
public IVec getCenter()
public void del()
public boolean contains(IVertex v)
public boolean contains(IEdge e)
public boolean onFace(IEdge e)
public int indexOf(IEdge e)
public double area()
public IVec nml()
public IVec normal()
public IVec getAverageNormal()
public void calcNormal()
public void setNormal(IVec n)
public void flipNormal()
public void flipNml()
public java.util.ArrayList<java.lang.Object> triangulate(boolean triangulateDirection, IMeshType creator)
public java.util.ArrayList<java.lang.Object> triangulateAtCenter(IMeshType creator)
public static boolean eq(double v1, double v2)
public boolean eq(IFace face)
public IVec[] getBoundary()
public double dist(IVecI pt)
public IColor clr()
public IFace clr(java.awt.Color c)
public IFace clr(java.awt.Color c, int alpha)
public IFace clr(java.awt.Color c, float alpha)
public IFace clr(java.awt.Color c, double alpha)
public IColor getColor()
public IFace clr(int gray)
public IFace clr(double dgray)
public IFace clr(float fgray)
public IFace clr(int gray, int alpha)
public IFace clr(double dgray, double dalpha)
public IFace clr(float fgray, float falpha)
public IFace clr(int r, int g, int b)
public IFace clr(double dr, double dg, double db)
public IFace clr(float fr, float fg, float fb)
public IFace clr(int r, int g, int b, int a)
public IFace clr(double dr, double dg, double db, double da)
public IFace clr(float fr, float fg, float fb, float fa)
public IFace hsb(double dh, double ds, double db, double da)
public IFace hsb(float h, float s, float b, float a)
public IFace hsb(double dh, double ds, double db)
public IFace hsb(float h, float s, float b)