mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
More coding style fixes
This commit is contained in:
@@ -111,7 +111,7 @@ documentation::Documentation RenderableSphericalGrid::Documentation() {
|
||||
}
|
||||
|
||||
|
||||
RenderableSphericalGrid::RenderableSphericalGrid(const ghoul::Dictionary& dictionary)
|
||||
RenderableSphericalGrid::RenderableSphericalGrid(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
, _gridProgram(nullptr)
|
||||
, _gridMatrix(GridMatrixInfo, glm::mat4(1.f))
|
||||
@@ -254,7 +254,7 @@ void RenderableSphericalGrid::update(const UpdateData&) {
|
||||
// inclination angle (north to south)
|
||||
const float theta = fi * glm::pi<float>() / fsegments * 2.f; // 0 -> PI
|
||||
|
||||
// azimuth angle (east to west)
|
||||
// azimuth angle (east to west)
|
||||
const float phi = fj * glm::pi<float>() * 2.0f / fsegments; // 0 -> 2*PI
|
||||
|
||||
const float x = r * sin(phi) * sin(theta); //
|
||||
@@ -266,7 +266,11 @@ void RenderableSphericalGrid::update(const UpdateData&) {
|
||||
normal = glm::normalize(normal);
|
||||
|
||||
glm::vec4 tmp(x, y, z, 1);
|
||||
glm::mat4 rot = glm::rotate(glm::mat4(1), glm::half_pi<float>(), glm::vec3(1, 0, 0));
|
||||
glm::mat4 rot = glm::rotate(
|
||||
glm::mat4(1),
|
||||
glm::half_pi<float>(),
|
||||
glm::vec3(1, 0, 0)
|
||||
);
|
||||
tmp = glm::vec4(_gridMatrix.value() * glm::dmat4(rot) * glm::dvec4(tmp));
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
@@ -290,7 +294,12 @@ void RenderableSphericalGrid::update(const UpdateData&) {
|
||||
|
||||
glBindVertexArray(_vaoID);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _vBufferID);
|
||||
glBufferData(GL_ARRAY_BUFFER, _vsize * sizeof(Vertex), _varray.data(), GL_STATIC_DRAW);
|
||||
glBufferData(
|
||||
GL_ARRAY_BUFFER,
|
||||
_vsize * sizeof(Vertex),
|
||||
_varray.data(),
|
||||
GL_STATIC_DRAW
|
||||
);
|
||||
|
||||
glVertexAttribPointer(
|
||||
0,
|
||||
@@ -302,7 +311,12 @@ void RenderableSphericalGrid::update(const UpdateData&) {
|
||||
);
|
||||
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _iBufferID);
|
||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, _isize * sizeof(int), _iarray.data(), GL_STATIC_DRAW);
|
||||
glBufferData(
|
||||
GL_ELEMENT_ARRAY_BUFFER,
|
||||
_isize * sizeof(int),
|
||||
_iarray.data(),
|
||||
GL_STATIC_DRAW
|
||||
);
|
||||
|
||||
_gridIsDirty = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user