+ void add_name(const std::string& name) { _names.push_back(name); }
+
+ /**
+ * Get the number of randomly-placed objects defined for this material.
+ */
+ int get_object_group_count () const { return object_groups.size(); }
+
+ /**
+ * Get a randomly-placed object for this material.
+ */
+ SGMatModelGroup * get_object_group (int index) const {
+ return object_groups[index];
+ }
+
+ /**
+ * Return pointer to glyph class, or 0 if it doesn't exist.
+ */
+ SGMaterialGlyph * get_glyph (const std::string& name) const;
+
+ void set_light_color(const SGVec4f& color)
+ { emission = color; }
+ const SGVec4f& get_light_color() const
+ { return emission; }
+
+ SGVec2f get_tex_coord_scale() const
+ {
+ float tex_width = get_xsize();
+ float tex_height = get_ysize();
+
+ return SGVec2f((0 < tex_width) ? 1000.0f/tex_width : 1.0f,
+ (0 < tex_height) ? 1000.0f/tex_height : 1.0f);
+ }