mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 04:20:14 -05:00
Start addressing PR comments
This commit is contained in:
@@ -708,7 +708,7 @@ void RenderableBillboardsCloud::render(const RenderData& data, RendererTasks&) {
|
||||
glm::cross(cameraUpDirectionWorld, cameraViewDirectionWorld)
|
||||
);
|
||||
if (orthoRight == glm::dvec3(0.0)) {
|
||||
glm::dvec3 otherVector(
|
||||
glm::dvec3 otherVector = glm::vec3(
|
||||
cameraUpDirectionWorld.y,
|
||||
cameraUpDirectionWorld.x,
|
||||
cameraUpDirectionWorld.z
|
||||
|
||||
@@ -135,8 +135,8 @@ private:
|
||||
speck::Dataset _dataset;
|
||||
speck::ColorMap _colorMap;
|
||||
|
||||
// Everything related to the labels are handled by LabelsComponent
|
||||
std::unique_ptr<LabelsComponent> _labels = nullptr;
|
||||
// Everything related to the labels is handled by LabelsComponent
|
||||
std::unique_ptr<LabelsComponent> _labels;
|
||||
|
||||
std::vector<glm::vec2> _colorRangeData;
|
||||
std::unordered_map<int, std::string> _optionConversionMap;
|
||||
|
||||
@@ -440,23 +440,24 @@ void RenderablePlanesCloud::render(const RenderData& data, RendererTasks&) {
|
||||
|
||||
const glm::dmat4 modelViewMatrix = data.camera.combinedViewMatrix() * modelMatrix;
|
||||
const glm::mat4 projectionMatrix = data.camera.projectionMatrix();
|
||||
const glm::dmat4 mvpMatrix = glm::dmat4(projectionMatrix) * modelViewMatrix;
|
||||
|
||||
const glm::dmat4 invMVPParts = glm::inverse(modelMatrix) *
|
||||
glm::inverse(data.camera.combinedViewMatrix()) *
|
||||
glm::inverse(glm::dmat4(projectionMatrix));
|
||||
const glm::dvec3 orthoRight = glm::normalize(
|
||||
glm::dvec3(invMVPParts * glm::dvec4(1.0, 0.0, 0.0, 0.0))
|
||||
);
|
||||
const glm::dvec3 orthoUp = glm::normalize(
|
||||
glm::dvec3(invMVPParts * glm::dvec4(0.0, 1.0, 0.0, 0.0))
|
||||
);
|
||||
|
||||
if (_hasSpeckFile) {
|
||||
renderPlanes(data, modelViewMatrix, projectionMatrix, fadeInVariable);
|
||||
}
|
||||
|
||||
if (_hasLabels) {
|
||||
const glm::dmat4 mvpMatrix = glm::dmat4(projectionMatrix) * modelViewMatrix;
|
||||
|
||||
const glm::dmat4 invMVPParts = glm::inverse(modelMatrix) *
|
||||
glm::inverse(data.camera.combinedViewMatrix()) *
|
||||
glm::inverse(glm::dmat4(projectionMatrix));
|
||||
const glm::dvec3 orthoRight = glm::normalize(
|
||||
glm::dvec3(invMVPParts * glm::dvec4(1.0, 0.0, 0.0, 0.0))
|
||||
);
|
||||
const glm::dvec3 orthoUp = glm::normalize(
|
||||
glm::dvec3(invMVPParts * glm::dvec4(0.0, 1.0, 0.0, 0.0))
|
||||
);
|
||||
|
||||
_labels->render(data, mvpMatrix, orthoRight, orthoUp, fadeInVariable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,8 +114,8 @@ private:
|
||||
|
||||
speck::Dataset _dataset;
|
||||
|
||||
// Everything related to the labels are handled by LabelsComponent
|
||||
std::unique_ptr<LabelsComponent> _labels = nullptr;
|
||||
// Everything related to the labels is handled by LabelsComponent
|
||||
std::unique_ptr<LabelsComponent> _labels;
|
||||
|
||||
float _sluminosity = 1.f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user