// OiStream.h #ifndef OiStream_H #define OiStream_H // Implement VisStream using OpenInventor. // #include #include #include "trfobj/VisStream.h" #include "ptr/Ptr.h" #include "ptr/DeletePolicy.h" #include "ptr/SharedDeletePolicy.h" using std::vector; using std::map; using std::less; class SoSeparator; class OiStream : public virtual VisStream { private: // typedefs // List of child streams. typedef Ptr OiStreamPtr; typedef vector Streams; private: // attributes // Root of the open inventor scene. SoSeparator* _proot; // List of child streams. Streams _children; protected: // methods // Return the open inventor root separator. SoSeparator* get_root() { return _proot; } public: // methods // Constructor. OiStream(); // Destructor. ~OiStream(); // Add a substream and return a reference to it. virtual VisStream& add_child(); // Set color using RGB model. // Values should all be in range (0,1). // Color applies to following shapes until overridden. virtual void set_color(const VisColor& col); // Write contents to a file. // This file can be processed by an open inventor viewer. virtual void write(string filename); }; #endif