diff options
author | Marius Kintel <marius@kintel.net> | 2012-01-04 22:07:32 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-01-04 22:07:32 (GMT) |
commit | fdce8d15fc4a927d1a6a257783dde5054d9f3e7b (patch) | |
tree | 6a779b50ef65474af9c539ad7d42268f7e760ae8 /src/state.h | |
parent | cbabbaed700536b3a1f513fd5a07d25382cb137f (diff) | |
parent | ba8aa515d14cf270c9d0fdf50b4c7c55b3c416a8 (diff) |
Merge branch 'master' into boost_filesystem
Conflicts:
boost.pri
src/lexer.l
tests/CMakeLists.txt
Diffstat (limited to 'src/state.h')
-rw-r--r-- | src/state.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/state.h b/src/state.h index 5dc74df..df202aa 100644 --- a/src/state.h +++ b/src/state.h @@ -9,8 +9,8 @@ class State public: State(const class AbstractNode *parent) : parentnode(parent), isprefix(false), ispostfix(false), numchildren(0) { - m = Transform3d::Identity(); - for (int i=0;i<4;i++) this->c[i] = -1.0; + this->matrix_ = Transform3d::Identity(); + this->color_.fill(-1.0f); } virtual ~State() {} @@ -18,15 +18,15 @@ public: void setPostfix(bool on) { this->ispostfix = on; } void setNumChildren(unsigned int numc) { this->numchildren = numc; } void setParent(const AbstractNode *parent) { this->parentnode = parent; } - void setMatrix(const Transform3d &m) { this->m = m; } - void setColor(const double c[4]) { memcpy(this->c, c, 4*sizeof(double)); } + void setMatrix(const Transform3d &m) { this->matrix_ = m; } + void setColor(const Color4f &c) { this->color_ = c; } bool isPrefix() const { return this->isprefix; } bool isPostfix() const { return this->ispostfix; } unsigned int numChildren() const { return this->numchildren; } const AbstractNode *parent() const { return this->parentnode; } - const Transform3d &matrix() const { return this->m; } - const double *color() const { return this->c; } + const Transform3d &matrix() const { return this->matrix_; } + const Color4f &color() const { return this->color_; } private: const AbstractNode * parentnode; @@ -35,8 +35,8 @@ private: unsigned int numchildren; // Transformation matrix and color. FIXME: Generalize such state variables? - Transform3d m; - double c[4]; + Transform3d matrix_; + Color4f color_; }; #endif |