Class MirrorSource
java.lang.Object
gaiasky.util.gdx.model.gltf.scene3d.scene.MirrorSource
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanenable/disable scene clipping.protected com.badlogic.gdx.graphics.glutils.FrameBufferprotected final MirrorSourceAttribute -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin(com.badlogic.gdx.graphics.Camera camera, Environment environment, SceneSkybox skyBox) protected com.badlogic.gdx.graphics.glutils.FrameBuffercreateFrameBuffer(int width, int height) voiddispose()voidend()set(float nx, float ny, float nz, float d, boolean clipScene) set mirror sourcevoidsetPlane(float nx, float ny, float nz, float d) set mirror planevoidsetSize(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:
disposein interfacecom.badlogic.gdx.utils.Disposable
-