38 #ifndef H_OGF_SCENE_GRAPH_TYPES_SCENE_GRAPH_H
39 #define H_OGF_SCENE_GRAPH_TYPES_SCENE_GRAPH_H
52 class RenderingContext;
115 bool save_viewer_properties(
const std::string& value);
165 const FileName& value,
const std::string& type=
"default",
166 bool invoked_from_gui=
false
181 const std::string& value,
const std::string& type=
"default",
182 bool invoked_from_gui=
false
213 return create_object(
"OGF::MeshGrob",name);
259 void set_current_object(
const std::string& value);
348 virtual void values_changed(
const std::string& value);
462 void get_grob_shader(
463 Grob* grob, std::string& classname,
ArgList& properties
466 void set_grob_shader(
467 Grob* grob,
const std::string& classname,
const ArgList& properties
479 const std::string& obj_prop_name,
ArgList& args
493 std::string current_object_;
Represents a list of name-value pairs.
A Composite Graphite Object.
Base class for all 3D Graphite objects.
Abstract base class for the GOM interpreter.
A template class for strings that need to have a specific type 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.
Represents the list of objects loaded in Graphite.
Grob * find_or_create_object(const GrobClassName &classname, const std::string &name)
Creates a new object or retreives an existing one.
SceneGraph(Interpreter *interpreter=nullptr)
SceneGraph constructor.
void set_application(Object *app)
Sets the application.
virtual void visibilities_changed(const std::string &value)
a signal that is triggered whenever object visibility flags change.
void move_current_up()
Swaps the current object with the previous one.
void update_values()
Triggers the values_changed(), visibilities_changed(), types_changed() and value_changed() signals.
void load_objects(const std::string &value, const std::string &type="default", bool invoked_from_gui=false)
Loads objects from a list of files, and stores them in this SceneGraph.
static bool load_aln(const std::string &filename, SceneGraph *sg)
Loads alignment data for pointsets.
virtual void current_object_changed(const std::string &value)
a signal that is triggered whenever the current object changes.
void set_render_area(Object *rdra)
Sets the render area.
virtual void types_changed(const std::string &value)
a signal that is triggered whenever the list of objects changes.
Grob * serialize_grob_read(InputGraphiteFile &in)
Reads an object from a geogram file.
Object * get_application() const
Gets the application.
~SceneGraph() override
SceneGraph destructor.
void grob_renamed()
a signal that is triggered whenever an object is renamed in this SceneGraph
void end_graphite_file(OutputGraphiteFile &out)
Writes the trailer of a gsg file.
Object * get_scene_graph_shader_manager() const
gets the scene graph shader manager.
void delete_current_object()
Deletes the current object.
std::string get_values() const
Gets the names of all the objects in this SceneGraph.
Object * get_render_area() const
Gets the render area.
bool serialize_read(InputGraphiteFile &in) override
Reads this Grob from a GeoFile.
void serialize_grob_write(Grob *grob, OutputGraphiteFile &out)
Writes an object to a geogram file.
void set_visibilities(const std::string &value)
Sets the visibility flags for all the objects.
bool save_current_object(const NewFileName &value)
Saves the current object to a file.
void grob_created(const std::string &name)
a signal that is triggered whenever an object is created in this SceneGraph
Interpreter * interpreter() override
Gets a pointer to the main Interpreter.
void begin_graphite_file(OutputGraphiteFile &out, bool all_scene)
Writes the preamble of a gsg file to a stream.
void update() override
Triggers the value_changed() signal.
void grob_deleted(const std::string &name)
a signal that is triggered whenever an object is deleted in this SceneGraph
void set_current_object(const std::string &value, bool record_history)
Sets the current object.
void set_scene_graph_shader_manager(Object *sgshdmgr)
sets the scene graph shader manager.
void copy_property_to_arglist(const std::string &obj_prop_name, ArgList &args)
Copies an objet property to an arglist.
Grob * load_object(const FileName &value, const std::string &type="default", bool invoked_from_gui=false)
Loads an object from a file, and stores it in this SceneGraph.
void set_visibility(index_t index, bool value)
Sets the visibility flag of one of the objects.
void copy_arglist_to_properties(const ArgList &args)
Copies all the object properties previously recorded by copy_property_to_arglist() from an ArgList to...
Grob * current()
Gets the current object.
Grob * create_object(const GrobClassName &classname, const std::string &name="")
Creates an object.
Grob * create_mesh(const std::string &name="")
Creates a mesh.
void register_grob_commands(MetaClass *grob_class, MetaClass *commands_class)
Associates a Commands class to a Grob class.
void move_current_down()
Swaps the current object with the next one.
bool serialize_write(OutputGraphiteFile &out) override
Writes this Grob into a stream.
const std::string & get_current_object() const
Gets the name of the current object.
bool is_serializable() const override
Tests whether this Grob can be serialized in GeoFile.
std::string get_types() const
Gets the object types for all the objects.
std::string get_visibilities() const
Gets the visibility flags for all the objects.
Grob * duplicate_current()
Duplicates the current object.
void clear() override
Clears this SceneGraph.
void value_changed(Grob *value) override
a signal that is triggered whenever this SceneGraph changes.
A class for Grob composed of several parts.
geo_index_t index_t
The type for storing and manipulating indices.
Global Graphite namespace.
The base class for all composite objects in the GOM system.
Definitions common to all include files in the scene_graph library.