00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_GFX_IMPL_TRACE_RENDERER_HH
00020 #define OST_GFX_IMPL_TRACE_RENDERER_HH
00021
00022
00023
00024
00025 #include <ost/gfx/impl/backbone_trace.hh>
00026 #include <ost/gfx/impl/entity_detail.hh>
00027 #include <ost/gfx/impl/trace_renderer_base.hh>
00028
00029 #include <ost/gfx/entity_fw.hh>
00030 #include <ost/gfx/render_options/trace_render_options.hh>
00031
00032 namespace ost { namespace gfx { namespace impl {
00033
00034 using namespace impl;
00035
00038 class DLLEXPORT_OST_GFX TraceRenderer: public TraceRendererBase {
00039 public:
00040 TraceRenderer(BackboneTrace& trace);
00041
00042 virtual void PrepareRendering();
00043 virtual void PrepareRendering(TraceSubset& trace_subset,
00044 IndexedVertexArray& va, bool is_sel);
00045 virtual void Render();
00046 virtual void RenderPov(PovState& pov, const std::string& name);
00047
00048 virtual bool CanSetOptions(RenderOptionsPtr& render_options);
00049 virtual void SetOptions(RenderOptionsPtr& render_options);
00050 virtual RenderOptionsPtr GetOptions();
00051
00052 virtual ~TraceRenderer();
00053 private:
00054 VertexID AddCappedProfile(IndexedVertexArray& va, const Color& color,
00055 const geom::Vec3& center, const geom::Mat3& ori,
00056 float radius, bool flip_normal, int n);
00057 VertexID AddCircularProfile(IndexedVertexArray& va, const Color& color,
00058 const geom::Vec3& center, const geom::Mat3& ori,
00059 float radius, int n);
00060 void ConnectProfiles(VertexID prof1, VertexID prof2, int n,
00061 const geom::Vec3& dir, IndexedVertexArray& va);
00062 TraceRenderOptionsPtr options_;
00063 };
00064
00065 }}}
00066
00067 #endif // OST_GFX_TRACE_RENDERER_HH