Class DrawMeshes
java.lang.Object
com.marginallyclever.ro3.apps.viewport.renderpasses.AbstractRenderPass
com.marginallyclever.ro3.apps.viewport.renderpasses.DrawMeshes
- All Implemented Interfaces:
com.jogamp.opengl.GLEventListener
,RenderPass
,EventListener
Draw each
MeshInstance
as a Mesh
. If the MeshInstance
has a sibling Material
with
a Texture
then use it in the ShaderProgram
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final javax.vecmath.Matrix4d
static final javax.vecmath.Matrix4d
static final int
static final int
static Color
static final javax.vecmath.Vector3d
Fields inherited from interface com.marginallyclever.ro3.apps.viewport.RenderPass
ALWAYS, MAX_STATUS, NEVER, SOMETIMES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose
(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) void
Draw this viewport pass.double
javax.vecmath.Vector3d
double
void
init
(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) static javax.vecmath.Matrix4d
lookAt
(javax.vecmath.Vector3d eye, javax.vecmath.Vector3d center, javax.vecmath.Vector3d up) void
void
setDeclination
(double declination) void
setSunlightColor
(Color color) void
setTimeOfDay
(double timeOfDay) Methods inherited from class com.marginallyclever.ro3.apps.viewport.renderpasses.AbstractRenderPass
display, getActiveStatus, getName, reshape, setActiveStatus, setName
-
Field Details
-
SHADOW_WIDTH
public static final int SHADOW_WIDTH- See Also:
-
SHADOW_HEIGHT
public static final int SHADOW_HEIGHT- See Also:
-
sunlightSource
public static final javax.vecmath.Vector3d sunlightSource -
sunlightColor
-
lightProjection
public static final javax.vecmath.Matrix4d lightProjection -
lightView
public static final javax.vecmath.Matrix4d lightView
-
-
Constructor Details
-
DrawMeshes
public DrawMeshes()
-
-
Method Details
-
init
public void init(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) - Specified by:
init
in interfacecom.jogamp.opengl.GLEventListener
- Overrides:
init
in classAbstractRenderPass
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable glAutoDrawable) - Specified by:
dispose
in interfacecom.jogamp.opengl.GLEventListener
- Overrides:
dispose
in classAbstractRenderPass
-
draw
Description copied from interface:RenderPass
Draw this viewport pass.- Specified by:
draw
in interfaceRenderPass
- Overrides:
draw
in classAbstractRenderPass
- Parameters:
viewport
- the viewport to draw into
-
lookAt
public static javax.vecmath.Matrix4d lookAt(javax.vecmath.Vector3d eye, javax.vecmath.Vector3d center, javax.vecmath.Vector3d up) -
getSunlightColor
-
setSunlightColor
-
getSunlightSource
public javax.vecmath.Vector3d getSunlightSource() -
getDeclination
public double getDeclination() -
setDeclination
public void setDeclination(double declination) -
getTimeOfDay
public double getTimeOfDay() -
setTimeOfDay
public void setTimeOfDay(double timeOfDay) -
savePrefs
public void savePrefs()
-