mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:47:11 +02:00
Merge pull request #2401 from ey6es/flatmosphere
Added a "flat" atmosphere mode (the default) that makes the atmosphere follow you around on the X/Z axes.
This commit is contained in:
commit
4c7f40b006
9 changed files with 109 additions and 57 deletions
|
@ -4,22 +4,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>Application</name>
|
<name>Application</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="src/Application.cpp" line="1354"/>
|
<location filename="src/Application.cpp" line="1364"/>
|
||||||
<source>Export Voxels</source>
|
<source>Export Voxels</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="src/Application.cpp" line="1355"/>
|
<location filename="src/Application.cpp" line="1365"/>
|
||||||
<source>Sparse Voxel Octree Files (*.svo)</source>
|
<source>Sparse Voxel Octree Files (*.svo)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="src/Application.cpp" line="3565"/>
|
<location filename="src/Application.cpp" line="3577"/>
|
||||||
<source>Open Script</source>
|
<source>Open Script</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="src/Application.cpp" line="3566"/>
|
<location filename="src/Application.cpp" line="3578"/>
|
||||||
<source>JavaScript Files (*.js)</source>
|
<source>JavaScript Files (*.js)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -113,18 +113,18 @@
|
||||||
<context>
|
<context>
|
||||||
<name>Menu</name>
|
<name>Menu</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="src/Menu.cpp" line="437"/>
|
<location filename="src/Menu.cpp" line="439"/>
|
||||||
<source>Open .ini config file</source>
|
<source>Open .ini config file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="src/Menu.cpp" line="439"/>
|
<location filename="src/Menu.cpp" line="441"/>
|
||||||
<location filename="src/Menu.cpp" line="451"/>
|
<location filename="src/Menu.cpp" line="453"/>
|
||||||
<source>Text files (*.ini)</source>
|
<source>Text files (*.ini)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="src/Menu.cpp" line="449"/>
|
<location filename="src/Menu.cpp" line="451"/>
|
||||||
<source>Save .ini config file</source>
|
<source>Save .ini config file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -692,6 +692,8 @@ bool Application::event(QEvent* event) {
|
||||||
|
|
||||||
void Application::keyPressEvent(QKeyEvent* event) {
|
void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
|
|
||||||
|
_keysPressed.insert(event->key());
|
||||||
|
|
||||||
_controllerScriptingInterface.emitKeyPressEvent(event); // send events to any registered scripts
|
_controllerScriptingInterface.emitKeyPressEvent(event); // send events to any registered scripts
|
||||||
|
|
||||||
// if one of our scripts have asked to capture this event, then stop processing it
|
// if one of our scripts have asked to capture this event, then stop processing it
|
||||||
|
@ -914,6 +916,8 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
|
|
||||||
void Application::keyReleaseEvent(QKeyEvent* event) {
|
void Application::keyReleaseEvent(QKeyEvent* event) {
|
||||||
|
|
||||||
|
_keysPressed.remove(event->key());
|
||||||
|
|
||||||
_controllerScriptingInterface.emitKeyReleaseEvent(event); // send events to any registered scripts
|
_controllerScriptingInterface.emitKeyReleaseEvent(event); // send events to any registered scripts
|
||||||
|
|
||||||
// if one of our scripts have asked to capture this event, then stop processing it
|
// if one of our scripts have asked to capture this event, then stop processing it
|
||||||
|
@ -921,60 +925,66 @@ void Application::keyReleaseEvent(QKeyEvent* event) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (event->key()) {
|
||||||
|
case Qt::Key_E:
|
||||||
|
_myAvatar->setDriveKeys(UP, 0.f);
|
||||||
|
break;
|
||||||
|
|
||||||
if (activeWindow() == _window) {
|
case Qt::Key_C:
|
||||||
switch (event->key()) {
|
_myAvatar->setDriveKeys(DOWN, 0.f);
|
||||||
case Qt::Key_E:
|
break;
|
||||||
_myAvatar->setDriveKeys(UP, 0.f);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Qt::Key_C:
|
case Qt::Key_W:
|
||||||
_myAvatar->setDriveKeys(DOWN, 0.f);
|
_myAvatar->setDriveKeys(FWD, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_W:
|
case Qt::Key_S:
|
||||||
_myAvatar->setDriveKeys(FWD, 0.f);
|
_myAvatar->setDriveKeys(BACK, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_S:
|
case Qt::Key_A:
|
||||||
_myAvatar->setDriveKeys(BACK, 0.f);
|
_myAvatar->setDriveKeys(ROT_LEFT, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_A:
|
case Qt::Key_D:
|
||||||
_myAvatar->setDriveKeys(ROT_LEFT, 0.f);
|
_myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_D:
|
case Qt::Key_Up:
|
||||||
_myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
|
_myAvatar->setDriveKeys(FWD, 0.f);
|
||||||
break;
|
_myAvatar->setDriveKeys(UP, 0.f);
|
||||||
|
break;
|
||||||
|
|
||||||
case Qt::Key_Up:
|
case Qt::Key_Down:
|
||||||
_myAvatar->setDriveKeys(FWD, 0.f);
|
_myAvatar->setDriveKeys(BACK, 0.f);
|
||||||
_myAvatar->setDriveKeys(UP, 0.f);
|
_myAvatar->setDriveKeys(DOWN, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_Down:
|
case Qt::Key_Left:
|
||||||
_myAvatar->setDriveKeys(BACK, 0.f);
|
_myAvatar->setDriveKeys(LEFT, 0.f);
|
||||||
_myAvatar->setDriveKeys(DOWN, 0.f);
|
_myAvatar->setDriveKeys(ROT_LEFT, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_Left:
|
case Qt::Key_Right:
|
||||||
_myAvatar->setDriveKeys(LEFT, 0.f);
|
_myAvatar->setDriveKeys(RIGHT, 0.f);
|
||||||
_myAvatar->setDriveKeys(ROT_LEFT, 0.f);
|
_myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_Right:
|
default:
|
||||||
_myAvatar->setDriveKeys(RIGHT, 0.f);
|
event->ignore();
|
||||||
_myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
|
break;
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
event->ignore();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::focusOutEvent(QFocusEvent* event) {
|
||||||
|
// synthesize events for keys currently pressed, since we may not get their release events
|
||||||
|
foreach (int key, _keysPressed) {
|
||||||
|
QKeyEvent event(QEvent::KeyRelease, key, Qt::NoModifier);
|
||||||
|
keyReleaseEvent(&event);
|
||||||
|
}
|
||||||
|
_keysPressed.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void Application::mouseMoveEvent(QMouseEvent* event) {
|
void Application::mouseMoveEvent(QMouseEvent* event) {
|
||||||
_controllerScriptingInterface.emitMouseMoveEvent(event); // send events to any registered scripts
|
_controllerScriptingInterface.emitMouseMoveEvent(event); // send events to any registered scripts
|
||||||
|
|
||||||
|
@ -2140,7 +2150,8 @@ void Application::loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum) {
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 Application::getSunDirection() {
|
glm::vec3 Application::getSunDirection() {
|
||||||
return glm::normalize(_environment.getClosestData(_myCamera.getPosition()).getSunLocation() - _myCamera.getPosition());
|
return glm::normalize(_environment.getClosestData(_myCamera.getPosition()).getSunLocation(_myCamera.getPosition()) -
|
||||||
|
_myCamera.getPosition());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::updateShadowMap() {
|
void Application::updateShadowMap() {
|
||||||
|
@ -2302,7 +2313,8 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) {
|
||||||
float alpha = 1.0f;
|
float alpha = 1.0f;
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::Atmosphere)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::Atmosphere)) {
|
||||||
const EnvironmentData& closestData = _environment.getClosestData(whichCamera.getPosition());
|
const EnvironmentData& closestData = _environment.getClosestData(whichCamera.getPosition());
|
||||||
float height = glm::distance(whichCamera.getPosition(), closestData.getAtmosphereCenter());
|
float height = glm::distance(whichCamera.getPosition(),
|
||||||
|
closestData.getAtmosphereCenter(whichCamera.getPosition()));
|
||||||
if (height < closestData.getAtmosphereInnerRadius()) {
|
if (height < closestData.getAtmosphereInnerRadius()) {
|
||||||
alpha = 0.0f;
|
alpha = 0.0f;
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTouchEvent>
|
#include <QTouchEvent>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#include <QSet>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
|
@ -122,6 +123,8 @@ public:
|
||||||
void keyPressEvent(QKeyEvent* event);
|
void keyPressEvent(QKeyEvent* event);
|
||||||
void keyReleaseEvent(QKeyEvent* event);
|
void keyReleaseEvent(QKeyEvent* event);
|
||||||
|
|
||||||
|
void focusOutEvent(QFocusEvent* event);
|
||||||
|
|
||||||
void mouseMoveEvent(QMouseEvent* event);
|
void mouseMoveEvent(QMouseEvent* event);
|
||||||
void mousePressEvent(QMouseEvent* event);
|
void mousePressEvent(QMouseEvent* event);
|
||||||
void mouseReleaseEvent(QMouseEvent* event);
|
void mouseReleaseEvent(QMouseEvent* event);
|
||||||
|
@ -432,6 +435,8 @@ private:
|
||||||
|
|
||||||
bool _mousePressed; // true if mouse has been pressed (clear when finished)
|
bool _mousePressed; // true if mouse has been pressed (clear when finished)
|
||||||
|
|
||||||
|
QSet<int> _keysPressed;
|
||||||
|
|
||||||
GeometryCache _geometryCache;
|
GeometryCache _geometryCache;
|
||||||
TextureCache _textureCache;
|
TextureCache _textureCache;
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ glm::vec3 Environment::getGravity (const glm::vec3& position) {
|
||||||
|
|
||||||
foreach (const ServerData& serverData, _data) {
|
foreach (const ServerData& serverData, _data) {
|
||||||
foreach (const EnvironmentData& environmentData, serverData) {
|
foreach (const EnvironmentData& environmentData, serverData) {
|
||||||
glm::vec3 vector = environmentData.getAtmosphereCenter() - position;
|
glm::vec3 vector = environmentData.getAtmosphereCenter(position) - position;
|
||||||
float surfaceRadius = environmentData.getAtmosphereInnerRadius();
|
float surfaceRadius = environmentData.getAtmosphereInnerRadius();
|
||||||
if (glm::length(vector) <= surfaceRadius) {
|
if (glm::length(vector) <= surfaceRadius) {
|
||||||
// At or inside a planet, gravity is as set for the planet
|
// At or inside a planet, gravity is as set for the planet
|
||||||
|
@ -116,7 +116,7 @@ const EnvironmentData Environment::getClosestData(const glm::vec3& position) {
|
||||||
float closestDistance = FLT_MAX;
|
float closestDistance = FLT_MAX;
|
||||||
foreach (const ServerData& serverData, _data) {
|
foreach (const ServerData& serverData, _data) {
|
||||||
foreach (const EnvironmentData& environmentData, serverData) {
|
foreach (const EnvironmentData& environmentData, serverData) {
|
||||||
float distance = glm::distance(position, environmentData.getAtmosphereCenter()) -
|
float distance = glm::distance(position, environmentData.getAtmosphereCenter(position)) -
|
||||||
environmentData.getAtmosphereOuterRadius();
|
environmentData.getAtmosphereOuterRadius();
|
||||||
if (distance < closestDistance) {
|
if (distance < closestDistance) {
|
||||||
closest = environmentData;
|
closest = environmentData;
|
||||||
|
@ -132,6 +132,8 @@ bool Environment::findCapsulePenetration(const glm::vec3& start, const glm::vec3
|
||||||
// collide with the "floor"
|
// collide with the "floor"
|
||||||
bool found = findCapsulePlanePenetration(start, end, radius, glm::vec4(0.0f, 1.0f, 0.0f, 0.0f), penetration);
|
bool found = findCapsulePlanePenetration(start, end, radius, glm::vec4(0.0f, 1.0f, 0.0f, 0.0f), penetration);
|
||||||
|
|
||||||
|
glm::vec3 middle = (start + end) * 0.5f;
|
||||||
|
|
||||||
// get the lock for the duration of the call
|
// get the lock for the duration of the call
|
||||||
QMutexLocker locker(&_mutex);
|
QMutexLocker locker(&_mutex);
|
||||||
|
|
||||||
|
@ -141,7 +143,7 @@ bool Environment::findCapsulePenetration(const glm::vec3& start, const glm::vec3
|
||||||
continue; // don't bother colliding with gravity-less environments
|
continue; // don't bother colliding with gravity-less environments
|
||||||
}
|
}
|
||||||
glm::vec3 environmentPenetration;
|
glm::vec3 environmentPenetration;
|
||||||
if (findCapsuleSpherePenetration(start, end, radius, environmentData.getAtmosphereCenter(),
|
if (findCapsuleSpherePenetration(start, end, radius, environmentData.getAtmosphereCenter(middle),
|
||||||
environmentData.getAtmosphereInnerRadius(), environmentPenetration)) {
|
environmentData.getAtmosphereInnerRadius(), environmentPenetration)) {
|
||||||
penetration = addPenetrations(penetration, environmentPenetration);
|
penetration = addPenetrations(penetration, environmentPenetration);
|
||||||
found = true;
|
found = true;
|
||||||
|
@ -203,10 +205,12 @@ ProgramObject* Environment::createSkyProgram(const char* from, int* locations) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Environment::renderAtmosphere(Camera& camera, const EnvironmentData& data) {
|
void Environment::renderAtmosphere(Camera& camera, const EnvironmentData& data) {
|
||||||
|
glm::vec3 center = data.getAtmosphereCenter(camera.getPosition());
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef(data.getAtmosphereCenter().x, data.getAtmosphereCenter().y, data.getAtmosphereCenter().z);
|
glTranslatef(center.x, center.y, center.z);
|
||||||
|
|
||||||
glm::vec3 relativeCameraPos = camera.getPosition() - data.getAtmosphereCenter();
|
glm::vec3 relativeCameraPos = camera.getPosition() - center;
|
||||||
float height = glm::length(relativeCameraPos);
|
float height = glm::length(relativeCameraPos);
|
||||||
|
|
||||||
// use the appropriate shader depending on whether we're inside or outside
|
// use the appropriate shader depending on whether we're inside or outside
|
||||||
|
|
|
@ -55,6 +55,10 @@ void GLCanvas::keyReleaseEvent(QKeyEvent* event) {
|
||||||
Application::getInstance()->keyReleaseEvent(event);
|
Application::getInstance()->keyReleaseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GLCanvas::focusOutEvent(QFocusEvent* event) {
|
||||||
|
Application::getInstance()->focusOutEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
void GLCanvas::mouseMoveEvent(QMouseEvent* event) {
|
void GLCanvas::mouseMoveEvent(QMouseEvent* event) {
|
||||||
Application::getInstance()->mouseMoveEvent(event);
|
Application::getInstance()->mouseMoveEvent(event);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,8 @@ protected:
|
||||||
virtual void keyPressEvent(QKeyEvent* event);
|
virtual void keyPressEvent(QKeyEvent* event);
|
||||||
virtual void keyReleaseEvent(QKeyEvent* event);
|
virtual void keyReleaseEvent(QKeyEvent* event);
|
||||||
|
|
||||||
|
virtual void focusOutEvent(QFocusEvent* event);
|
||||||
|
|
||||||
virtual void mouseMoveEvent(QMouseEvent* event);
|
virtual void mouseMoveEvent(QMouseEvent* event);
|
||||||
virtual void mousePressEvent(QMouseEvent* event);
|
virtual void mousePressEvent(QMouseEvent* event);
|
||||||
virtual void mouseReleaseEvent(QMouseEvent* event);
|
virtual void mouseReleaseEvent(QMouseEvent* event);
|
||||||
|
|
|
@ -46,6 +46,8 @@ PacketVersion versionForPacketType(PacketType type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PacketTypeAvatarData:
|
case PacketTypeAvatarData:
|
||||||
return 3;
|
return 3;
|
||||||
|
case PacketTypeEnvironmentData:
|
||||||
|
return 1;
|
||||||
case PacketTypeParticleData:
|
case PacketTypeParticleData:
|
||||||
return 1;
|
return 1;
|
||||||
case PacketTypeDomainList:
|
case PacketTypeDomainList:
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
// GameEngine.cpp
|
// GameEngine.cpp
|
||||||
EnvironmentData::EnvironmentData(int id) :
|
EnvironmentData::EnvironmentData(int id) :
|
||||||
_id(id),
|
_id(id),
|
||||||
|
_flat(true),
|
||||||
_gravity(0.0f),
|
_gravity(0.0f),
|
||||||
_atmosphereCenter(0, -1000, 0),
|
_atmosphereCenter(0, -1000, 0),
|
||||||
_atmosphereInnerRadius(1000),
|
_atmosphereInnerRadius(1000),
|
||||||
|
@ -25,12 +26,23 @@ EnvironmentData::EnvironmentData(int id) :
|
||||||
_sunBrightness(20.0f) {
|
_sunBrightness(20.0f) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glm::vec3 EnvironmentData::getAtmosphereCenter(const glm::vec3& cameraPosition) const {
|
||||||
|
return _atmosphereCenter + (_flat ? glm::vec3(cameraPosition.x, 0.0f, cameraPosition.z) : glm::vec3());
|
||||||
|
}
|
||||||
|
|
||||||
|
glm::vec3 EnvironmentData::getSunLocation(const glm::vec3& cameraPosition) const {
|
||||||
|
return _sunLocation + (_flat ? glm::vec3(cameraPosition.x, 0.0f, cameraPosition.z) : glm::vec3());
|
||||||
|
}
|
||||||
|
|
||||||
int EnvironmentData::getBroadcastData(unsigned char* destinationBuffer) const {
|
int EnvironmentData::getBroadcastData(unsigned char* destinationBuffer) const {
|
||||||
unsigned char* bufferStart = destinationBuffer;
|
unsigned char* bufferStart = destinationBuffer;
|
||||||
|
|
||||||
memcpy(destinationBuffer, &_id, sizeof(_id));
|
memcpy(destinationBuffer, &_id, sizeof(_id));
|
||||||
destinationBuffer += sizeof(_id);
|
destinationBuffer += sizeof(_id);
|
||||||
|
|
||||||
|
memcpy(destinationBuffer, &_flat, sizeof(_flat));
|
||||||
|
destinationBuffer += sizeof(_flat);
|
||||||
|
|
||||||
memcpy(destinationBuffer, &_gravity, sizeof(_gravity));
|
memcpy(destinationBuffer, &_gravity, sizeof(_gravity));
|
||||||
destinationBuffer += sizeof(_gravity);
|
destinationBuffer += sizeof(_gravity);
|
||||||
|
|
||||||
|
@ -67,6 +79,9 @@ int EnvironmentData::parseData(const unsigned char* sourceBuffer, int numBytes)
|
||||||
memcpy(&_id, sourceBuffer, sizeof(_id));
|
memcpy(&_id, sourceBuffer, sizeof(_id));
|
||||||
sourceBuffer += sizeof(_id);
|
sourceBuffer += sizeof(_id);
|
||||||
|
|
||||||
|
memcpy(&_flat, sourceBuffer, sizeof(_flat));
|
||||||
|
sourceBuffer += sizeof(_flat);
|
||||||
|
|
||||||
memcpy(&_gravity, sourceBuffer, sizeof(_gravity));
|
memcpy(&_gravity, sourceBuffer, sizeof(_gravity));
|
||||||
sourceBuffer += sizeof(_gravity);
|
sourceBuffer += sizeof(_gravity);
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,9 @@ public:
|
||||||
void setID(int id) { _id = id; }
|
void setID(int id) { _id = id; }
|
||||||
int getID() const { return _id; }
|
int getID() const { return _id; }
|
||||||
|
|
||||||
|
void setFlat(bool flat) { _flat = flat; }
|
||||||
|
bool isFlat() const { return _flat; }
|
||||||
|
|
||||||
void setGravity(float gravity) { _gravity = gravity; }
|
void setGravity(float gravity) { _gravity = gravity; }
|
||||||
float getGravity() const { return _gravity; }
|
float getGravity() const { return _gravity; }
|
||||||
|
|
||||||
|
@ -42,6 +45,9 @@ public:
|
||||||
const glm::vec3& getSunLocation() const { return _sunLocation; }
|
const glm::vec3& getSunLocation() const { return _sunLocation; }
|
||||||
float getSunBrightness() const { return _sunBrightness; }
|
float getSunBrightness() const { return _sunBrightness; }
|
||||||
|
|
||||||
|
glm::vec3 getAtmosphereCenter(const glm::vec3& cameraPosition) const;
|
||||||
|
glm::vec3 getSunLocation(const glm::vec3& cameraPosition) const;
|
||||||
|
|
||||||
int getBroadcastData(unsigned char* destinationBuffer) const;
|
int getBroadcastData(unsigned char* destinationBuffer) const;
|
||||||
int parseData(const unsigned char* sourceBuffer, int numBytes);
|
int parseData(const unsigned char* sourceBuffer, int numBytes);
|
||||||
|
|
||||||
|
@ -49,6 +55,8 @@ private:
|
||||||
|
|
||||||
int _id;
|
int _id;
|
||||||
|
|
||||||
|
bool _flat;
|
||||||
|
|
||||||
float _gravity;
|
float _gravity;
|
||||||
|
|
||||||
glm::vec3 _atmosphereCenter;
|
glm::vec3 _atmosphereCenter;
|
||||||
|
|
Loading…
Reference in a new issue