mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 18:38:20 -05:00
Remove warnings on MacOS in Clang
This commit is contained in:
+14
-14
@@ -47,8 +47,8 @@ namespace openspace {
|
||||
const Camera::Vec3 Camera::_LOOKUP_VECTOR_CAMERA_SPACE = Camera::Vec3(0, 1, 0);
|
||||
|
||||
Camera::Camera()
|
||||
: _maxFov(0.f)
|
||||
, _focusPosition()
|
||||
: _focusPosition()
|
||||
, _maxFov(0.f)
|
||||
{
|
||||
|
||||
_scaling = glm::vec2(1.f, 0.f);
|
||||
@@ -59,16 +59,16 @@ namespace openspace {
|
||||
|
||||
Camera::Camera(const Camera& o)
|
||||
: sgctInternal(o.sgctInternal)
|
||||
, _focusPosition(o._focusPosition)
|
||||
, _cachedViewDirection(o._cachedViewDirection)
|
||||
, _cachedLookupVector(o._cachedLookupVector)
|
||||
, _position(o._position)
|
||||
, _rotation(o._rotation)
|
||||
, _scaling(o._scaling)
|
||||
, _focusPosition(o._focusPosition)
|
||||
, _maxFov(o._maxFov)
|
||||
{ }
|
||||
, _cachedViewDirection(o._cachedViewDirection)
|
||||
, _cachedLookupVector(o._cachedLookupVector)
|
||||
{}
|
||||
|
||||
Camera::~Camera() { }
|
||||
Camera::~Camera() {}
|
||||
|
||||
// Mutators
|
||||
void Camera::setPositionVec3(Vec3 pos) {
|
||||
@@ -110,7 +110,7 @@ namespace openspace {
|
||||
// Relative mutators
|
||||
void Camera::rotate(Quat rotation) {
|
||||
std::lock_guard<std::mutex> _lock(_mutex);
|
||||
_rotation = rotation * (glm::dquat)_rotation;
|
||||
_rotation = rotation * static_cast<glm::dquat>(_rotation);
|
||||
|
||||
_cachedViewDirection.isDirty = true;
|
||||
_cachedLookupVector.isDirty = true;
|
||||
@@ -134,7 +134,7 @@ namespace openspace {
|
||||
const Camera::Vec3& Camera::viewDirectionWorldSpace() const {
|
||||
if (_cachedViewDirection.isDirty) {
|
||||
_cachedViewDirection.datum =
|
||||
(glm::dquat)_rotation * Vec3(_VIEW_DIRECTION_CAMERA_SPACE);
|
||||
static_cast<glm::dquat>(_rotation) * Vec3(_VIEW_DIRECTION_CAMERA_SPACE);
|
||||
_cachedViewDirection.datum = glm::normalize(_cachedViewDirection.datum);
|
||||
_cachedViewDirection.isDirty = true;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ namespace openspace {
|
||||
const Camera::Vec3& Camera::lookUpVectorWorldSpace() const {
|
||||
if (_cachedLookupVector.isDirty) {
|
||||
_cachedLookupVector.datum =
|
||||
(glm::dquat)_rotation * Vec3(_LOOKUP_VECTOR_CAMERA_SPACE);
|
||||
static_cast<glm::dquat>(_rotation) * Vec3(_LOOKUP_VECTOR_CAMERA_SPACE);
|
||||
_cachedLookupVector.datum = glm::normalize(_cachedLookupVector.datum);
|
||||
_cachedLookupVector.isDirty = true;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ namespace openspace {
|
||||
|
||||
const Camera::Mat4& Camera::viewRotationMatrix() const {
|
||||
if (_cachedViewRotationMatrix.isDirty) {
|
||||
_cachedViewRotationMatrix.datum = glm::mat4_cast(glm::inverse((glm::dquat)_rotation));
|
||||
_cachedViewRotationMatrix.datum = glm::mat4_cast(glm::inverse(static_cast<glm::dquat>(_rotation)));
|
||||
}
|
||||
return _cachedViewRotationMatrix.datum;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ namespace openspace {
|
||||
const Camera::Mat4& Camera::combinedViewMatrix() const {
|
||||
if (_cachedCombinedViewMatrix.isDirty) {
|
||||
Mat4 cameraTranslation =
|
||||
glm::inverse(glm::translate(Mat4(1.0), (Vec3)_position));
|
||||
glm::inverse(glm::translate(Mat4(1.0), static_cast<Vec3>(_position)));
|
||||
_cachedCombinedViewMatrix.datum =
|
||||
Mat4(sgctInternal.viewMatrix()) *
|
||||
Mat4(viewRotationMatrix()) *
|
||||
@@ -274,11 +274,11 @@ namespace openspace {
|
||||
}
|
||||
|
||||
psc Camera::position() const {
|
||||
return psc((Vec3)_position);
|
||||
return psc(static_cast<Vec3>(_position));
|
||||
}
|
||||
|
||||
psc Camera::unsynchedPosition() const {
|
||||
return psc((Vec3)_position);
|
||||
return psc(static_cast<Vec3>(_position));
|
||||
}
|
||||
|
||||
psc Camera::focusPosition() const {
|
||||
|
||||
Reference in New Issue
Block a user