mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-19 19:39:30 -06:00
Updated comments in order to adhere to the repo line length standard
This commit is contained in:
@@ -86,7 +86,8 @@ namespace {
|
||||
constexpr openspace::properties::Property::PropertyInfo SweepChunkSizeInfo = {
|
||||
"SweepChunkSize",
|
||||
"Sweep Chunk Size",
|
||||
"The number of vertices that will be calculated each frame whenever the trail needs to be recalculated. "
|
||||
"The number of vertices that will be calculated each frame whenever the trail "
|
||||
"needs to be recalculated. "
|
||||
"A greater value will result in more calculations per frame."
|
||||
};
|
||||
|
||||
@@ -206,12 +207,18 @@ void RenderableTrailTrajectory::update(const UpdateData& data) {
|
||||
|
||||
_totalSampleInterval = _sampleInterval / _timeStampSubsamplingFactor;
|
||||
|
||||
// Cap _numberOfVertices in order to prevent overflow and extreme performance degredation/RAM usage
|
||||
_numberOfVertices = std::min(static_cast<unsigned int>(timespan / _totalSampleInterval), maxNumberOfVertices);
|
||||
// Cap _numberOfVertices in order to prevent overflow and extreme performance
|
||||
// degredation/RAM usage
|
||||
_numberOfVertices = std::min(
|
||||
static_cast<unsigned int>(timespan / _totalSampleInterval),
|
||||
maxNumberOfVertices
|
||||
);
|
||||
|
||||
// We need to recalcuate the _totalSampleInterval if _numberOfVertices eqals maxNumberOfVertices
|
||||
// If we don't do this the position for each vertex will not be correct for the number of vertices we are doing along the trail.
|
||||
_totalSampleInterval = (_numberOfVertices == maxNumberOfVertices) ? (timespan / _numberOfVertices) : _totalSampleInterval;
|
||||
// We need to recalcuate the _totalSampleInterval if _numberOfVertices eqals
|
||||
// maxNumberOfVertices. If we don't do this the position for each vertex
|
||||
// will not be correct for the number of vertices we are doing along the trail.
|
||||
_totalSampleInterval = (_numberOfVertices == maxNumberOfVertices) ?
|
||||
(timespan / _numberOfVertices) : _totalSampleInterval;
|
||||
|
||||
// Make space for the vertices
|
||||
_vertexArray.clear();
|
||||
@@ -243,7 +250,8 @@ void RenderableTrailTrajectory::update(const UpdateData& data) {
|
||||
setBoundingSphere(glm::distance(_maxVertex, _minVertex) / 2.f);
|
||||
}
|
||||
else {
|
||||
// Early return as we don't need to render if we are still doing full sweep calculations
|
||||
// Early return as we don't need to render if we are still
|
||||
// doing full sweep calculations
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ private:
|
||||
/// Reset some variables to default state
|
||||
void reset();
|
||||
|
||||
/// The number of vertices that we do calculations for during each frame of the full sweep pass
|
||||
/// The number of vertices that we calculate during each frame of the full sweep pass
|
||||
unsigned int _sweepChunkSize = 200;
|
||||
|
||||
/// The start time of the trail
|
||||
@@ -92,10 +92,11 @@ private:
|
||||
/// The conversion of the _endTime into the internal time format
|
||||
double _end = 0.0;
|
||||
|
||||
/// Keeps track of the sweep iteration and is used to calculate which vertices we work on each frame.
|
||||
/// Tracks sweep iteration, is used to calculate which vertices to work on per frame
|
||||
int _sweepIteration = 0;
|
||||
|
||||
/// How many values do we need to compute given the distance between the start and end date and the desired sample interval
|
||||
/// How many points do we need to compute given the distance between the
|
||||
/// start and end date and the desired sample interval
|
||||
unsigned int _numberOfVertices = 0;
|
||||
|
||||
double _totalSampleInterval = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user