|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.ray2.radiosity.SubPatch
public class SubPatch
This class describes a patch containing a triangle.
Constructor Summary | |
---|---|
SubPatch(SubPatch in)
Copy Constructor |
|
SubPatch(Vector3d a,
Vector3d b,
Vector3d c)
Constructor, creates a new SubPatch. |
Method Summary | |
---|---|
void |
clearFFMap()
Clears the form factor map. |
MyMeshVolume |
createMesh()
Converts this patch into a mesh. |
boolean |
ffMapContains(java.util.List<SubPatch> deprecatedPatches)
Checks whether, the list of deprecated patches contains this patch. |
Vector3d |
getCenter()
Return the center of this patch. |
java.util.Map<SubPatch,FormFactor> |
getFFMap()
Returns the form factor map. |
int |
getMaxEdgeCount()
Returns the maximum number of edges of a single polygon of the mesh. |
float |
getMaxRadDifference(SubPatch other)
Returns the maximum difference of radiosity color. |
Vector3d |
getNormal()
Returns the normal vector of this patch. |
void |
getNormal(int index,
Tuple3d out)
Gets the normal vector of normal index . |
int |
getNormalCount()
Returns the number of normals of the mesh. |
int |
getPolygon(int index,
int[] indicesOut,
int[] normalsOut)
Writes the vertex indices of polygon index
to indicesOut and the normal indices to
normalsOut and returns the number of
vertices of the polygon. |
int |
getPolygonCount()
Returns the number of polygons of the mesh. |
Color3f |
getRadiosity()
Returns the radiosity color. |
void |
getUV(int index,
Tuple2d out)
Gets the uv coordinates of vertex index . |
void |
getVertex(int index,
Tuple3d out)
Gets the spatial vertex coordinates of vertex index . |
int |
getVertexCount()
Returns the number of vertices of the mesh. |
Vector3d[] |
getVertices()
Returns an array of vertices. |
boolean |
isClosed()
Indicates whether this mesh is a closed surface or not. |
boolean |
isPolygonPlanar(int index)
Returns true iff the polygon number
index is planar. |
boolean |
isTriangle()
Returns true. |
void |
move(Vector3d deltaVert)
Moves the patch along the given vector. |
void |
rotateX(double thetaX)
Rotates the patch around the x-axis. |
void |
rotateY(double thetaY)
Rotates the patch around the y-axis. |
void |
rotateZ(double thetaZ)
Rotates the patch around the z-axis. |
void |
set(Vector3d a,
Vector3d b,
Vector3d c)
Sets the vertices for this patch. |
void |
setRadiosity(Color3f col)
Sets the radiosity color. |
void |
setRadiosity(float x,
float y,
float z)
Sets the radiosity color. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SubPatch(SubPatch in)
in
- the SubPatch to copy.public SubPatch(Vector3d a, Vector3d b, Vector3d c)
a
- vertice 1b
- vertice 2c
- vertice 3Method Detail |
---|
public void clearFFMap()
public MyMeshVolume createMesh()
public boolean ffMapContains(java.util.List<SubPatch> deprecatedPatches)
deprecatedPatches
- the list of deprecated patches.
public Vector3d getCenter()
public java.util.Map<SubPatch,FormFactor> getFFMap()
public int getMaxEdgeCount()
Mesh
getMaxEdgeCount
in interface Mesh
public float getMaxRadDifference(SubPatch other)
other
- another patch.
public Vector3d getNormal()
public void getNormal(int index, Tuple3d out)
Mesh
index
.
The normal vector is not necessarily normalized.
getNormal
in interface Mesh
index
- normal numberout
- normal vector will be placed in herepublic int getNormalCount()
Mesh
getNormalCount
in interface Mesh
public int getPolygon(int index, int[] indicesOut, int[] normalsOut)
Mesh
index
to indicesOut
and the normal indices to
normalsOut
and returns the number of
vertices of the polygon. If the mesh is closed
(see Mesh.isClosed()
), inside and outside are determined by the
ordering of the vertices: when seen from the outside, vertices have
to be oriented in a counter-clockwise manner. Then also the normal
vectors have to point to the outside.
getPolygon
in interface Mesh
index
- polygon numberindicesOut
- the vertex indices will be placed in herenormalsOut
- the normal indices will be placed in here
public int getPolygonCount()
Mesh
getPolygonCount
in interface Mesh
public Color3f getRadiosity()
public void getUV(int index, Tuple2d out)
Mesh
index
.
getUV
in interface Mesh
index
- vertex numberout
- uv coordinates will be placed in herepublic void getVertex(int index, Tuple3d out)
Mesh
index
.
getVertex
in interface Mesh
index
- vertex numberout
- vertex coordinates will be placed in herepublic int getVertexCount()
Mesh
getVertexCount
in interface Mesh
public Vector3d[] getVertices()
public boolean isClosed()
Mesh
isClosed
in interface Mesh
public boolean isPolygonPlanar(int index)
Mesh
true
iff the polygon number
index
is planar.
isPolygonPlanar
in interface Mesh
index
- polygon number
public boolean isTriangle()
public void move(Vector3d deltaVert)
deltaVert
- the move vector.public void rotateX(double thetaX)
thetaX
- the rotation angle.public void rotateY(double thetaY)
thetaY
- the rotation angle.public void rotateZ(double thetaZ)
thetaZ
- the rotation angle.public void set(Vector3d a, Vector3d b, Vector3d c)
a
- vertice 1b
- vertice 2c
- vertice 3public void setRadiosity(Color3f col)
col
- the radiosity color to set.public void setRadiosity(float x, float y, float z)
x
- the x-value.y
- the y-value.z
- the z-value.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |