public final class Light extends java.lang.Object implements ILight
| Constructor and Description |
|---|
Light() |
| Modifier and Type | Method and Description |
|---|---|
Color3 |
getAmbient() |
Vec3 |
getAttenuation() |
Color3 |
getColor() |
float |
getConstantAttenuation() |
Color3 |
getDiffuse() |
LightType |
getLightType() |
float |
getLinearAttenuation() |
Vec4 |
getPositionOrDirection() |
boolean |
getProperty(ILightPropertyReceiver lm,
LightProperty p) |
float |
getQuadracticAttenuation() |
ICamera |
getRelTo() |
Color3 |
getSpecular() |
float |
getSpotCutoff() |
Vec3 |
getSpotDirection() |
float |
getSpotExponent() |
IVolume |
getVolume(int bvOptions) |
boolean |
isCulled() |
boolean |
isEnabled() |
boolean |
isLightActive()
Active property composite of the enable, visibility, culling, ... states.
|
boolean |
isVisible() |
static Light |
read(ByteInputStream in) |
void |
set(Light light) |
void |
setAmbient(Color3 ambient) |
void |
setConstantAttenuation(float constantAttenuation) |
void |
setCulled(boolean culled) |
void |
setDiffuse(Color3 diffuse) |
void |
setEnabled(boolean enabled) |
void |
setLinearAttenuation(float linearAttenuation) |
void |
setPositionOrDirection(Vec4 positionOrDirection) |
void |
setQuadracticAttenuation(float quadracticAttenuation) |
void |
setRelTo(ICamera relTo) |
void |
setSpecular(Color3 specular) |
void |
setSpotCutoff(float spotCutOff) |
void |
setSpotDirection(Vec3 spotDirection) |
void |
setSpotExponent(float spotExponent) |
void |
updateToView(View view)
Update the eye space position/direction with the specified
View |
void |
write(ByteOutputStream out) |
public static final Light read(ByteInputStream in) throws java.io.IOException
java.io.IOExceptionpublic final void write(ByteOutputStream out) throws java.io.IOException
java.io.IOExceptionpublic final void set(Light light)
public boolean isCulled()
public void setCulled(boolean culled)
public boolean isLightActive()
ILightisLightActive in interface ILightILight is activepublic LightType getLightType()
getLightType in interface ILightLightType of this ILightpublic IVolume getVolume(int bvOptions)
getVolume in interface IBoundablebvOptions - bounding volume options.BoundingBox or BoundingSphere depending on options.VolumeOptions,
Box,
Sphere,
Cylinder,
Capsulepublic boolean getProperty(ILightPropertyReceiver lm, LightProperty p)
getProperty in interface ILightlm - the ILightModel to set the property top - a LightPropertypublic void setRelTo(ICamera relTo)
public ICamera getRelTo()
public final void updateToView(View view)
ILightViewupdateToView in interface ILightpublic final boolean isEnabled()
public final void setEnabled(boolean enabled)
public final float getSpotCutoff()
public final void setSpotCutoff(float spotCutOff)
spotCutOff - a value in range [0;90] or 180public final float getSpotExponent()
public final void setSpotExponent(float spotExponent)
spotExponent - a value in range [0;128]public Vec3 getAttenuation()
public final float getConstantAttenuation()
public final void setConstantAttenuation(float constantAttenuation)
public final float getLinearAttenuation()
public final void setLinearAttenuation(float linearAttenuation)
public final float getQuadracticAttenuation()
public final void setQuadracticAttenuation(float quadracticAttenuation)
public final Color3 getAmbient()
public final void setAmbient(Color3 ambient)
public Color3 getColor()
public final Color3 getDiffuse()
public final void setDiffuse(Color3 diffuse)
public final Color3 getSpecular()
public final void setSpecular(Color3 specular)
public final Vec4 getPositionOrDirection()
public final void setPositionOrDirection(Vec4 positionOrDirection)
positionOrDirection - the position of a positional light, or the direction of a directional light (w == 0)public final Vec3 getSpotDirection()
public final void setSpotDirection(Vec3 spotDirection)
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com