38 #ifndef H_OGF_SCENE_GRAPH_TYPES_GROB_H
39 #define H_OGF_SCENE_GRAPH_TYPES_GROB_H
60 class InputGraphiteFile;
61 class OutputGraphiteFile;
67 gom_attribute(
abstract,
"true")
91 const std::string&
name()
const {
157 std::string& classname,
ArgList& properties,
bool pointers=
true
167 const std::string& classname,
const ArgList& properties
179 return grob_attributes_;
190 return grob_attributes_;
223 return (nb_graphics_locks_ != 0);
241 ++nb_graphics_locks_;
260 --nb_graphics_locks_;
286 virtual void update();
340 virtual void rename(
const std::string& value);
370 return attributes().nb_args();
380 return attributes().ith_arg_name(i);
390 return attributes().ith_arg_value(i).as_string();
401 const std::string& name,
const std::string& value
403 attributes().set_arg(name, value);
413 virtual void value_changed(
Grob* value);
421 const std::string& get_name()
const {
475 return shader_manager_;
486 obj_to_world_ = value;
497 return obj_to_world_;
522 std::string filename_;
Represents a list of name-value pairs.
A Composite Graphite Object.
Base class for all 3D Graphite objects.
Object * get_shader_manager() const
Gets the ShaderManager associated with this Grob.
const std::string & name() const
Gets the name of this Grob.
virtual void rename(const std::string &value)
Renames this Grob.
SceneGraph * scene_graph() const
Gets the SceneGraph.
std::string ith_grob_attribute_value(index_t i) const
gets the value of a grob attribute
virtual bool serialize_read(InputGraphiteFile &geofile)
Reads this Grob from a GeoFile.
virtual bool append(const FileName &value)
Appends the content of the specified file to this Grob.
virtual bool is_serializable() const
Tests whether this Grob can be serialized in GeoFile.
void unlock_graphics()
Unlocks graphics for this VoxelGrob.
void lock_graphics()
Locks graphics for this VoxelGrob.
bool graphics_are_locked() const
Tests whether this VoxelGrob is locked for graphics display.
Object * get_shader() const
Gets the shader associated with this Grob.
virtual bool serialize_write(OutputGraphiteFile &geofile)
Writes this Grob into a stream.
const mat4 & get_obj_to_world_transform() const
Gets the object to world transform.
void set_shader(const std::string &value)
Changes the current shader of this Grob.
void set_shader_and_shader_properties(const std::string &classname, const ArgList &properties)
Sets the shader and its properties.
virtual Interpreter * interpreter()
Gets a pointer to the main Interpreter.
index_t nb_grob_attributes() const
gets the number of grob attributes
virtual bool load(const FileName &value)
Replaces this Grob with the contents of a file.
virtual Object * query_interface(const std::string &name)
Creates an Interface object connected to this Grob.
void set_shader_manager(Object *s)
Sets the ShaderManager associated with this Grob.
void initialize_name(const std::string &name)
Initializes the name of this Grob.
virtual Box3d bbox() const =0
Gets the bounding box.
virtual bool save(const NewFileName &value)
Saves this Grob to a file.
void up_to_date()
Tests whether this object is up to date.
const std::string & ith_grob_attribute_name(index_t i) const
gets the name of a grob attribute
static Grob * find(SceneGraph *sg, const std::string &name)
Finds a Grob by name.
virtual Grob * duplicate(SceneGraph *sg)
Duplicates this Grob.
const std::string & get_filename() const
Gets the filename of this Grob.
virtual Box3d world_bbox() const
Gets the bounding box in world coordinates.
void set_visible(bool value)
Sets the visibility flag of this Grob.
const ArgList & attributes() const
Gets the attributes associated with this Grob.
void get_shader_and_shader_properties(std::string &classname, ArgList &properties, bool pointers=true)
Gets the classname of the shader and its properties.
void set_obj_to_world_transform(const mat4 &value)
Sets the object to world transform.
virtual void redraw()
Triggers update events and redraws the scene.
bool get_visible() const
Tests whether this Grob is visible.
void set_grob_attribute(const std::string &name, const std::string &value)
sets the value of a grob attribute
ArgList & attributes()
Gets the attributes associated with this Grob.
bool dirty() const
Gets the dirty flag.
~Grob() override
Grob destructor.
Grob(CompositeGrob *parent)
Grob constructor.
void set_filename(const std::string &value)
Sets the name of this Grob.
virtual void clear()
Clears this Grob.
Abstract base class for the GOM interpreter.
A template class for strings that need to have a specific type in the GOM system.
A composite object in the GOM system.
Base class for all objects in the GOM system.
An extension of InputGeoFile for storing a complete Graphite scenegraph in a structured binary file.
Manages the shaders and full screen effects for the entire SceneGraph.
Represents the list of objects loaded in Graphite.
Manages the Shader objects associated with a Grob.
geo_index_t index_t
The type for storing and manipulating indices.
Global Graphite namespace.
SmartPointer< Grob > Grob_var
An automatic reference-counted pointer to a Grob.
The base class for all composite objects in the GOM system.
Simple geometric objects and manipulations.
Definitions common to all include files in the scene_graph library.