|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.shadow.MeshShadows
public class MeshShadows
MeshShadows
A grouping of the ShadowVolumes for a single
TriMesh.
Field Summary | |
---|---|
protected static Vector3f |
compVect
Static computation field |
protected java.util.ArrayList<ShadowTriangle> |
faces
The triangles of our occluding mesh (one per triangle in the mesh) |
protected java.util.BitSet |
facing
A bitset used for storing directional flags. |
protected Quaternion |
oldWorldRotation
The world rotation of the target at the last mesh construction |
protected Vector3f |
oldWorldScale
The world scale of the trimesh at the last mesh construction |
protected Vector3f |
oldWorldTranslation
The world translation of the trimesh at the last mesh construction |
protected float |
projectionLength
the distance to which shadow volumes will be projected |
protected TriMesh |
target
The mesh that is the target of this shadow volume |
static long |
throttle
|
protected java.util.ArrayList<ShadowVolume> |
volumes
The arraylist of shadowvolumes in this grouping |
Constructor Summary | |
---|---|
MeshShadows(TriMesh target)
Constructor for MeshShadows |
Method Summary | |
---|---|
void |
createGeometry(LightState lightState)
createGeometry creates or updates the ShadowVolume
geometries for the target TriMesh - one for each applicable Light in the
given LightState. |
protected float |
getIntersectTime(Plane p,
Vector3f p0,
Vector3f v)
|
float |
getProjectionLength()
|
ShadowVolume |
getShadowVolume(Light light)
getShadowVolume returns the shadow volume contained in
this grouping for a particular light |
java.util.ArrayList<ShadowVolume> |
getVolumes()
|
void |
recreateFaces()
recreateFaces creates a triangle array for every triangle
in the target occluder mesh and stores it in the faces field. |
void |
setProjectionLength(float projectionLength)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float projectionLength
protected java.util.ArrayList<ShadowTriangle> faces
protected java.util.BitSet facing
protected TriMesh target
protected java.util.ArrayList<ShadowVolume> volumes
protected Quaternion oldWorldRotation
protected Vector3f oldWorldTranslation
protected Vector3f oldWorldScale
public static long throttle
protected static Vector3f compVect
Constructor Detail |
---|
public MeshShadows(TriMesh target)
MeshShadows
target
- the mesh that will be the target of the shadow volumes held in
this groupingMethod Detail |
---|
public void createGeometry(LightState lightState)
createGeometry
creates or updates the ShadowVolume
geometries for the target TriMesh - one for each applicable Light in the
given LightState. Only Directional and Point lights are currently
supported. ShadowVolume geometry is only regen'd when light or occluder
aspects change.
lightState
- is the current lighting stateprotected float getIntersectTime(Plane p, Vector3f p0, Vector3f v)
public void recreateFaces()
recreateFaces
creates a triangle array for every triangle
in the target occluder mesh and stores it in the faces field. This is
only done rarely in general.
public ShadowVolume getShadowVolume(Light light)
getShadowVolume
returns the shadow volume contained in
this grouping for a particular light
light
- the light whose shadow volume should be returned
public float getProjectionLength()
public void setProjectionLength(float projectionLength)
projectionLength
- The projectionLength to set.public java.util.ArrayList<ShadowVolume> getVolumes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |