Package com.ijurnove.cpu3d
Class Light
java.lang.Object
com.ijurnove.cpu3d.Light
- Direct Known Subclasses:
DirectionalLight,PointLight
Objects that extend the
Light class are used by Scene to calculate lighting. Each extension of the Light class must have
a LightType and a PhongComponents to describe the color and type of light that it casts.
lightVec(), distance(), shadowValue(), updateShadowMap(), and init() are automatically run in
light calculations and should never need to be manually called.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns thePhongComponents.Returns the parentScene.getType()Returns theLightType.voidsetComponents(PhongComponents components) Sets thePhongComponentsof thisLight.voidSets the parentSceneof thisLight.
-
Constructor Details
-
Light
-
-
Method Details
-
getType
Returns theLightType.- Returns:
- the LightType
-
getComponents
Returns thePhongComponents.- Returns:
- the PhongComponents
-
getParent
Returns the parentScene.- Returns:
- the parent Scene
-
setParent
Sets the parentSceneof thisLight.- Parameters:
parent- the scene to set
-
setComponents
Sets thePhongComponentsof thisLight.- Parameters:
components- the PhongComponents to set
-