00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_GFX_NODE_HH
00020 #define OST_GFX_NODE_HH
00021
00022
00023
00024
00025
00026 #include <vector>
00027
00028 #include <boost/enable_shared_from_this.hpp>
00029
00030 #include <ost/gfx/module_config.hh>
00031
00032 #include "render_pass.hh"
00033 #include "gfx_node_fw.hh"
00034 #include "gfx_object_fw.hh"
00035 #include "gfx_node_visitor.hh"
00036 #include "povray_fw.hh"
00037
00038 namespace ost { namespace gfx {
00039
00040 typedef std::vector<GfxNodeP> GfxNodeVector;
00041
00042 class DLLEXPORT_OST_GFX GfxNode: public boost::enable_shared_from_this<GfxNode>
00043 {
00044 public:
00045
00046
00047 GfxNode(const String& name);
00048
00049 virtual ~GfxNode();
00050
00051
00052 virtual GfxNodeP Copy() const;
00053
00054 virtual void DeepSwap(GfxNode& n);
00055
00056
00057 virtual void RenderGL(RenderPass pass);
00058
00059
00060
00061 virtual void RenderPov(PovState& pov);
00062
00063
00064 virtual void Apply(GfxNodeVisitor& v, GfxNodeVisitor::Stack st);
00065
00066 virtual int GetType() const;
00067
00068
00069 String GetName() const;
00070
00071
00072 void Rename(const String& name);
00073
00074
00075 void Add(GfxObjP obj);
00076
00077
00078 void Remove(GfxObjP obj);
00079
00080
00081 void Add(GfxNodeP node);
00082
00083
00084 void Remove(GfxNodeP node);
00085
00086
00087 void Remove(const String& name);
00088
00089 size_t GetChildCount() const;
00090
00091
00092 void Hide();
00093
00094 void Show();
00095
00096 bool IsVisible() const;
00097
00098
00099 private:
00100 GfxNode(const GfxNode& o);
00101 GfxNode& operator=(const GfxNode&);
00102
00103
00104 String name_;
00105 bool show_;
00106 GfxNodeVector node_vector_;
00107 };
00108
00109 }}
00110
00111 #endif