3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_OBJETCINSTANCE_H_
9 #define MSP_GL_OBJETCINSTANCE_H_
22 Represents a single instance of an Object. An application can derive another
23 class from this and overload the hook functions to specify location and other
24 instance-specific parameters for the rendered objects.
32 ObjectInstance(const Object &);
34 const Object &get_object() const { return object; }
37 void render(const std::string &) const;
40 Hook function, called from Object just before rendering the mesh.
42 virtual void setup_render(const ObjectPass &) const { }
45 Hook function, called from Object right after rendering the mesh.
47 virtual void finish_render(const ObjectPass &) const { }
49 virtual unsigned get_level_of_detail() const { return 0; }