38#ifndef H_OGF_SCENE_GRAPH_TYPES_SCENE_GRAPH_H
39#define H_OGF_SCENE_GRAPH_TYPES_SCENE_GRAPH_H
52 class RenderingContext;
73 bool transfer_ownership_to_scenegraph_library=
false
175 const GrobName& grob,
const std::string& new_name
247 const FileName& filename,
const std::string& type=
"default",
248 bool change_cwd=
false
262 const std::string& filenames,
const std::string& type=
"default",
263 bool change_cwd=
false
297 const std::string& name =
"new_object"
308 return create_object(
"OGF::MeshGrob",name);
341 void set_current_object(
const GrobName& value);
443 virtual void values_changed(
const std::string& value);
466 const std::string& method_name,
518 void get_grob_shader(
519 Grob* grob, std::string& classname,
ArgList& properties
522 void set_grob_shader(
523 Grob* grob,
const std::string& classname,
const ArgList& properties
535 const std::string& obj_prop_name,
ArgList& args
A class that stores a variable of arbitrary type.
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.
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.
void move_object_down(const GrobName &grob)
Moves an object down in the SceneGraph.
void move_current_to_bottom()
Makes the current object the last of the list.
bool save_current_object(const NewFileName &filename)
Saves the current object to a file.
void set_application(Object *app)
Sets the application.
void move_current_up()
Swaps the current object with the previous one.
Grob * serialize_grob_read(InputGraphiteFile &in)
Reads an object from a geogram file.
void update_values()
Triggers the values_changed(), visibilities_changed(), types_changed() and value_changed() signals.
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.
void move_selection_to_top()
Reorganizes the object list in such a way that all selected objects appear first.
~SceneGraph() override
SceneGraph destructor.
Object * get_scene_graph_shader_manager() const
gets the scene graph shader manager.
void delete_current()
Removes the current object from this SceneGraph and deletes it.
void end_graphite_file(OutputGraphiteFile &out)
Writes the trailer of a gsg file.
void move_object_to_top(const GrobName &grob)
Makes an object the first in the list.
const GrobName & get_current_object() const
Gets the name of the current object.
Object * get_render_area() const
Gets the render area.
void delete_current_object()
Deletes the current object.
Grob * create_object(const GrobClassName &classname="OGF::MeshGrob", const std::string &name="new_object")
Creates an object.
Grob * duplicate_current()
Duplicates the current object.
void rename_object(const GrobName &grob, const std::string &new_name)
Renames an object.
std::string get_values() const
Gets the names of all the objects in this SceneGraph.
bool serialize_read(InputGraphiteFile &in) override
Reads this Grob from a GeoFile.
void load_objects(const std::string &filenames, const std::string &type="default", bool change_cwd=false)
Loads objects from a list of files, and stores them in this SceneGraph.
void delete_selected()
Removes and deletes all the selected objects in this SceneGraph.
void serialize_grob_write(Grob *grob, OutputGraphiteFile &out)
Writes an object to a geogram file.
void set_current(const GrobName &grob)
Sets the current object.
Grob * duplicate_object(const GrobName &grob)
Duplicates an object object.
Object * get_application() const
Gets the application.
Grob * create_mesh(const std::string &name="")
Creates a mesh.
Grob * find_or_create_object(const GrobClassName &classname, const std::string &name)
Creates a new object or retreives an existing one.
void move_object_to_bottom(const GrobName &grob)
Makes an object the last in the list.
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 delete_all()
Deletes and removes all the objects in this SceneGraph.
void move_current_to_top()
Makes the current object the first of the list.
void set_scene_graph_shader_manager(Object *sgshdmgr)
sets the scene graph shader manager.
void move_selection_up()
Reorganizes the object list in such a way that all selected objects move one position up.
void copy_property_to_arglist(const std::string &obj_prop_name, ArgList &args)
Copies an objet property to an arglist.
SceneGraph(Interpreter *interpreter=nullptr, bool transfer_ownership_to_scenegraph_library=false)
SceneGraph constructor.
void copy_arglist_to_properties(const ArgList &args)
Copies all the object properties previously recorded by copy_property_to_arglist() from an ArgList to...
void move_selection_down()
Reorganizes the object list in such a way that all selected objects move one position down.
bool save_viewer_properties(const std::string &filename)
Saves viewer properties to a file.
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.
Interpreter * interpreter() override
Gets a pointer to the main Interpreter.
void delete_object(const GrobName &grob)
Removes an object from this SceneGraph and deletes it.
bool serialize_write(OutputGraphiteFile &out) override
Writes this Grob into a stream.
Grob * load_object(const FileName &filename, const std::string &type="default", bool change_cwd=false)
Loads an object from a file, and stores it in this SceneGraph.
bool is_serializable() const override
Tests whether this Grob can be serialized in GeoFile.
void move_selection_to_bottom()
Reorganizes the object list in such a way that all selected objects appear last.
bool invoke_method(const std::string &method_name, const ArgList &args, Any &ret_val) override
Invokes a method by method name and argument list, and gets the return value.
void clear() override
Clears this SceneGraph.
void value_changed(Grob *value) override
a signal that is triggered whenever this SceneGraph changes.
void move_object_up(const GrobName &grob)
Moves an object up in the SceneGraph.
A class for Grob composed of several parts.
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.