mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 11:18:22 -05:00
Code cleanup branch (#618)
* Make height map fallback layer work again * Add documentation to joystick button bindings * Removed grouped property headers * Add new version number constant generated by CMake * Make Joystick deadzone work properly * Change the startup date on Earth to today * Fix key modifier handling * Add debugging indices for TreeNodeDebugging * Fix script schedule for OsirisRex * Do not open Mission schedule automatically * Upload default projection texture automatically * General code cleanup * Fix check_style_guide warnings * Remove .clang-format * MacOS compile fixes * Clang analyzer fixes
This commit is contained in:
@@ -62,150 +62,150 @@ private:
|
||||
};
|
||||
|
||||
// ------------------------------------ STRINGS ------------------------------------//
|
||||
std::string _identifier; // Name of the Node!
|
||||
std::string _identifier; // Name of the Node!
|
||||
|
||||
// ------------------------------------- FLAGS -------------------------------------//
|
||||
// Used for 'runtime-states'. True when loading a new state from disk on another
|
||||
// thread.
|
||||
std::atomic<bool> _isLoadingStateFromDisk { false};
|
||||
std::atomic_bool _isLoadingStateFromDisk = false;
|
||||
// False => states are stored in RAM (using 'in-RAM-states'), True => states are
|
||||
// loaded from disk during runtime (using 'runtime-states')
|
||||
bool _loadingStatesDynamically = false;
|
||||
bool _loadingStatesDynamically = false;
|
||||
// Used for 'runtime-states': True if new 'runtime-state' must be loaded from disk.
|
||||
// False => the previous frame's state should still be shown
|
||||
bool _mustLoadNewStateFromDisk = false;
|
||||
bool _mustLoadNewStateFromDisk = false;
|
||||
// Used for 'in-RAM-states' : True if new 'in-RAM-state' must be loaded.
|
||||
// False => the previous frame's state should still be shown
|
||||
bool _needsUpdate = false;
|
||||
bool _needsUpdate = false;
|
||||
// Used for 'runtime-states'. True when finished loading a new state from disk on
|
||||
// another thread.
|
||||
std::atomic<bool> _newStateIsReady = false;
|
||||
std::atomic_bool _newStateIsReady = false;
|
||||
// True when new state is loaded or user change which quantity to color the lines by
|
||||
bool _shouldUpdateColorBuffer = false;
|
||||
bool _shouldUpdateColorBuffer = false;
|
||||
// True when new state is loaded or user change which quantity used for masking out
|
||||
// line segments
|
||||
bool _shouldUpdateMaskingBuffer = false;
|
||||
bool _shouldUpdateMaskingBuffer = false;
|
||||
|
||||
// --------------------------------- NUMERICALS ----------------------------------- //
|
||||
// Active index of _states. If(==-1)=>no state available for current time. Always the
|
||||
// same as _activeTriggerTimeIndex if(_loadingStatesDynamically==true), else
|
||||
// always = 0
|
||||
int _activeStateIndex = -1;
|
||||
int _activeStateIndex = -1;
|
||||
// Active index of _startTimes
|
||||
int _activeTriggerTimeIndex = -1;
|
||||
int _activeTriggerTimeIndex = -1;
|
||||
// Number of states in the sequence
|
||||
size_t _nStates = 0;
|
||||
size_t _nStates = 0;
|
||||
// In setup it is used to scale JSON coordinates. During runtime it is used to scale
|
||||
// domain limits.
|
||||
float _scalingFactor = 1.f;
|
||||
float _scalingFactor = 1.f;
|
||||
// Estimated end of sequence.
|
||||
double _sequenceEndTime;
|
||||
double _sequenceEndTime;
|
||||
// OpenGL Vertex Array Object
|
||||
GLuint _vertexArrayObject = 0;
|
||||
GLuint _vertexArrayObject = 0;
|
||||
// OpenGL Vertex Buffer Object containing the extraQuantity values used for coloring
|
||||
// the lines
|
||||
GLuint _vertexColorBuffer = 0;
|
||||
GLuint _vertexColorBuffer = 0;
|
||||
// OpenGL Vertex Buffer Object containing the extraQuantity values used for masking
|
||||
// out segments of the lines
|
||||
GLuint _vertexMaskingBuffer = 0;
|
||||
GLuint _vertexMaskingBuffer = 0;
|
||||
// OpenGL Vertex Buffer Object containing the vertex positions
|
||||
GLuint _vertexPositionBuffer = 0;
|
||||
GLuint _vertexPositionBuffer = 0;
|
||||
|
||||
// ----------------------------------- POINTERS ------------------------------------//
|
||||
// The Lua-Modfile-Dictionary used during initialization
|
||||
std::unique_ptr<ghoul::Dictionary> _dictionary;
|
||||
std::unique_ptr<ghoul::Dictionary> _dictionary;
|
||||
// Used for 'runtime-states' when switching out current state to a new state
|
||||
std::unique_ptr<FieldlinesState> _newState;
|
||||
std::unique_ptr<FieldlinesState> _newState;
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _shaderProgram;
|
||||
// Transfer function used to color lines when _pColorMethod is set to BY_QUANTITY
|
||||
std::unique_ptr<TransferFunction> _transferFunction;
|
||||
std::unique_ptr<TransferFunction> _transferFunction;
|
||||
|
||||
// ------------------------------------ VECTORS ----------------------------------- //
|
||||
// Paths to color tables. One for each 'extraQuantity'
|
||||
std::vector<std::string> _colorTablePaths;
|
||||
std::vector<std::string> _colorTablePaths;
|
||||
// Values represents min & max values represented in the color table
|
||||
std::vector<glm::vec2> _colorTableRanges;
|
||||
std::vector<glm::vec2> _colorTableRanges;
|
||||
// Values represents min & max limits for valid masking range
|
||||
std::vector<glm::vec2> _maskingRanges;
|
||||
std::vector<glm::vec2> _maskingRanges;
|
||||
// Stores the provided source file paths if using 'runtime-states', else emptied after
|
||||
// initialization
|
||||
std::vector<std::string> _sourceFiles;
|
||||
std::vector<std::string> _sourceFiles;
|
||||
// Contains the _triggerTimes for all FieldlineStates in the sequence
|
||||
std::vector<double> _startTimes;
|
||||
std::vector<double> _startTimes;
|
||||
// Stores the FieldlineStates
|
||||
std::vector<FieldlinesState> _states;
|
||||
|
||||
// ---------------------------------- Properties ---------------------------------- //
|
||||
// Group to hold the color properties
|
||||
properties::PropertyOwner _pColorGroup;
|
||||
properties::PropertyOwner _pColorGroup;
|
||||
// Uniform/transfer function/topology?
|
||||
properties::OptionProperty _pColorMethod;
|
||||
properties::OptionProperty _pColorMethod;
|
||||
// Index of the extra quantity to color lines by
|
||||
properties::OptionProperty _pColorQuantity;
|
||||
properties::OptionProperty _pColorQuantity;
|
||||
// Color table/transfer function min
|
||||
properties::StringProperty _pColorQuantityMin;
|
||||
properties::StringProperty _pColorQuantityMin;
|
||||
// Color table/transfer function max
|
||||
properties::StringProperty _pColorQuantityMax;
|
||||
properties::StringProperty _pColorQuantityMax;
|
||||
// Color table/transfer function for "By Quantity" coloring
|
||||
properties::StringProperty _pColorTablePath;
|
||||
properties::StringProperty _pColorTablePath;
|
||||
// Uniform Field Line Color
|
||||
properties::Vec4Property _pColorUniform;
|
||||
properties::Vec4Property _pColorUniform;
|
||||
// Whether or not to use additive blending
|
||||
properties::BoolProperty _pColorABlendEnabled;
|
||||
properties::BoolProperty _pColorABlendEnabled;
|
||||
|
||||
// Whether or not to use Domain
|
||||
properties::BoolProperty _pDomainEnabled;
|
||||
properties::BoolProperty _pDomainEnabled;
|
||||
// Group to hold the Domain properties
|
||||
properties::PropertyOwner _pDomainGroup;
|
||||
properties::PropertyOwner _pDomainGroup;
|
||||
// Domain Limits along x-axis
|
||||
properties::Vec2Property _pDomainX;
|
||||
properties::Vec2Property _pDomainX;
|
||||
// Domain Limits along y-axis
|
||||
properties::Vec2Property _pDomainY;
|
||||
properties::Vec2Property _pDomainY;
|
||||
// Domain Limits along z-axis
|
||||
properties::Vec2Property _pDomainZ;
|
||||
properties::Vec2Property _pDomainZ;
|
||||
// Domain Limits radially
|
||||
properties::Vec2Property _pDomainR;
|
||||
properties::Vec2Property _pDomainR;
|
||||
|
||||
// Simulated particles' color
|
||||
properties::Vec4Property _pFlowColor;
|
||||
properties::Vec4Property _pFlowColor;
|
||||
// Toggle flow [ON/OFF]
|
||||
properties::BoolProperty _pFlowEnabled;
|
||||
properties::BoolProperty _pFlowEnabled;
|
||||
// Group to hold the flow/particle properties
|
||||
properties::PropertyOwner _pFlowGroup;
|
||||
properties::PropertyOwner _pFlowGroup;
|
||||
// Size of simulated flow particles
|
||||
properties::IntProperty _pFlowParticleSize;
|
||||
properties::IntProperty _pFlowParticleSize;
|
||||
// Size of simulated flow particles
|
||||
properties::IntProperty _pFlowParticleSpacing;
|
||||
properties::IntProperty _pFlowParticleSpacing;
|
||||
// Toggle flow direction [FORWARDS/BACKWARDS]
|
||||
properties::BoolProperty _pFlowReversed;
|
||||
properties::BoolProperty _pFlowReversed;
|
||||
// Speed of simulated flow
|
||||
properties::IntProperty _pFlowSpeed;
|
||||
properties::IntProperty _pFlowSpeed;
|
||||
|
||||
// Whether or not to use masking
|
||||
properties::BoolProperty _pMaskingEnabled;
|
||||
// Whether or not to use masking
|
||||
properties::BoolProperty _pMaskingEnabled;
|
||||
// Group to hold the masking properties
|
||||
properties::PropertyOwner _pMaskingGroup;
|
||||
properties::PropertyOwner _pMaskingGroup;
|
||||
// Lower limit for allowed values
|
||||
properties::StringProperty _pMaskingMin;
|
||||
properties::StringProperty _pMaskingMin;
|
||||
// Upper limit for allowed values
|
||||
properties::StringProperty _pMaskingMax;
|
||||
properties::StringProperty _pMaskingMax;
|
||||
// Index of the extra quantity to use for masking
|
||||
properties::OptionProperty _pMaskingQuantity;
|
||||
properties::OptionProperty _pMaskingQuantity;
|
||||
|
||||
// Button which sets camera focus to parent node of the renderable
|
||||
properties::TriggerProperty _pFocusOnOriginBtn;
|
||||
properties::TriggerProperty _pFocusOnOriginBtn;
|
||||
// Button which executes a time jump to start of sequence
|
||||
properties::TriggerProperty _pJumpToStartBtn;
|
||||
properties::TriggerProperty _pJumpToStartBtn;
|
||||
|
||||
// --------------------- FUNCTIONS USED DURING INITIALIZATION --------------------- //
|
||||
void addStateToSequence(FieldlinesState& STATE);
|
||||
void computeSequenceEndTime();
|
||||
void definePropertyCallbackFunctions();
|
||||
bool extractCdfInfoFromDictionary(std::string& seedFilePath, std::string& tracingVar,
|
||||
std::vector<std::string>& extraVars);
|
||||
std::vector<std::string>& extraVars);
|
||||
bool extractJsonInfoFromDictionary(fls::Model& model);
|
||||
void extractMagnitudeVarsFromStrings(std::vector<std::string>& extraVars,
|
||||
std::vector<std::string>& extraMagVars);
|
||||
std::vector<std::string>& extraMagVars);
|
||||
bool extractMandatoryInfoFromDictionary(SourceFileType& sourceFileType);
|
||||
void extractOptionalInfoFromDictionary(std::string& outputFolderPath);
|
||||
void extractOsflsInfoFromDictionary();
|
||||
|
||||
Reference in New Issue
Block a user