|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.ray2.radiosity.PatchGroup
public class PatchGroup
A PatchGroup is a triangle witch contains 4 sub triangles.
Constructor Summary | |
---|---|
PatchGroup(SubPatch p,
int id,
Color3f refl,
Color3f emitted,
Color3f radios)
Creates a new patch group by subdividing the given patch. |
|
PatchGroup(Vector3d[] vertices,
int id,
Color3f emitted,
Color3f reflected,
Color3f radios,
boolean visible)
Creates a new patch group. |
Method Summary | |
---|---|
void |
clearRadiosity()
Clears all calculated radiosity values. |
MyMeshVolume[] |
createMesh()
Converts the patch group into a mesh. |
boolean |
ffMapContains(java.util.List<SubPatch> deprecatedPatches)
Returns true, if this group contains a deprecated patch. |
Color3f |
getEmittance(int patchNum)
Returns the emittance color of the sub patch with the given number. |
java.util.Map<SubPatch,FormFactor> |
getFormFactors(int patchNum)
Returns the form factors of the sub patch with the given number. |
int |
getParentPatchID()
Returns the parent id. |
SubPatch |
getPatch(int i)
Returns the sub path with the given number. |
Color3f |
getRadiosity(int patchNum)
Returns the radiosity color of the sub patch with the given number. |
Color3f |
getReflectance()
Returns the refectance color. |
boolean |
needSubDevide(float threshold)
Checks if this patch group must be subdivided. |
void |
project(java.util.Vector<PatchGroup> allGroups)
Projects the given groups on all hemicubes of the current patch group. |
boolean |
subdivide(java.util.Vector<PatchGroup> group,
java.util.List<SubPatch> deprecatedPatches,
java.util.Vector<PatchGroup> subDivList,
float threshold)
Subdivides this patch group. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PatchGroup(SubPatch p, int id, Color3f refl, Color3f emitted, Color3f radios)
p
- the patch to subdivide.id
- the group id.refl
- the refelcted color.emitted
- the emmited color.radios
- the radiosity color.public PatchGroup(Vector3d[] vertices, int id, Color3f emitted, Color3f reflected, Color3f radios, boolean visible)
vertices
- a list of 3 or 4 vertices.id
- the group id.emitted
- the emmited color.reflected
- the refelcted color.radios
- the radiosity color.visible
- false, if this group and all sub patches should be invisible.Method Detail |
---|
public void clearRadiosity()
public MyMeshVolume[] createMesh()
public boolean ffMapContains(java.util.List<SubPatch> deprecatedPatches)
deprecatedPatches
- a list of deprecated patches.
public Color3f getEmittance(int patchNum)
patchNum
- the sub patch number.
public java.util.Map<SubPatch,FormFactor> getFormFactors(int patchNum)
patchNum
- the sub patch number.
public int getParentPatchID()
public SubPatch getPatch(int i)
i
- the number.
public Color3f getRadiosity(int patchNum)
patchNum
- the sub patch number.
public Color3f getReflectance()
public boolean needSubDevide(float threshold)
threshold
- the subdivision threshold.
public void project(java.util.Vector<PatchGroup> allGroups)
allGroups
- a list of patch groups.public boolean subdivide(java.util.Vector<PatchGroup> group, java.util.List<SubPatch> deprecatedPatches, java.util.Vector<PatchGroup> subDivList, float threshold)
group
- a global list of all groups.deprecatedPatches
- a list of deprecated patche groups.subDivList
- a list of divided patch groups.threshold
- the subdivision threshold.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |