113 lines
3.2 KiB
C
113 lines
3.2 KiB
C
|
|
/* -*-c++-*- */
|
||
|
|
/* osgEarth - Geospatial SDK for OpenSceneGraph
|
||
|
|
* Copyright 2020 Pelican Mapping
|
||
|
|
* http://osgearth.org
|
||
|
|
*
|
||
|
|
* osgEarth is free software; you can redistribute it and/or modify
|
||
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
||
|
|
* the Free Software Foundation; either version 2 of the License, or
|
||
|
|
* (at your option) any later version.
|
||
|
|
*
|
||
|
|
* This program is distributed in the hope that it will be useful,
|
||
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
|
* GNU Lesser General Public License for more details.
|
||
|
|
*
|
||
|
|
* You should have received a copy of the GNU Lesser General Public License
|
||
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||
|
|
*/
|
||
|
|
#ifndef OSGEARTH_TRITON_API_WRAPPER
|
||
|
|
#define OSGEARTH_TRITON_API_WRAPPER 1
|
||
|
|
|
||
|
|
//#include "Common"
|
||
|
|
#include <osg/Vec3>
|
||
|
|
#include <osg/Matrix>
|
||
|
|
#include <osg/GL>
|
||
|
|
#include <stdint.h> // for uintptr_t
|
||
|
|
|
||
|
|
namespace osgEarth {
|
||
|
|
namespace Util {
|
||
|
|
class OceanNode;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
namespace osgEarth { namespace Triton
|
||
|
|
{
|
||
|
|
/** Enumerates the ocean quality settings used in Ocean::SetQuality() */
|
||
|
|
enum OceanQuality {
|
||
|
|
GOOD,
|
||
|
|
BETTER,
|
||
|
|
BEST
|
||
|
|
};
|
||
|
|
|
||
|
|
class BreakingWavesParameters
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
void SetSteepness(float);
|
||
|
|
float GetSteepness() const;
|
||
|
|
|
||
|
|
void SetWavelength(float);
|
||
|
|
float GetWavelength() const;
|
||
|
|
|
||
|
|
public:
|
||
|
|
BreakingWavesParameters(uintptr_t handle) : _handle(handle) { }
|
||
|
|
uintptr_t _handle;
|
||
|
|
};
|
||
|
|
|
||
|
|
class Environment
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
void SetDirectionalLight(const osg::Vec3& dir, const osg::Vec3& color);
|
||
|
|
osg::Vec3 GetLightDirection() const;
|
||
|
|
osg::Vec3 GetDirectionalLightColor() const;
|
||
|
|
|
||
|
|
void SetAmbientLight(const osg::Vec3& color);
|
||
|
|
osg::Vec3 GetAmbientLightColor() const;
|
||
|
|
|
||
|
|
void SetSunIntensity(float intensity);
|
||
|
|
float GetSunIntensity() const;
|
||
|
|
|
||
|
|
BreakingWavesParameters GetBreakingWavesParameters() const;
|
||
|
|
|
||
|
|
void SimulateSeaState(double bs, double winddir);
|
||
|
|
|
||
|
|
void SetAboveWaterVisibility(double visibility, osg::Vec3 fog_color);
|
||
|
|
void GetAboveWaterVisibility(double &visibility, osg::Vec3 &fog_color) const;
|
||
|
|
|
||
|
|
void SetEnvironmentMap(GLuint id, const osg::Matrixd &textureMatrix = osg::Matrixd());
|
||
|
|
GLuint GetEnvironmentMap() const;
|
||
|
|
osg::Matrixd GetEnvironmentMapMatrix() const;
|
||
|
|
public:
|
||
|
|
Environment(uintptr_t handle) : _handle(handle) { }
|
||
|
|
uintptr_t _handle;
|
||
|
|
};
|
||
|
|
|
||
|
|
class Ocean
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
void SetChoppiness(float);
|
||
|
|
float GetChoppiness() const;
|
||
|
|
|
||
|
|
void EnableWireframe(bool wireframe);
|
||
|
|
|
||
|
|
void SetQuality(OceanQuality value);
|
||
|
|
OceanQuality GetQuality() const;
|
||
|
|
|
||
|
|
void EnableSpray(bool enabled);
|
||
|
|
bool SprayEnabled() const;
|
||
|
|
|
||
|
|
void EnableGodRays(bool enabled);
|
||
|
|
bool GodRaysEnabled() const;
|
||
|
|
|
||
|
|
void SetGodRaysFade(float fadeAmount);
|
||
|
|
float GetGodRaysFade() const;
|
||
|
|
|
||
|
|
public:
|
||
|
|
Ocean(uintptr_t handle) : _handle(handle) { }
|
||
|
|
uintptr_t _handle;
|
||
|
|
};
|
||
|
|
|
||
|
|
} } // namespace osgEarth::SilverLining
|
||
|
|
|
||
|
|
#endif // OSGEARTH_TRITON_API_WRAPPER
|