mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Make Translation, Rotation, and Scaling available as Properties in SceneGraphNode
This commit is contained in:
@@ -25,14 +25,16 @@
|
||||
#ifndef __ROTATION_H__
|
||||
#define __ROTATION_H__
|
||||
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <openspace/util/updatestructures.h>
|
||||
#include <openspace/properties/propertyowner.h>
|
||||
|
||||
#include <openspace/documentation/documentation.h>
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
class Rotation {
|
||||
class Rotation : public properties::PropertyOwner {
|
||||
public:
|
||||
static Rotation* createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
|
||||
|
||||
@@ -101,13 +101,6 @@ public:
|
||||
const Renderable* renderable() const;
|
||||
Renderable* renderable();
|
||||
|
||||
// @TODO Remove once the scalegraph is in effect ---abock
|
||||
|
||||
void setEphemeris(Translation* eph) {
|
||||
delete _translation;
|
||||
_translation = eph;
|
||||
}
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
@@ -129,9 +122,11 @@ private:
|
||||
PowerScaledScalar _boundingSphere;
|
||||
|
||||
// Transformation defined by ephemeris, rotation and scale
|
||||
Translation* _translation;
|
||||
Rotation* _rotation;
|
||||
Scale* _scale;
|
||||
struct {
|
||||
std::unique_ptr<Translation> translation;
|
||||
std::unique_ptr<Rotation> rotation;
|
||||
std::unique_ptr<Scale> scale;
|
||||
} _transform;
|
||||
|
||||
// Cached transform data
|
||||
glm::dvec3 _worldPositionCached;
|
||||
|
||||
Reference in New Issue
Block a user