public class IMeshCreator
extends java.lang.Object
IMesh
Modifier and Type | Field and Description |
---|---|
static IServerI |
server
state variable of a server to store surfaces created in the methods in this class
|
static IMeshType |
type
state variable of a mesh type to specify what vertex, edge face class to use to create a mesh,
default is IMeshType
|
Constructor and Description |
---|
IMeshCreator() |
Modifier and Type | Method and Description |
---|---|
static IMesh |
box(double x,
double y,
double z,
double size) |
static IMesh |
box(double x,
double y,
double z,
double width,
double height,
double depth) |
static IMesh |
box(IVecI[][][] corners) |
static IMesh |
box(IVecI origin,
double size) |
static IMesh |
box(IVecI origin,
double width,
double height,
double depth) |
static IMesh |
box(IVecI origin,
IVecI xvec,
IVecI yvec,
IVecI zvec) |
static IMesh |
box(IVecI pt1,
IVecI pt2,
IVecI pt3,
IVecI pt4,
IVecI pt5,
IVecI pt6,
IVecI pt7,
IVecI pt8) |
static IMesh |
box(IVertex[][][] corners) |
static IMesh |
diamondTessellation(IMeshI mesh,
boolean splitDiamond,
boolean splitDir,
IMeshType creator) |
static IMesh |
mesh() |
static IMesh |
mesh(java.util.ArrayList<ICurveI> lines) |
static IMesh |
mesh(java.util.ArrayList<IVertex> v,
java.util.ArrayList<IEdge> e,
java.util.ArrayList<IFace> f) |
static IMesh |
mesh(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3) |
static IMesh |
mesh(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3,
double x4,
double y4,
double z4) |
static IMesh |
mesh(ICurveI[] lines) |
static IMesh |
mesh(IFace[] fcs) |
static IMesh |
mesh(IMesh m) |
static IMesh |
mesh(IMeshGeo m) |
static IMesh |
mesh(IVec[] vert) |
static IMesh |
mesh(IVec[][] matrix) |
static IMesh |
mesh(IVec[][] matrix,
boolean triangulateDir) |
static IMesh |
mesh(IVec[][] matrix,
int unum,
int vnum,
boolean triangulateDir) |
static IMesh |
mesh(IVecI v1,
IVecI v2,
IVecI v3) |
static IMesh |
mesh(IVecI v1,
IVecI v2,
IVecI v3,
IVecI v4) |
static IMesh |
mesh(IVertex[] vert) |
static IMesh |
mesh(IVertex[] vtx,
IEdge[] edg,
IFace[] fcs) |
static IMesh |
mesh(IVertex v1,
IVertex v2,
IVertex v3) |
static IMesh |
mesh(IVertex v1,
IVertex v2,
IVertex v3,
IVertex v4) |
static IMesh |
meshFromTriangles(IVecI[][] trianglePts)
create polygon mesh out of array of triangle points which is array of 3 IVec
|
static IMeshType |
meshType() |
static void |
meshType(IMeshType typ)
set variable of a mesh type to specify what vertex, edge face class to use to create a mesh
|
static IMesh |
offset(IMeshI mesh,
double thickness,
IMeshType creator)
create offset mesh towards each normal direction.
|
static void |
offset(IMeshI mesh,
double thickness,
IVecI offsetDir,
java.util.ArrayList<IVertex> resultVertices,
java.util.ArrayList<IEdge> resultEdges,
java.util.ArrayList<IFace> resultFaces)
create ArrayList of vertices, edges, faces, offset from the mesh
|
static IMesh |
pipe(IVecI[][] pts)
open cap mesh pipe
|
static IMesh |
pipe(IVertex[][] vtx)
open cap mesh pipe
|
static IVec[] |
polygonProfile(IVecI center,
IVecI normal,
IVecI rollDir,
double radius,
int vertexNum) |
static IMesh |
polygonStick(ICurveI crv,
double radius,
int polygonVertexNum) |
static IMesh |
polygonStick(ICurveI crv,
double radius,
int polygonVertexNum,
int railSegmentNum) |
static IMesh |
polygonStick(IVecI pt1,
IVecI pt2,
double radius1,
double radius2,
int polygonVertexNum)
creates closed mesh stick with polygon profile
|
static IMesh |
polygonStick(IVecI pt1,
IVecI pt2,
double radius1,
double radius2,
int polygonVertexNum,
IVecI heightDir)
creates closed mesh stick with polygon profile
|
static IMesh |
polygonStick(IVecI pt1,
IVecI pt2,
double radius,
int polygonVertexNum)
creates closed mesh stick with polygon profile
|
static IMesh |
polygonStick(IVecI pt1,
IVecI pt2,
double radius,
int polygonVertexNum,
IVecI heightDir)
creates closed mesh stick with polygon profile
|
static IMesh |
rectPipe(IVecI pt1,
IVecI pt2,
double width,
double height)
height direction is z axis
|
static IMesh |
rectPipe(IVecI pt1,
IVecI pt2,
double width,
double height,
IVecI heightDir) |
static IMesh |
rectPipe(IVecI pt1,
IVecI pt2,
IVecI udir,
IVecI vdir) |
static IMesh |
rectStick(IVecI pt1,
IVecI pt2,
double width,
double height)
height direction is z axis
|
static IMesh |
rectStick(IVecI pt1,
IVecI pt2,
double width,
double height,
IVecI heightDir) |
static IMesh |
rectStick(IVecI pt1,
IVecI pt2,
IVecI udir,
IVecI vdir) |
static IMesh |
roundStick(ICurveI crv,
double radius) |
static IMesh |
roundStick(ICurveI crv,
double radius,
int railSegmentNum) |
static IMesh |
roundStick(IVecI pt1,
IVecI pt2,
double radius)
round stick (alias of stick())
|
static IMesh |
roundStick(IVecI pt1,
IVecI pt2,
double radius1,
double radius2)
round stick (alias of stick())
|
static IServerI |
server() |
static void |
server(IServerI s)
set a server to store surfaces created in the methods in this class
|
static IMesh |
sphere(IVecI center,
double radius) |
static IMesh |
sphere(IVecI center,
double zradius,
double xyradius) |
static IMesh |
sphere(IVecI center,
double zradius,
double xyradius,
int resolution) |
static IMesh |
sphere(IVecI center,
double radius,
int resolution) |
static IMesh |
sphere(IVecI center,
IVecI topDir)
mesh sphere
|
static IMesh |
sphere(IVecI center,
IVecI topDir,
double radius) |
static IMesh |
sphere(IVecI center,
IVecI topDir,
double topRadius,
double sideRadius) |
static IMesh |
sphere(IVecI center,
IVecI topDir,
double topRadius,
double sideRadius,
int resolution) |
static IMesh |
sphere(IVecI center,
IVecI topDir,
double radius,
int resolution)
mesh sphere
|
static IMesh |
sphere(IVecI center,
IVecI topDir,
int resolution)
mesh sphere
|
static IMesh |
sphere(IVecI center,
IVecI topDir,
IVecI sideDir)
mesh sphere
|
static IMesh |
sphere(IVecI center,
IVecI topDir,
IVecI sideDir,
int resolution)
mesh sphere
|
static IMesh |
squarePipe(IVecI pt1,
IVecI pt2,
double width)
height direction is z axis
|
static IMesh |
squarePipe(IVecI pt1,
IVecI pt2,
double width,
IVecI heightDir) |
static IMesh |
squareStick(ICurveI crv,
double radius) |
static IMesh |
squareStick(ICurveI crv,
double radius,
int railSegmentNum) |
static IMesh |
squareStick(IVecI pt1,
IVecI pt2,
double width)
height direction is z axis
|
static IMesh |
squareStick(IVecI pt1,
IVecI pt2,
double width,
IVecI heightDir) |
static IMesh |
stick(ICurveI crv,
double radius) |
static IMesh |
stick(ICurveI crv,
double radius,
int railSegmentNum) |
static IMesh |
stick(IVecI[][] pts) |
static IMesh |
stick(IVecI[][] pts,
boolean closeU)
creates closed mesh stick with matrix of points
|
static IMesh |
stick(IVecI pt1,
IVecI pt2,
double radius)
round stick
|
static IMesh |
stick(IVecI pt1,
IVecI pt2,
double radius1,
double radius2)
round stick
|
static IMesh |
tetrahedron(IVecI[] pts)
make a mesh tetrahedron
|
static IMesh |
tetrahedron(IVecI pt1,
IVecI pt2,
IVecI pt3,
IVecI pt4)
make a mesh tetrahedron
|
static IMesh |
tetrahedron(IVertex[] vtx)
make a mesh tetrahedron
|
static IMesh |
tetrahedron(IVertex v1,
IVertex v2,
IVertex v3,
IVertex v4)
make a mesh tetrahedron
|
static IMesh |
thicken(IMesh mesh,
double thickness,
IMeshType creator)
add thickness to mesh towards each normal direction.
|
static IMesh |
thicken(IMesh mesh,
double thickness,
IVecI dir,
IMeshType creator)
add thickness to mesh towards the specified direction.
|
static IMesh |
thicken(IMeshI mesh,
double thickness,
boolean modifyOriginal,
IMeshType creator)
create thickned mesh towards each normal direction.
|
static IMesh |
thicken(IMeshI mesh,
double thickness,
IVecI dir,
boolean modifyOriginal,
IMeshType creator)
create thickned mesh towards the specified direction.
|
public static IServerI server
public static IMeshType type
public static void server(IServerI s)
public static IServerI server()
public static void meshType(IMeshType typ)
public static IMeshType meshType()
public static IMesh mesh()
public static IMesh mesh(java.util.ArrayList<IVertex> v, java.util.ArrayList<IEdge> e, java.util.ArrayList<IFace> f)
public static IMesh mesh(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
public static IMesh mesh(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)
public static IMesh meshFromTriangles(IVecI[][] trianglePts)
public static IMesh box(double x, double y, double z, double size)
public static IMesh box(double x, double y, double z, double width, double height, double depth)
public static IMesh box(IVecI pt1, IVecI pt2, IVecI pt3, IVecI pt4, IVecI pt5, IVecI pt6, IVecI pt7, IVecI pt8)
public static IMesh tetrahedron(IVecI pt1, IVecI pt2, IVecI pt3, IVecI pt4)
public static IMesh tetrahedron(IVertex v1, IVertex v2, IVertex v3, IVertex v4)
public static IMesh pipe(IVertex[][] vtx)
vtx
- n x 2 vertex arraypublic static IMesh rectPipe(IVecI pt1, IVecI pt2, double width, double height, IVecI heightDir)
heightDir
- it provides reference to the direction of height but actual direction is re-calculated to be perpendicular to pt1-pt2 direction.public static IMesh rectPipe(IVecI pt1, IVecI pt2, double width, double height)
public static IMesh squarePipe(IVecI pt1, IVecI pt2, double width, IVecI heightDir)
heightDir
- it provides reference to the direction of height but actual direction is re-calculated to be perpendicular to pt1-pt2 direction.public static IMesh squarePipe(IVecI pt1, IVecI pt2, double width)
public static IMesh rectStick(IVecI pt1, IVecI pt2, double width, double height, IVecI heightDir)
heightDir
- it provides reference to the direction of height but actual direction is re-calculated to be perpendicular to pt1-pt2 direction.public static IMesh rectStick(IVecI pt1, IVecI pt2, double width, double height)
public static IMesh squareStick(IVecI pt1, IVecI pt2, double width, IVecI heightDir)
heightDir
- it provides reference to the direction of height but actual direction is re-calculated to be perpendicular to pt1-pt2 direction.public static IMesh squareStick(IVecI pt1, IVecI pt2, double width)
public static IMesh polygonStick(IVecI pt1, IVecI pt2, double radius, int polygonVertexNum)
pt1
- center of one side of a stickpt2
- center of another side of a stickpolygonVertexNum
- number of vertex of profile polygonpublic static IMesh polygonStick(IVecI pt1, IVecI pt2, double radius, int polygonVertexNum, IVecI heightDir)
pt1
- center of one side of a stickpt2
- center of another side of a stickpolygonVertexNum
- number of vertex of profile polygonheightDir
- reference vector to locate one of vertex of polygon aligned with this directionpublic static IMesh polygonStick(IVecI pt1, IVecI pt2, double radius1, double radius2, int polygonVertexNum)
pt1
- center of one side of a stickpt2
- center of another side of a stickpolygonVertexNum
- number of vertex of profile polygonpublic static IMesh polygonStick(IVecI pt1, IVecI pt2, double radius1, double radius2, int polygonVertexNum, IVecI heightDir)
pt1
- center of one side of a stickpt2
- center of another side of a stickpolygonVertexNum
- number of vertex of profile polygonheightDir
- reference vector to locate one of vertex of polygon aligned with this directionpublic static IMesh stick(IVecI[][] pts, boolean closeU)
pts
- control point matrix whose u is stick direction and v is wrapped by connecting the first and the last in v.closeU
- if true, connect the end and the beginning in U directionpublic static IMesh roundStick(IVecI pt1, IVecI pt2, double radius)
public static IMesh roundStick(IVecI pt1, IVecI pt2, double radius1, double radius2)
public static IMesh sphere(IVecI center, IVecI topDir, IVecI sideDir, int resolution)
topDir
- length of vector is radius in vertical directionsideDir
- length of vector is radius in holizontal direction. sideDir is re-orthogonalized to topDirpublic static IMesh sphere(IVecI center, IVecI topDir, IVecI sideDir)
topDir
- length of vector is radius in vertical directionsideDir
- length of vector is radius in holizontal direction. sideDir is re-orthogonalized to topDirpublic static IMesh sphere(IVecI center, IVecI topDir, int resolution)
topDir
- length of vector is radius in vertical directionpublic static IMesh sphere(IVecI center, IVecI topDir)
topDir
- length of vector is radius in vertical directionpublic static IMesh sphere(IVecI center, IVecI topDir, double radius, int resolution)
topDir
- length of vector is radius in vertical directionpublic static IMesh sphere(IVecI center, IVecI topDir, double topRadius, double sideRadius, int resolution)
public static IVec[] polygonProfile(IVecI center, IVecI normal, IVecI rollDir, double radius, int vertexNum)
public static IMesh polygonStick(ICurveI crv, double radius, int polygonVertexNum, int railSegmentNum)
public static IMesh thicken(IMeshI mesh, double thickness, boolean modifyOriginal, IMeshType creator)
public static IMesh thicken(IMeshI mesh, double thickness, IVecI dir, boolean modifyOriginal, IMeshType creator)
public static IMesh thicken(IMesh mesh, double thickness, IMeshType creator)
public static IMesh thicken(IMesh mesh, double thickness, IVecI dir, IMeshType creator)
public static IMesh offset(IMeshI mesh, double thickness, IMeshType creator)
public static void offset(IMeshI mesh, double thickness, IVecI offsetDir, java.util.ArrayList<IVertex> resultVertices, java.util.ArrayList<IEdge> resultEdges, java.util.ArrayList<IFace> resultFaces)