public class MeshDescription extends java.lang.Object implements IMeshDescription
Modifier and Type | Class and Description |
---|---|
static class |
MeshDescription.EdgeLine
A temporary internal representation of a segment of a FaceLine defining
an Edge.
|
static class |
MeshDescription.FaceLine
A temporary internal representation of a line of the faces xml block
|
static class |
MeshDescription.VertexLine
A temporary internal representation of a line of the vertices xml block
|
Constructor and Description |
---|
MeshDescription()
The default constructor.
|
MeshDescription(IController root)
A constructor that creates a compacted description of a mesh.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Create a deep copy duplicate of this object.
|
void |
copy(IMeshDescription source)
Copy the source object's data into this, making it into a copy.
|
boolean |
equals(java.lang.Object otherObject) |
java.util.ArrayList<java.util.HashMap<java.lang.Integer,EdgeProperties>> |
getEdgeProperties()
Getter method for the edge properties.
|
int[] |
getEdges()
Getter method for the edges.
|
int[] |
getFaces()
Getter method for the faces.
|
java.util.ArrayList<MeshDescription.FaceLine> |
getFacesBlock()
Get the information about the mesh's faces formatted into a list of
FaceLines.
|
java.util.ArrayList<PolygonProperties> |
getPolygonProperties()
Getter method for the polygon properties
|
double[][] |
getTransformations()
Getter method for the transformation.
|
int[] |
getVertices()
Getter method for the vertices.
|
java.util.ArrayList<MeshDescription.VertexLine> |
getVerticesBlock()
Get the information about the mesh's vertices formatted into a block of
VertexLines.
|
int |
hashCode() |
void |
setEdgeProperties(java.util.ArrayList<java.util.HashMap<java.lang.Integer,EdgeProperties>> properties)
Setter method for the edge properties.
|
void |
setEdges(int[] edges)
Setter method for the edges.
|
void |
setFaces(int[] faces)
Setter method for the faces.
|
void |
setFacesBlock(java.util.ArrayList<MeshDescription.FaceLine> block)
Set the information about the mesh's faces formatted into a block of
FaceLines.
|
void |
setPolygonProperties(java.util.ArrayList<PolygonProperties> polygonProperties)
Setter method for the polygon properties.
|
void |
setTransformations(double[][] transformations)
Setter method for the transformations.
|
void |
setVertices(int[] vertices)
Setter method for the vertices.
|
void |
setVerticesBlock(java.util.ArrayList<MeshDescription.VertexLine> block)
Set the information about the mesh's vertices formatted into a block of
VertexLines.
|
IController |
unpack(IControllerProviderFactory factory)
Unpack the condensed representation into a full set of modeling data
objects.
|
public MeshDescription()
public MeshDescription(IController root)
root
- The root of the mesh that is to be described.public int[] getEdges()
IMeshDescription
getEdges
in interface IMeshDescription
public int[] getFaces()
IMeshDescription
getFaces
in interface IMeshDescription
public java.util.ArrayList<java.util.HashMap<java.lang.Integer,EdgeProperties>> getEdgeProperties()
IMeshDescription
getEdgeProperties
in interface IMeshDescription
public java.util.ArrayList<PolygonProperties> getPolygonProperties()
IMeshDescription
getPolygonProperties
in interface IMeshDescription
public double[][] getTransformations()
IMeshDescription
getTransformations
in interface IMeshDescription
public int[] getVertices()
IMeshDescription
getVertices
in interface IMeshDescription
public void setEdges(int[] edges)
IMeshDescription
setEdges
in interface IMeshDescription
edges
- An array of global ids for the edges, along with their
endpoints as indices into the vertices arraypublic void setFaces(int[] faces)
IMeshDescription
setFaces
in interface IMeshDescription
faces
- An array of global ids for the faces, along with their
constituent edges as indices into the edges arraypublic void setEdgeProperties(java.util.ArrayList<java.util.HashMap<java.lang.Integer,EdgeProperties>> properties)
IMeshDescription
setEdgeProperties
in interface IMeshDescription
properties
- A list of maps between integer ids for edges and their edge
properties, one for each face in the faces arraypublic void setPolygonProperties(java.util.ArrayList<PolygonProperties> polygonProperties)
IMeshDescription
setPolygonProperties
in interface IMeshDescription
polygonProperties
- A list of the PolygonProperties in the mesh, in the same order
as their corresponding polygons are in the faces array.public void setTransformations(double[][] transformations)
IMeshDescription
setTransformations
in interface IMeshDescription
transformations
- An array of numbers representing the spatial data for a
modeling object. Each object's data begins at location (12 *
their global ID) and is stored as three values representing
the x, y, and z directions for each of the four attributes
(rotation, scale, skew, and translation).public void setVertices(int[] vertices)
vertices
- An array of global ids for the verticespublic IController unpack(IControllerProviderFactory factory)
IMeshDescription
unpack
in interface IMeshDescription
factory
- The factory that will create the rendering engine appropriate
IControllers for the meshes.public java.util.ArrayList<MeshDescription.FaceLine> getFacesBlock()
IMeshDescription
getFacesBlock
in interface IMeshDescription
public void setFacesBlock(java.util.ArrayList<MeshDescription.FaceLine> block)
IMeshDescription
setFacesBlock
in interface IMeshDescription
block
- A list of all lines in the xml block defining the facespublic java.util.ArrayList<MeshDescription.VertexLine> getVerticesBlock()
IMeshDescription
getVerticesBlock
in interface IMeshDescription
public void setVerticesBlock(java.util.ArrayList<MeshDescription.VertexLine> block)
IMeshDescription
setVerticesBlock
in interface IMeshDescription
block
- A list of all lines in the xml block defining the verticespublic java.lang.Object clone()
IMeshDescription
clone
in interface IMeshDescription
clone
in class java.lang.Object
public void copy(IMeshDescription source)
IMeshDescription
copy
in interface IMeshDescription
source
- The object of which this should be made into a copypublic boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object