mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-23 05:19:18 -06:00
Some small cleanup
Remove virtual attribute from some of the raycaster functions
This commit is contained in:
@@ -21,7 +21,7 @@ local MilkyWayVolumeGalaxy = {
|
||||
-- The center of the Milky Way is approximately 8 kiloparsec from the Sun.
|
||||
-- The x-axis of galactic coordinates points from the sun towards the center
|
||||
-- of the galaxy.
|
||||
Position = {8 * kiloparsec, 0, 0}
|
||||
Position = { 8 * kiloparsec, 0, 0 }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
@@ -29,12 +29,12 @@ local MilkyWayVolumeGalaxy = {
|
||||
StepSize = 0.01,
|
||||
AbsorptionMultiply = 200,
|
||||
EmissionMultiply = 250,
|
||||
Rotation = {3.1415926, 3.1248, 4.45741},
|
||||
Rotation = { 3.1415926, 3.1248, 4.45741 },
|
||||
Volume = {
|
||||
Type = "Volume",
|
||||
Filename = data .. "/MilkyWayRGBAVolume1024x1024x128.raw",
|
||||
Dimensions = {1024, 1024, 128},
|
||||
Size = {1.2E21, 1.2E21, 0.15E21},
|
||||
Dimensions = { 1024, 1024, 128 },
|
||||
Size = { 1.2E21, 1.2E21, 0.15E21 },
|
||||
Downscale = 0.4,
|
||||
},
|
||||
Points = {
|
||||
|
||||
@@ -129,13 +129,13 @@ public:
|
||||
*/
|
||||
virtual std::string helperPath() const = 0;
|
||||
|
||||
virtual void setMaxSteps(int nsteps) { _rayCastMaxSteps = nsteps; };
|
||||
void setMaxSteps(int nsteps);
|
||||
|
||||
virtual const int maxSteps() const { return _rayCastMaxSteps; };
|
||||
int maxSteps() const;
|
||||
|
||||
virtual void setDownscaleRender(float value) { _downscaleRenderConst = value; };
|
||||
void setDownscaleRender(float value);
|
||||
|
||||
virtual const float downscaleRender() const { return _downscaleRenderConst; };
|
||||
float downscaleRender() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
||||
@@ -245,8 +245,7 @@ namespace openspace {
|
||||
);
|
||||
}
|
||||
else {
|
||||
LINFO("Number of raycasting steps not specified for Milkway Galaxy."
|
||||
" Using default value.");
|
||||
LINFO("Number of raycasting steps not specified. Using default value.");
|
||||
}
|
||||
|
||||
_downScaleVolumeRendering.setVisibility(
|
||||
@@ -254,7 +253,7 @@ namespace openspace {
|
||||
);
|
||||
if (volumeDictionary.hasKey(DownscaleVolumeRenderingInfo.identifier)) {
|
||||
_downScaleVolumeRendering =
|
||||
volumeDictionary.value<float>(DownscaleVolumeRenderingInfo.identifier);
|
||||
volumeDictionary.value<float>(DownscaleVolumeRenderingInfo.identifier);
|
||||
}
|
||||
|
||||
if (!dictionary.hasKeyAndValue<ghoul::Dictionary>("Points")) {
|
||||
|
||||
@@ -1271,14 +1271,12 @@ void FramebufferRenderer::performRaycasterTasks(const std::vector<RaycasterTask>
|
||||
glViewport(0, 0, _resolution.x, _resolution.y);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, _gBuffers.framebuffer);
|
||||
writeDownscaledVolume();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FramebufferRenderer::performDeferredTasks(
|
||||
const std::vector<DeferredcasterTask>& tasks
|
||||
)
|
||||
const std::vector<DeferredcasterTask>& tasks)
|
||||
{
|
||||
for (const DeferredcasterTask& deferredcasterTask : tasks) {
|
||||
Deferredcaster* deferredcaster = deferredcasterTask.deferredcaster;
|
||||
|
||||
@@ -33,4 +33,20 @@ bool VolumeRaycaster::isCameraInside(const RenderData&, glm::vec3&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void VolumeRaycaster::setMaxSteps(int nsteps) {
|
||||
_rayCastMaxSteps = nsteps;
|
||||
}
|
||||
|
||||
int VolumeRaycaster::maxSteps() const {
|
||||
return _rayCastMaxSteps;
|
||||
}
|
||||
|
||||
void VolumeRaycaster::setDownscaleRender(float value) {
|
||||
_downscaleRenderConst = value;
|
||||
}
|
||||
|
||||
float VolumeRaycaster::downscaleRender() const {
|
||||
return _downscaleRenderConst;
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user