EntityRenderer Class Reference

#include <entity_renderer.hh>

Inherited by ConnectRendererBase, and TraceRendererBase.

Public Member Functions

 EntityRenderer ()
virtual ~EntityRenderer ()
void AddView (const mol::EntityView &view)
void SubstractView (const mol::EntityView &view)
void ClearViews ()
virtual bool HasDataToRender () const
virtual const StringGetName () const
void SetEnabled (bool enabled=true)
bool IsEnabled () const
bool HasSelection () const
void SetSelection (const mol::EntityView &sel)
void SetVisible (const mol::EntityView &view, bool visible)
const ColorGetSelectionColor () const
const ColorGetSelectionColorOutline () const
mol::EntityView GetFullView ()
mol::EntityView GetEffectiveView ()
virtual void UpdateViews ()=0
virtual void PrepareRendering ()=0
virtual void Render (RenderPass pass)
virtual void RenderPov (PovState &pov, const std::string &name)
virtual void Export (Exporter *ex)
virtual bool CanSetOptions (RenderOptionsPtr &render_options)=0
virtual void SetOptions (RenderOptionsPtr &render_options)=0
virtual RenderOptionsPtr GetOptions ()=0
virtual geom::AlignedCuboid GetBoundingBox () const =0
virtual void PickAtom (const geom::Line3 &line, Real line_width, mol::AtomHandle &picked_atom)=0
virtual void PickBond (const geom::Line3 &line, Real line_width, mol::BondHandle &picked_bond)=0
virtual void RenderOptionsChanged ()
virtual void Apply (const gfx::ByElementColorOp &op)=0
virtual void Apply (const gfx::ByChainColorOp &op)=0
virtual void Apply (const gfx::UniformColorOp &op)=0
virtual void Apply (const gfx::GradientLevelColorOp &op)=0
virtual void Apply (const gfx::EntityViewColorOp &op)=0
virtual void Apply (const gfx::MapHandleColorOp &op)=0
bool IsDirty () const
void FlagPositionsDirty ()
void Debug (unsigned int flags)
IndexedVertexArrayVA ()

Protected Member Functions

virtual void SetName (const String &name)

Protected Attributes

String name_
bool enabled_
mol::EntityView full_view_
mol::EntityView effective_view_
mol::EntityView hidden_view_
IndexedVertexArray va_
mol::EntityView sel_
mol::EntityView full_sel_
IndexedVertexArray sel_va_
DirtyFlags sel_state_
DirtyFlags state_
unsigned int debug_flags_
float opacity_

Detailed Description

Definition at line 69 of file entity_renderer.hh.


Constructor & Destructor Documentation

EntityRenderer (  ) 
virtual ~EntityRenderer (  )  [inline, virtual]

Definition at line 72 of file entity_renderer.hh.


Member Function Documentation

void AddView ( const mol::EntityView view  ) 

add view

virtual void Apply ( const gfx::MapHandleColorOp op  )  [pure virtual]

Implemented in ConnectRendererBase, and TraceRendererBase.

virtual void Apply ( const gfx::EntityViewColorOp op  )  [pure virtual]

Implemented in ConnectRendererBase, and TraceRendererBase.

virtual void Apply ( const gfx::GradientLevelColorOp op  )  [pure virtual]

Implemented in ConnectRendererBase, and TraceRendererBase.

virtual void Apply ( const gfx::UniformColorOp op  )  [pure virtual]

Implemented in ConnectRendererBase, and TraceRendererBase.

virtual void Apply ( const gfx::ByChainColorOp op  )  [pure virtual]

Implemented in ConnectRendererBase, and TraceRendererBase.

virtual void Apply ( const gfx::ByElementColorOp op  )  [pure virtual]

Implemented in ConnectRendererBase, and TraceRendererBase.

virtual bool CanSetOptions ( RenderOptionsPtr render_options  )  [pure virtual]
void ClearViews (  ) 

reset rendering views to zero

