public class DirectionalLight extends Light
Light.Type
Modifier and Type | Field and Description |
---|---|
static Vector3 |
DEFAULT_LIGHT_DIRECTION
The default light direction
|
static int |
texH |
static int |
texW
Size of the shadow textures
|
Constructor and Description |
---|
DirectionalLight() |
DirectionalLight(Vector3 lightDirection) |
Modifier and Type | Method and Description |
---|---|
void |
attachTo(SceneNode node)
Attaches this object to a SceneNode
|
Vector3 |
getLightDirection()
Get the direction of this light
|
float[] |
getLightVector()
Get a vector characteristic for this light
|
float[] |
getModelMatrix()
Get the total transformation matrix from the parents
of this directional light
|
void |
setIntensity(float intensity) |
void |
setLightDirection(Vector3 lightDirection)
Set a new light direction
|
void |
update(float[] viewMatrix)
Update the characteristic vector of this light
|
detach, getAbsolutePos, getParent, getRelativePos, onTransformed
public static final Vector3 DEFAULT_LIGHT_DIRECTION
public static final int texW
public static final int texH
public DirectionalLight()
public DirectionalLight(Vector3 lightDirection)
public void attachTo(SceneNode node)
SceneObject
attachTo
in class SceneObject
node
- The node onto which this SceneObject will be attachedpublic Vector3 getLightDirection()
public void setLightDirection(Vector3 lightDirection)
lightDirection
- The new light directionpublic float[] getModelMatrix()
getModelMatrix
in class SceneObject
public float[] getLightVector()
Light
getLightVector
in class Light
public void update(float[] viewMatrix)
Light
public void setIntensity(float intensity)