Package com.ijurnove.cpu3d
Class DirectionalLight
java.lang.Object
com.ijurnove.cpu3d.Light
com.ijurnove.cpu3d.DirectionalLight
- All Implemented Interfaces:
Rotatable
DirectionalLight is a Light with a direction but no specific position. A DirectionalLight casts light
over the entire scene in the direction of the specified Vector3d.
-
Constructor Summary
ConstructorsConstructorDescriptionDirectionalLight(Vector3d direction, PhongComponents components) Constructs aDirectionalLightwith the specified direction andPhongComponents. -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleprotected Cameraprotected voidinit()protected Vector3dvoidRotates this object about a given point on a specified axis.protected doubleshadowValue(Point3d point) protected voidMethods inherited from class com.ijurnove.cpu3d.Light
getComponents, getParent, getType, setComponents, setParent
-
Constructor Details
-
DirectionalLight
Constructs aDirectionalLightwith the specified direction andPhongComponents.- Parameters:
direction- the direction of the lightcomponents- the PhongComponents to set, which detail the color and intensity of each type of light
-
-
Method Details
-
init
protected void init() -
getCamera
-
updateShadowMap
protected void updateShadowMap() -
shadowValue
-
lightVec
-
distance
-
rotate
Description copied from interface:RotatableRotates this object about a given point on a specified axis. 0 corresponds to the X axis, 1 corresponds to the Y axis, and 2 corresponds to the Z axis.
-