public class HydraX
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
HydraX.HydraXPreparePlugin |
class |
HydraX.HydraXRenderPlugin |
| Modifier and Type | Field and Description |
|---|---|
static float |
EARTH_GRAVITY
Earth gravity (m/s2)
|
static int |
HYDRAX_VERSION_MAJOR |
static int |
HYDRAX_VERSION_MINOR |
static int |
HYDRAX_VERSION_PATCH |
static int |
SEAWATER_DENSITY
Seawater density (kg/m3)
|
static java.lang.String |
SURFACE_UNDERWATER_DEPTH |
static int |
UNIT_SCALE
1m = UNIT_SCALE unit
Default value: UNIT_SCALE = 1 = 1m |
| Constructor and Description |
|---|
HydraX(AssetManager assets,
View c)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
_isCurrentFrameUnderwater()
Is current frame underwater?
|
protected void |
_setStrength(float strength)
Set water strength GPU param
|
void |
addDepthSurface(Material material) |
void |
create()
Create all resources according with current HydraX components and
add HydraX to the scene.
|
void |
destroy(IGLApi glApi) |
float |
getCausticsEnd()
Get caustics end
|
float |
getCausticsPower()
Get caustics power
|
float |
getCausticsScale()
Get caustics scale
|
float |
getDepthLimit()
Get depth limit
|
float |
getDistLimit()
Get distance limit (viewable underwater)
|
float |
getFoamMaxDistance()
Get foam max distance
|
float |
getFoamScale()
Get foam scale
|
float |
getFoamStart()
Get foam start
|
float |
getFoamTransparency()
Get foam transparency
|
float |
getFullReflectionDistance()
Get full reflection distance
|
float |
getGlobalTransparency()
Get global transparency
|
Vec3 |
getGodRaysExposure(Vec3 dst)
Get God rays exposure factors
|
float |
getGodRaysIntensity()
Get God rays intensity
|
Module |
getModule()
Get our Module::Module
|
float |
getNormalDistortion()
Get normal distortion
|
HydraX.HydraXPreparePlugin |
getPipelinePreparePlugin() |
HydraX.HydraXRenderPlugin |
getPipelineRenderPlugin() |
float |
getPlanesError()
Get current clip planes error
|
float |
getSmoothPower()
Get smooth power
|
float |
getSunArea()
Get sun area
|
Vec3 |
getSunColor(Vec3 dst)
Get sun color
|
Vec3 |
getSunPosition(Vec3 dst)
Get sun position
|
float |
getSunStrength()
Get water strength
|
float |
getUnderwaterCameraSwitchDelta()
Get the y-displacement under the water needed to change between underwater and overwater mode
|
Vec3 |
getWaterColor(Vec3 dst)
Get water color
|
boolean |
isComponent(HydraXComponent component)
Returns if the specified component is active
|
boolean |
isCreated()
Has create() already called?
|
boolean |
isVisible()
Is hydrax water visible?
|
boolean |
loadConfig(Stream stream)
Load config from file
|
void |
render(IGLApi glApi,
ISurfaceRenderable scene)
Render with scene composition (reflection, ...)
|
boolean |
saveConfig(Stream stream)
Save hydrax config to file
|
void |
setCausticsEnd(float causticsEnd)
Set caustics end
|
void |
setCausticsPower(float causticsPower)
Set caustics power
|
void |
setCausticsScale(float causticsScale)
Set caustics scale
|
void |
setComponents(Array<HydraXComponent> _components_)
Set HydraX components
|
void |
setDepthLimit(float depthLimit)
Set depth limit
|
void |
setDistLimit(float distLimit)
Set distance limit underwater (occlusion)
|
void |
setFoamMaxDistance(float foamMaxDistance)
Set foam max distance
|
void |
setFoamScale(float foamScale)
Set foam scale
|
void |
setFoamStart(float foamStart)
Set foam start
|
void |
setFoamTransparency(float foamTransparency)
Set foam transparency
|
void |
setFullReflectionDistance(float fullReflectionDistance)
Set full reflection distance
|
void |
setGlobalTransparency(float globalTransparency)
Set global transparency
|
void |
setGodRaysExposure(Vec3 godRaysExposure)
Set god rays exposure
|
void |
setGodRaysIntensity(float godRaysIntensity)
Set god rays intensity
|
void |
setModule(Module _module)
Set HydraX module
|
void |
setNormalDistortion(float normalDistortion)
Set normal distortion
|
void |
setPlanesError(float planesError)
Set clip planes error
|
void |
setSmoothPower(float smoothPower)
Set smooth power
|
void |
setSunArea(float sunArea)
Set sun area
|
void |
setSunColor(Vec3 sunColor)
Set sun color
|
void |
setSunPosition(Vec3 sunPosition)
Set sun position
|
void |
setSunStrength(float sunStrength)
Set sun strength
|
void |
setUnderwaterCameraSwitchDelta(float underwaterCameraSwitchDelta) |
void |
setVisible(boolean visible)
Show/Hide hydrax water
|
void |
setWaterColor(Vec3 waterColor)
Set water color
|
void |
update(float timeSinceLastFrame)
Call every frame
|
void |
updateView() |
public static final int HYDRAX_VERSION_MAJOR
public static final int HYDRAX_VERSION_MINOR
public static final int HYDRAX_VERSION_PATCH
public static final java.lang.String SURFACE_UNDERWATER_DEPTH
public static int UNIT_SCALE
public static final float EARTH_GRAVITY
public static final int SEAWATER_DENSITY
public HydraX(AssetManager assets, View c)
sm - Ogre SceneManagerc - Ogre Camerav - Ogre Main window viewportpublic void destroy(IGLApi glApi)
public void create()
public void addDepthSurface(Material material)
public void update(float timeSinceLastFrame)
public void updateView()
public final void render(IGLApi glApi, ISurfaceRenderable scene)
HydraX, the specified scene
with optionally the SkyX specified.glApi - skyX - optional SkyXscene - public HydraX.HydraXPreparePlugin getPipelinePreparePlugin()
public HydraX.HydraXRenderPlugin getPipelineRenderPlugin()
public boolean isCreated()
public void setVisible(boolean visible)
Visible - true to show, false to hidepublic boolean isVisible()
public boolean loadConfig(Stream stream)
stream - File namepublic boolean saveConfig(Stream stream)
stream - File namepublic void setModule(Module _module)
_module - HydraX moduleProjectedGridpublic void setComponents(Array<HydraXComponent> _components_)
Components - Componentspublic boolean isComponent(HydraXComponent component)
component - Component that we want to checkpublic void setPlanesError(float planesError)
PlanesError - Clip planes errorpublic float getPlanesError()
protected void _setStrength(float strength)
strength - Water strength GPU parampublic void setFullReflectionDistance(float fullReflectionDistance)
fullReflectionDistance - Full reflection distancepublic float getFullReflectionDistance()
public void setGlobalTransparency(float globalTransparency)
globalTransparency - Global transparency distancepublic float getGlobalTransparency()
public void setWaterColor(Vec3 waterColor)
DepthColor - Water colorpublic void setNormalDistortion(float normalDistortion)
normalDistortion - Normal distortionpublic float getNormalDistortion()
public void setSunPosition(Vec3 sunPosition)
sunPosition - Sun positionpublic void setSunStrength(float sunStrength)
sunStrength - Sun strengthpublic float getSunStrength()
public void setSunArea(float sunArea)
sunArea - Sun areapublic float getSunArea()
public void setSunColor(Vec3 sunColor)
sunColor - Sun colorpublic void setFoamMaxDistance(float foamMaxDistance)
foamMaxDistance - Foam max distancepublic float getFoamMaxDistance()
public void setFoamScale(float foamScale)
foamScale - Foam scalepublic float getFoamScale()
public void setFoamStart(float foamStart)
foamStart - Foam startpublic float getFoamStart()
public void setFoamTransparency(float foamTransparency)
foamTransparency - Foam transparencypublic float getFoamTransparency()
public void setDepthLimit(float depthLimit)
depthLimit - Depth limitpublic float getDepthLimit()
public void setDistLimit(float distLimit)
distLimit - Distance limitpublic float getDistLimit()
public void setSmoothPower(float smoothPower)
smoothPower - Smooth powerpublic float getSmoothPower()
public void setCausticsScale(float causticsScale)
causticsScale - Caustics scalepublic float getCausticsScale()
public void setCausticsPower(float causticsPower)
causticsPower - Caustics powerpublic float getCausticsPower()
public void setCausticsEnd(float causticsEnd)
causticsEnd - Caustics endpublic float getCausticsEnd()
public void setGodRaysExposure(Vec3 godRaysExposure)
godRaysExposure - God rays exposurepublic Vec3 getGodRaysExposure(Vec3 dst)
public void setGodRaysIntensity(float godRaysIntensity)
godRaysIntensity - God rays intensitypublic float getGodRaysIntensity()
public float getUnderwaterCameraSwitchDelta()
public void setUnderwaterCameraSwitchDelta(float underwaterCameraSwitchDelta)
protected boolean _isCurrentFrameUnderwater()
public Module getModule()
Bonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com