From b5dd2b141640b2483cc290d99cdc2a0bf72be1b4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 22 Aug 2012 14:22:36 +0300 Subject: [PATCH] Add a shortcut constructor to Object --- source/object.cpp | 6 ++++++ source/object.h | 1 + 2 files changed, 7 insertions(+) diff --git a/source/object.cpp b/source/object.cpp index 5aec7e74..f23f6658 100644 --- a/source/object.cpp +++ b/source/object.cpp @@ -19,6 +19,12 @@ Object::Object(): meshes(1) { } +Object::Object(const Mesh *m, const Technique *t) +{ + set_mesh(m); + set_technique(t); +} + Object::~Object() { } diff --git a/source/object.h b/source/object.h index a574fb64..bd66e7ee 100644 --- a/source/object.h +++ b/source/object.h @@ -46,6 +46,7 @@ public: }; Object(); + Object(const Mesh *, const Technique *); ~Object(); void set_mesh(const Mesh *m) { set_mesh(0, m); } -- 2.45.2