mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 00:44:43 -05:00
Cleanup for coding style
Add strict mode to check_style_guide script
This commit is contained in:
@@ -44,29 +44,29 @@ ToyVolumeRaycaster::ToyVolumeRaycaster(glm::vec4 color)
|
||||
: _boundingBox(glm::vec3(1.0))
|
||||
, _color(color)
|
||||
{}
|
||||
|
||||
|
||||
ToyVolumeRaycaster::~ToyVolumeRaycaster() {}
|
||||
|
||||
void ToyVolumeRaycaster::initialize() {
|
||||
_boundingBox.initialize();
|
||||
}
|
||||
|
||||
|
||||
void ToyVolumeRaycaster::deinitialize() {
|
||||
}
|
||||
|
||||
|
||||
void ToyVolumeRaycaster::renderEntryPoints(const RenderData& data, ghoul::opengl::ProgramObject& program) {
|
||||
program.setUniform("modelTransform", _modelTransform);
|
||||
program.setUniform("viewProjection", data.camera.viewProjectionMatrix());
|
||||
Renderable::setPscUniforms(program, data.camera, data.position);
|
||||
|
||||
|
||||
// Cull back face
|
||||
glEnable(GL_CULL_FACE);
|
||||
glCullFace(GL_BACK);
|
||||
|
||||
|
||||
// Render bounding geometry
|
||||
_boundingBox.render();
|
||||
}
|
||||
|
||||
|
||||
void ToyVolumeRaycaster::renderExitPoints(const RenderData& data, ghoul::opengl::ProgramObject& program) {
|
||||
// Uniforms
|
||||
program.setUniform("modelTransform", _modelTransform);
|
||||
@@ -76,14 +76,14 @@ void ToyVolumeRaycaster::renderExitPoints(const RenderData& data, ghoul::opengl:
|
||||
// Cull front face
|
||||
glEnable(GL_CULL_FACE);
|
||||
glCullFace(GL_FRONT);
|
||||
|
||||
|
||||
// Render bounding geometry
|
||||
_boundingBox.render();
|
||||
|
||||
|
||||
// Restore defaults
|
||||
glCullFace(GL_BACK);
|
||||
}
|
||||
|
||||
|
||||
void ToyVolumeRaycaster::preRaycast(const RaycastData& data, ghoul::opengl::ProgramObject& program) {
|
||||
std::string colorUniformName = "color" + std::to_string(data.id);
|
||||
std::string timeUniformName = "time" + std::to_string(data.id);
|
||||
@@ -92,15 +92,15 @@ void ToyVolumeRaycaster::preRaycast(const RaycastData& data, ghoul::opengl::Prog
|
||||
program.setUniform(stepSizeUniformName, _stepSize);
|
||||
program.setUniform(timeUniformName, static_cast<float>(std::fmod(_time, 3600.0)));
|
||||
}
|
||||
|
||||
|
||||
void ToyVolumeRaycaster::postRaycast(const RaycastData&, ghoul::opengl::ProgramObject&) {
|
||||
// For example: release texture units
|
||||
}
|
||||
|
||||
|
||||
std::string ToyVolumeRaycaster::getBoundsVsPath() const {
|
||||
return GlslBoundsVsPath;
|
||||
}
|
||||
|
||||
|
||||
std::string ToyVolumeRaycaster::getBoundsFsPath() const {
|
||||
return GlslBoundsFsPath;
|
||||
}
|
||||
@@ -124,9 +124,9 @@ void ToyVolumeRaycaster::setModelTransform(glm::mat4 transform) {
|
||||
void ToyVolumeRaycaster::setTime(double time) {
|
||||
_time = time;
|
||||
}
|
||||
|
||||
|
||||
void ToyVolumeRaycaster::setStepSize(float stepSize) {
|
||||
_stepSize = stepSize;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user