public abstract class StlFile<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<T> |
triangles |
protected double |
xmax |
protected double |
xmin |
protected double |
ymax |
protected double |
ymin |
protected double |
zmax |
protected double |
zmin |
Constructor and Description |
---|
StlFile()
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract Point3d |
buildPoint(double x,
double y,
double z) |
protected abstract void |
buildTriangle(Point3d[] points,
Point3d normal) |
protected abstract java.util.Set<T> |
createSet() |
boolean |
getAscii() |
protected abstract T |
getFirstTriangle() |
int |
getFlags() |
double |
getHeight() |
java.lang.String |
getObjectName() |
java.util.Set<T> |
getTriangles() |
double |
getWidth() |
double |
getXmax() |
double |
getXmin() |
double |
getYmax() |
double |
getYmin() |
double |
getZmax() |
double |
getZmin() |
void |
load(java.io.InputStream inputStream)
Entry point for all STL file types
|
void |
readFacetB(java.nio.ByteBuffer dataBuffer,
int index)
Method that reads a face in binary files
All binary versions of the methods end by 'B'
As in binary files we can read the number of faces, we don't need
to use coordArray and normArray (reading binary files should be faster)
|
void |
setAscii(boolean tipo) |
void |
setFlags(int parm) |
void |
setObjectName(java.lang.String name) |
protected java.util.Set<T> triangles
protected double zmin
protected double zmax
protected double xmin
protected double xmax
protected double ymin
protected double ymax
protected abstract Point3d buildPoint(double x, double y, double z)
protected abstract java.util.Set<T> createSet()
protected abstract T getFirstTriangle()
public void readFacetB(java.nio.ByteBuffer dataBuffer, int index) throws java.io.IOException
in
- The ByteBuffer with the data of the object.index
- The facet indexjava.io.IOException
public void load(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException
public int getFlags()
public void setFlags(int parm)
public boolean getAscii()
public void setAscii(boolean tipo)
public java.lang.String getObjectName()
public void setObjectName(java.lang.String name)
public java.util.Set<T> getTriangles()
public double getZmin()
public double getZmax()
public double getXmin()
public double getXmax()
public double getYmin()
public double getYmax()
public double getWidth()
public double getHeight()