00001 #ifndef OOGL_H // -*- C++ -*-
00002 #define OOGL_H
00003
00004 #include "poly.h"
00005 #include <string>
00006 #include <CGAL/Object.h>
00007 #include <CGAL/Point_3.h>
00008 #include <CGAL/Segment_3.h>
00009 #include <CGAL/IO/Color.h>
00010
00011
00014 class oogl_traits
00015 {
00016 public:
00017 oogl_traits( bool has_vertex_color = false,
00018 bool has_facet_color = false );
00019
00020 bool has_vertex_color() const { return v_color; };
00021 bool has_facet_color() const { return f_color; };
00022
00023 virtual CGAL::Color vertex_color( const Polyhedron::Vertex& );
00024 virtual CGAL::Color facet_color( const Polyhedron::Facet& );
00025
00026 std::string OFF_header( const Polyhedron& P ) const;
00027
00028 private:
00029 bool v_color, f_color;
00030 };
00031
00032
00033
00035 template <class R>
00036 inline
00037 void write_oogl_point( std::ostream& os, const CGAL::Point_3<R>& p );
00038
00039
00041 template <class R>
00042 inline
00043 void write_oogl_segment( std::ostream& os, const CGAL::Segment_3<R>& s );
00044
00045
00047 template <class R, class ObjectIterator>
00048 inline
00049 void write_oogl_vect( std::ostream& os,
00050 ObjectIterator obj_begin,
00051 ObjectIterator obj_end );
00052
00053
00055 void
00056 write_oogl_off( std::ostream& os, const Polyhedron& P,
00057 oogl_traits traits = oogl_traits() );
00058
00059
00060 #include "oogl.C"
00061
00062
00063 #endif