mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-07 03:59:31 -06:00
Fixed Visual Studio assert error
- Visual studio optimized away the assert expression causing the getvalue statement not to be called
This commit is contained in:
@@ -54,9 +54,12 @@ namespace openspace{
|
||||
, _iBufferID(0)
|
||||
, _mode(GL_LINE_STRIP){
|
||||
|
||||
assert(dictionary.getValue(keyBody , _target));
|
||||
assert(dictionary.getValue(keyObserver , _observer));
|
||||
assert(dictionary.getValue(keyFrame , _frame));
|
||||
bool b1 = dictionary.getValue(keyBody, _target);
|
||||
bool b2 = dictionary.getValue(keyObserver, _observer);
|
||||
bool b3 = dictionary.getValue(keyFrame, _frame);
|
||||
assert(b1 == true);
|
||||
assert(b2 == true);
|
||||
assert(b3 == true);
|
||||
|
||||
if (!dictionary.getValue(keyColor, _c)){
|
||||
_c = glm::vec3(0.0);
|
||||
|
||||
@@ -55,9 +55,12 @@ namespace openspace{
|
||||
, _iBufferID(0)
|
||||
, _mode(GL_LINE_STRIP){
|
||||
|
||||
assert(dictionary.getValue(keyBody, _target));
|
||||
assert(dictionary.getValue(keyObserver, _observer));
|
||||
assert(dictionary.getValue(keyFrame, _frame));
|
||||
bool b1 = dictionary.getValue(keyBody, _target);
|
||||
bool b2 = dictionary.getValue(keyObserver, _observer);
|
||||
bool b3 = dictionary.getValue(keyFrame, _frame);
|
||||
assert(b1 == true);
|
||||
assert(b2 == true);
|
||||
assert(b3 == true);
|
||||
/*assert(dictionary.getValue(keyTropicalOrbitPeriod, _tropic));
|
||||
assert(dictionary.getValue(keyEarthOrbitRatio, _ratio));
|
||||
assert(dictionary.getValue(keyDayLength, _day));//not used now, will be though.
|
||||
|
||||
@@ -59,12 +59,26 @@ namespace openspace{
|
||||
, _iBufferID(0)
|
||||
, _mode(GL_LINE_STRIP){
|
||||
|
||||
assert(dictionary.getValue(keyBody , _target));
|
||||
assert(dictionary.getValue(keyObserver , _observer));
|
||||
assert(dictionary.getValue(keyFrame , _frame));
|
||||
assert(dictionary.getValue(keyTropicalOrbitPeriod, _tropic));
|
||||
assert(dictionary.getValue(keyEarthOrbitRatio , _ratio));
|
||||
assert(dictionary.getValue(keyDayLength , _day));//not used now, will be though.
|
||||
bool b1 = dictionary.getValue(keyBody, _target);
|
||||
bool b2 = dictionary.getValue(keyObserver, _observer);
|
||||
bool b3 = dictionary.getValue(keyFrame, _frame);
|
||||
bool b4 = dictionary.getValue(keyTropicalOrbitPeriod, _tropic);
|
||||
bool b5 = dictionary.getValue(keyEarthOrbitRatio, _ratio);
|
||||
bool b6 = dictionary.getValue(keyDayLength, _day);
|
||||
|
||||
assert(b1 == true);
|
||||
assert(b2 == true);
|
||||
assert(b3 == true);
|
||||
assert(b4 == true);
|
||||
assert(b5 == true);
|
||||
assert(b6 == true);
|
||||
|
||||
//assert(dictionary.getValue(keyBody , _target));
|
||||
//assert(dictionary.getValue(keyObserver, _observer));
|
||||
//assert(dictionary.getValue(keyFrame , _frame));
|
||||
//assert(dictionary.getValue(keyTropicalOrbitPeriod, _tropic));
|
||||
//assert(dictionary.getValue(keyEarthOrbitRatio , _ratio));
|
||||
//assert(dictionary.getValue(keyDayLength , _day));//not used now, will be though.
|
||||
// values in modfiles set from here
|
||||
// http://nssdc.gsfc.nasa.gov/planetary/factsheet/marsfact.html
|
||||
|
||||
|
||||
@@ -353,10 +353,14 @@ bool SpiceManager::getTargetState(const std::string& target,
|
||||
spkezr_c(target.c_str(), ephemerisTime, referenceFrame.c_str(),
|
||||
aberrationCorrection.c_str(), observer.c_str(), state, &lightTime);
|
||||
|
||||
position = PowerScaledCoordinate::CreatePowerScaledCoordinate(state[0], state[1], state[2]);
|
||||
velocity = PowerScaledCoordinate::CreatePowerScaledCoordinate(state[3], state[4], state[5]);
|
||||
bool hasError = checkForError("Error getting position for '" +
|
||||
target + "' with observer '" + observer + "'");
|
||||
|
||||
return true;
|
||||
if (!hasError) {
|
||||
position = PowerScaledCoordinate::CreatePowerScaledCoordinate(state[0], state[1], state[2]);
|
||||
velocity = PowerScaledCoordinate::CreatePowerScaledCoordinate(state[3], state[4], state[5]);
|
||||
}
|
||||
return !hasError;
|
||||
}
|
||||
|
||||
bool SpiceManager::getStateTransformMatrix(const std::string& fromFrame,
|
||||
|
||||
Reference in New Issue
Block a user