paysages3d/src/definition/CelestialBodyDefinition.h
2016-01-15 00:07:02 +01:00

46 lines
1 KiB
C++

#ifndef CELESTIALBODYDEFINITION_H
#define CELESTIALBODYDEFINITION_H
#include "definition_global.h"
#include "DefinitionNode.h"
namespace paysages {
namespace definition {
class DEFINITIONSHARED_EXPORT CelestialBodyDefinition : public DefinitionNode {
public:
CelestialBodyDefinition(DefinitionNode *parent, const string &name);
inline FloatNode *propDistance() const {
return distance;
}
inline FloatNode *propPhi() const {
return phi;
}
inline FloatNode *propTheta() const {
return theta;
}
inline FloatNode *propRadius() const {
return radius;
}
/**
* Get the location of the celestial body.
*
* If "over_water" is true, the location is given in standard coordinates with y=0.0 as water,
* otherwise in regard to the earth center.
*/
Vector3 getLocation(bool over_water = true) const;
private:
FloatNode *distance;
FloatNode *phi;
FloatNode *theta;
FloatNode *radius;
};
}
}
#endif // CELESTIALBODYDEFINITION_H