public class Light extends Frustum
The formula to calculate the total attenuation of light is:
A = ConstantAttenuation + (Dist * LinearAttenuation) + ((Dist^2) * QuadraticAttenuation)
name, properties
Constructor and Description |
---|
Light()
Initializes a new instance of the
Light class. |
Light(java.lang.String name)
Initializes a new instance of the
Light class. |
Light(java.lang.String name,
LightType type)
Initializes a new instance of the
Light class. |
Modifier and Type | Method and Description |
---|---|
boolean |
getCastLight()
Gets if the current light instance can illuminate other objects.
|
boolean |
getCastShadows()
Gets if the light can cast shadows on other objects.
|
Vector3 |
getColor()
Gets the light's color
|
double |
getConstantAttenuation()
Gets the constant attenuation to calculate the total attenuation of the light
|
double |
getFalloff()
Gets the falloff cone angle (in degrees).
|
double |
getHotSpot()
Gets the hot spot cone angle(in degrees).
|
double |
getIntensity()
Gets the light's intensity, default value is 100
|
LightType |
getLightType()
Gets the light's type
|
double |
getLinearAttenuation()
Gets the linear attenuation to calculate the total attenuation of the light
|
double |
getQuadraticAttenuation()
Gets the quadratic attenuation to calculate the total attenuation of the light
|
Vector3 |
getShadowColor()
Gets the shadow's color.
|
void |
setCastLight(boolean value)
Sets if the current light instance can illuminate other objects.
|
void |
setCastShadows(boolean value)
Sets if the light can cast shadows on other objects.
|
void |
setColor(Vector3 value)
Sets the light's color
|
void |
setConstantAttenuation(double value)
Sets the constant attenuation to calculate the total attenuation of the light
|
void |
setFalloff(double value)
Sets the falloff cone angle (in degrees).
|
void |
setHotSpot(double value)
Sets the hot spot cone angle(in degrees).
|
void |
setIntensity(double value)
Sets the light's intensity, default value is 100
|
void |
setLightType(LightType value)
Sets the light's type
|
void |
setLinearAttenuation(double value)
Sets the linear attenuation to calculate the total attenuation of the light
|
void |
setQuadraticAttenuation(double value)
Sets the quadratic attenuation to calculate the total attenuation of the light
|
void |
setShadowColor(Vector3 value)
Sets the shadow's color.
|
getAspect, getDirection, getFarPlane, getLookAt, getNearPlane, getOrthoHeight, getRotationMode, getTarget, getUp, setAspect, setDirection, setFarPlane, setLookAt, setNearPlane, setOrthoHeight, setRotationMode, setTarget, setUp
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
getScene
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
public Light()
Light
class.public Light(java.lang.String name)
Light
class.name
- Namepublic Vector3 getColor()
public void setColor(Vector3 value)
value
- New valuepublic LightType getLightType()
public void setLightType(LightType value)
value
- New valuepublic boolean getCastLight()
public void setCastLight(boolean value)
value
- New valuepublic double getIntensity()
public void setIntensity(double value)
value
- New valuepublic double getHotSpot()
public void setHotSpot(double value)
value
- New valuepublic double getFalloff()
public void setFalloff(double value)
value
- New valuepublic double getConstantAttenuation()
public void setConstantAttenuation(double value)
value
- New valuepublic double getLinearAttenuation()
public void setLinearAttenuation(double value)
value
- New valuepublic double getQuadraticAttenuation()
public void setQuadraticAttenuation(double value)
value
- New valuepublic boolean getCastShadows()
public void setCastShadows(boolean value)
value
- New valuepublic Vector3 getShadowColor()
public void setShadowColor(Vector3 value)
value
- New value