Class MirrorSource
java.lang.Object
gaiasky.util.gdx.model.gltf.scene3d.scene.MirrorSource
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
-
Field Summary
Modifier and TypeFieldDescriptionboolean
enable/disable scene clipping.protected com.badlogic.gdx.graphics.glutils.FrameBuffer
protected final MirrorSourceAttribute
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
begin
(com.badlogic.gdx.graphics.Camera camera, Environment environment, SceneSkybox skyBox) protected com.badlogic.gdx.graphics.glutils.FrameBuffer
createFrameBuffer
(int width, int height) void
dispose()
void
end()
set
(float nx, float ny, float nz, float d, boolean clipScene) set mirror sourcevoid
setPlane
(float nx, float ny, float nz, float d) set mirror planevoid
setSize
(int width, int height) Set mirror source frame buffer size (usually the same as the final render resolution).
-
Field Details
-
fbo
protected com.badlogic.gdx.graphics.glutils.FrameBuffer fbo -
clipScene
public boolean clipSceneenable/disable scene clipping. When enabled, objects behind mirror are not rendered. -
mirrorAttribute
-
-
Constructor Details
-
MirrorSource
public MirrorSource()
-
-
Method Details
-
createFrameBuffer
protected com.badlogic.gdx.graphics.glutils.FrameBuffer createFrameBuffer(int width, int height) -
setSize
public void setSize(int width, int height) Set mirror source frame buffer size (usually the same as the final render resolution).- Parameters:
width
- when set to zero, default back buffer width will be used.height
- when set to zero, default back buffer height will be used.
-
setPlane
public void setPlane(float nx, float ny, float nz, float d) set mirror plane- Parameters:
nx
- normal xny
- normal ynz
- normal zd
- plan origin
-
set
set mirror source- Parameters:
nx
- normal xny
- normal ynz
- normal zd
- plan originclipScene
- if objects behind the plane should be clipped.
-
begin
public void begin(com.badlogic.gdx.graphics.Camera camera, Environment environment, SceneSkybox skyBox) -
end
public void end() -
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-