Package com.aspose.threed
Class Light
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.SceneObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Frustum
-
- com.aspose.threed.Light
-
- All Implemented Interfaces:
INamedObject
,IOrientable
public class Light extends Frustum
The light illuminates the scene.The formula to calculate the total attenuation of light is:
A = ConstantAttenuation + (Dist * LinearAttenuation) + ((Dist^2) * QuadraticAttenuation)
-
-
Field Summary
-
Fields inherited from class com.aspose.threed.A3DObject
name, properties
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 colordouble
getConstantAttenuation()
Gets the constant attenuation to calculate the total attenuation of the lightdouble
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 100LightType
getLightType()
Gets the light's typedouble
getLinearAttenuation()
Gets the linear attenuation to calculate the total attenuation of the lightdouble
getQuadraticAttenuation()
Gets the quadratic attenuation to calculate the total attenuation of the lightVector3
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 colorvoid
setConstantAttenuation(double value)
Sets the constant attenuation to calculate the total attenuation of the lightvoid
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 100void
setLightType(LightType value)
Sets the light's typevoid
setLinearAttenuation(double value)
Sets the linear attenuation to calculate the total attenuation of the lightvoid
setQuadraticAttenuation(double value)
Sets the quadratic attenuation to calculate the total attenuation of the lightvoid
setShadowColor(Vector3 value)
Sets the shadow's color.-
Methods inherited from class com.aspose.threed.Frustum
getAspect, getDirection, getFarPlane, getLookAt, getNearPlane, getOrthoHeight, getRotationMode, getTarget, getUp, setAspect, setDirection, setFarPlane, setLookAt, setNearPlane, setOrthoHeight, setRotationMode, setTarget, setUp
-
Methods inherited from class com.aspose.threed.Entity
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.SceneObject
getScene
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
-
-
-
-
Method Detail
-
getColor
public Vector3 getColor()
Gets the light's color
-
setColor
public void setColor(Vector3 value)
Sets the light's color- Parameters:
value
- New value
-
getLightType
public LightType getLightType()
Gets the light's type
-
setLightType
public void setLightType(LightType value)
Sets the light's type- Parameters:
value
- New value
-
getCastLight
public boolean getCastLight()
Gets if the current light instance can illuminate other objects.
-
setCastLight
public void setCastLight(boolean value)
Sets if the current light instance can illuminate other objects.- Parameters:
value
- New value
-
getIntensity
public double getIntensity()
Gets the light's intensity, default value is 100
-
setIntensity
public void setIntensity(double value)
Sets the light's intensity, default value is 100- Parameters:
value
- New value
-
getHotSpot
public double getHotSpot()
Gets the hot spot cone angle(in degrees).
-
setHotSpot
public void setHotSpot(double value)
Sets the hot spot cone angle(in degrees).- Parameters:
value
- New value
-
getFalloff
public double getFalloff()
Gets the falloff cone angle (in degrees).
-
setFalloff
public void setFalloff(double value)
Sets the falloff cone angle (in degrees).- Parameters:
value
- New value
-
getConstantAttenuation
public double getConstantAttenuation()
Gets the constant attenuation to calculate the total attenuation of the light
-
setConstantAttenuation
public void setConstantAttenuation(double value)
Sets the constant attenuation to calculate the total attenuation of the light- Parameters:
value
- New value
-
getLinearAttenuation
public double getLinearAttenuation()
Gets the linear attenuation to calculate the total attenuation of the light
-
setLinearAttenuation
public void setLinearAttenuation(double value)
Sets the linear attenuation to calculate the total attenuation of the light- Parameters:
value
- New value
-
getQuadraticAttenuation
public double getQuadraticAttenuation()
Gets the quadratic attenuation to calculate the total attenuation of the light
-
setQuadraticAttenuation
public void setQuadraticAttenuation(double value)
Sets the quadratic attenuation to calculate the total attenuation of the light- Parameters:
value
- New value
-
getCastShadows
public boolean getCastShadows()
Gets if the light can cast shadows on other objects.
-
setCastShadows
public void setCastShadows(boolean value)
Sets if the light can cast shadows on other objects.- Parameters:
value
- New value
-
getShadowColor
public Vector3 getShadowColor()
Gets the shadow's color.
-
setShadowColor
public void setShadowColor(Vector3 value)
Sets the shadow's color.- Parameters:
value
- New value
-
-