void Debug ( unsigned int  flags  ) 
virtual void Export ( Exporter ex  )  [virtual]

scene exporter interface

void FlagPositionsDirty (  ) 
virtual geom::AlignedCuboid GetBoundingBox (  )  const [pure virtual]
mol::EntityView GetEffectiveView (  ) 
mol::EntityView GetFullView (  ) 

get view to be rendered by this renderer.

Upon calling this method, the union of all views added to the renderer with AddView() is calculated by first reevaluating all queries and then merging them into one view.

virtual const String& GetName (  )  const [virtual]
virtual RenderOptionsPtr GetOptions (  )  [pure virtual]
const Color& GetSelectionColor (  )  const
const Color& GetSelectionColorOutline (  )  const
virtual bool HasDataToRender (  )  const [virtual]

Reimplemented in TraceRendererBase.

bool HasSelection (  )  const

whether the renderer has a non-empty selection

bool IsDirty (  )  const
bool IsEnabled (  )  const
virtual void PickAtom ( const geom::Line3 line,
Real  line_width,
mol::AtomHandle picked_atom 
) [pure virtual]

pick atom

If picked_atom is a valid handle, picked_atom is only replaced if the candidate picked atom is closer to the near clipping plane.

Implemented in ConnectRendererBase, and TraceRendererBase.

virtual void PickBond ( const geom::Line3 line,
Real  line_width,
mol::BondHandle picked_bond 
) [pure virtual]

pick bond

Note:
calling PickBond on a trace-based renderer is a no-op as the notion of bonds is not meaningful for these renders

Implemented in ConnectRendererBase, and TraceRendererBase.

virtual void PrepareRendering (  )  [pure virtual]
virtual void Render ( RenderPass  pass  )  [virtual]

render the entity

This is the place where the actual rendering should happen, i.e sending of the geometric primitives to the graphics card.

The rendering buffers and vertex arrays should be prepared in PrepareRendering()

Reimplemented in CPKRenderer.

virtual void RenderOptionsChanged (  )  [virtual]
virtual void RenderPov ( PovState pov,
const std::string &  name 
) [virtual]

povray rendering call

Reimplemented in CPKRenderer, CustomRenderer, SimpleRenderer, and TraceRenderer.

void SetEnabled ( bool  enabled = true  ) 
virtual void SetName ( const String name  )  [protected, virtual]
virtual void SetOptions ( RenderOptionsPtr render_options  )  [pure virtual]
void SetSelection ( const mol::EntityView sel  ) 
void SetVisible ( const mol::EntityView view,
bool  visible 
)

hide / show part of the rendered data

void SubstractView ( const mol::EntityView view  ) 
virtual void UpdateViews (  )  [pure virtual]

update views

Implemented in ConnectRendererBase, and TraceRendererBase.

IndexedVertexArray& VA (  )  [inline]

Definition at line 170 of file entity_renderer.hh.


Field Documentation

unsigned int debug_flags_ [protected]

Definition at line 188 of file entity_renderer.hh.

Definition at line 178 of file entity_renderer.hh.

bool enabled_ [protected]

Definition at line 175 of file entity_renderer.hh.

Definition at line 183 of file entity_renderer.hh.

Definition at line 177 of file entity_renderer.hh.

Definition at line 179 of file entity_renderer.hh.

String name_ [protected]

Definition at line 174 of file entity_renderer.hh.

float opacity_ [protected]

Definition at line 189 of file entity_renderer.hh.

mol::EntityView sel_ [protected]

Definition at line 182 of file entity_renderer.hh.

DirtyFlags sel_state_ [protected]

Definition at line 186 of file entity_renderer.hh.

Definition at line 184 of file entity_renderer.hh.

DirtyFlags state_ [protected]

Definition at line 187 of file entity_renderer.hh.

IndexedVertexArray va_ [protected]

Definition at line 180 of file entity_renderer.hh.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 10 Nov 2016 for OpenStructure by  doxygen 1.6.1