Class DirectionalShadowLight
java.lang.Object
com.badlogic.gdx.graphics.g3d.environment.BaseLight<com.badlogic.gdx.graphics.g3d.environment.DirectionalLight>
com.badlogic.gdx.graphics.g3d.environment.DirectionalLight
gaiasky.util.gdx.model.gltf.scene3d.lights.DirectionalLightEx
gaiasky.util.gdx.model.gltf.scene3d.lights.DirectionalShadowLight
- All Implemented Interfaces:
com.badlogic.gdx.graphics.g3d.environment.ShadowMap
,com.badlogic.gdx.utils.Disposable
public class DirectionalShadowLight
extends DirectionalLightEx
implements com.badlogic.gdx.graphics.g3d.environment.ShadowMap, com.badlogic.gdx.utils.Disposable
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.badlogic.gdx.graphics.Camera
protected final com.badlogic.gdx.math.Vector3
protected com.badlogic.gdx.graphics.glutils.FrameBuffer
protected static final float
protected final com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor
protected final com.badlogic.gdx.math.Vector3
Fields inherited from class gaiasky.util.gdx.model.gltf.scene3d.lights.DirectionalLightEx
baseColor, intensity
Fields inherited from class com.badlogic.gdx.graphics.g3d.environment.DirectionalLight
direction
Fields inherited from class com.badlogic.gdx.graphics.g3d.environment.BaseLight
color
-
Constructor Summary
ConstructorDescriptionDirectionalShadowLight
(int shadowMapWidth, int shadowMapHeight) DirectionalShadowLight
(int shadowMapWidth, int shadowMapHeight, float shadowViewportWidth, float shadowViewportHeight, float shadowNear, float shadowFar) -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
protected com.badlogic.gdx.graphics.glutils.FrameBuffer
createFrameBuffer
(int width, int height) void
dispose()
void
end()
boolean
equals
(DirectionalLightEx other) boolean
equals
(DirectionalShadowLight other) com.badlogic.gdx.graphics.Camera
com.badlogic.gdx.math.Vector3
getCenter
(com.badlogic.gdx.math.Vector3 center) com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor
com.badlogic.gdx.graphics.glutils.FrameBuffer
com.badlogic.gdx.math.Matrix4
setBounds
(com.badlogic.gdx.math.collision.BoundingBox box) setCenter
(float x, float y, float z) setCenter
(com.badlogic.gdx.math.Vector3 center) setShadowMapSize
(int shadowMapWidth, int shadowMapHeight) setViewport
(float shadowViewportWidth, float shadowViewportHeight, float shadowNear, float shadowFar) protected void
validate()
Methods inherited from class gaiasky.util.gdx.model.gltf.scene3d.lights.DirectionalLightEx
equals, set, set, set, set, set, set, updateColor
Methods inherited from class com.badlogic.gdx.graphics.g3d.environment.DirectionalLight
equals, setDirection, setDirection
Methods inherited from class com.badlogic.gdx.graphics.g3d.environment.BaseLight
setColor, setColor
-
Field Details
-
SQRT2
protected static final float SQRT2 -
fbo
protected com.badlogic.gdx.graphics.glutils.FrameBuffer fbo -
cam
protected com.badlogic.gdx.graphics.Camera cam -
tmpV
protected final com.badlogic.gdx.math.Vector3 tmpV -
textureDesc
protected final com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor textureDesc -
center
protected final com.badlogic.gdx.math.Vector3 center
-
-
Constructor Details
-
DirectionalShadowLight
public DirectionalShadowLight() -
DirectionalShadowLight
public DirectionalShadowLight(int shadowMapWidth, int shadowMapHeight) -
DirectionalShadowLight
public DirectionalShadowLight(int shadowMapWidth, int shadowMapHeight, float shadowViewportWidth, float shadowViewportHeight, float shadowNear, float shadowFar)
-
-
Method Details
-
setShadowMapSize
-
createFrameBuffer
protected com.badlogic.gdx.graphics.glutils.FrameBuffer createFrameBuffer(int width, int height) -
setViewport
public DirectionalShadowLight setViewport(float shadowViewportWidth, float shadowViewportHeight, float shadowNear, float shadowFar) -
setCenter
-
getCenter
public com.badlogic.gdx.math.Vector3 getCenter(com.badlogic.gdx.math.Vector3 center) -
setCenter
-
setBounds
-
validate
protected void validate() -
begin
public void begin() -
end
public void end() -
getFrameBuffer
public com.badlogic.gdx.graphics.glutils.FrameBuffer getFrameBuffer() -
getCamera
public com.badlogic.gdx.graphics.Camera getCamera() -
getProjViewTrans
public com.badlogic.gdx.math.Matrix4 getProjViewTrans()- Specified by:
getProjViewTrans
in interfacecom.badlogic.gdx.graphics.g3d.environment.ShadowMap
-
getDepthMap
public com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor getDepthMap()- Specified by:
getDepthMap
in interfacecom.badlogic.gdx.graphics.g3d.environment.ShadowMap
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
equals
- Overrides:
equals
in classDirectionalLightEx
-
equals
-