]> git.localhorst.tv Git - blank.git/blobdiff - src/model/model.cpp
some annotations
[blank.git] / src / model / model.cpp
index 55050e0b72d856ce57894787705c0630cbc981a3..db44cbf21c0e351c757dcb484027c93dedd81672 100644 (file)
@@ -27,6 +27,22 @@ Instance::~Instance() {
 
 }
 
+Part::State &Instance::BodyState() noexcept {
+       return state[model->GetBodyPart().ID()];
+}
+
+glm::mat4 Instance::BodyTransform() const noexcept {
+       return model->GetBodyPart().GlobalTransform(*this);
+}
+
+Part::State &Instance::EyesState() noexcept {
+       return state[model->GetEyesPart().ID()];
+}
+
+glm::mat4 Instance::EyesTransform() const noexcept {
+       return model->GetEyesPart().GlobalTransform(*this);
+}
+
 void Instance::Render(const glm::mat4 &M, DirectionalLighting &prog) {
        model->RootPart().Render(M, *this, prog);
 }
@@ -35,7 +51,9 @@ void Instance::Render(const glm::mat4 &M, DirectionalLighting &prog) {
 Model::Model()
 : id(0)
 , root()
-, part() {
+, part()
+, body_id(0)
+, eyes_id(0) {
 
 }