19 #ifndef OST_GFX_ENTITY_RENDERER_HH
20 #define OST_GFX_ENTITY_RENDERER_HH
27 #if defined(GetAtomProps)
57 namespace ost {
namespace gfx {
namespace impl {
79 virtual bool HasDataToRender()
const;
81 virtual const String& GetName()
const;
83 void SetEnabled(
bool enabled=
true);
85 bool IsEnabled()
const;
88 bool HasSelection()
const;
96 const Color& GetSelectionColor()
const;
98 const Color& GetSelectionColorOutline()
const;
110 virtual void UpdateViews()=0;
113 virtual void PrepareRendering()=0;
125 virtual void RenderPov(
PovState& pov,
const std::string& name);
151 virtual void RenderOptionsChanged();
160 bool IsDirty()
const;
162 void FlagPositionsDirty();
164 void Debug(
unsigned int flags);
168 virtual void SetName(
const String& name);
206 return std::make_pair(
true,
col_);
231 return std::make_pair(
false,
Color());
234 }
catch(std::exception&){
236 return std::make_pair(
false,
Color());
238 return std::make_pair(
false,
Color());
249 ev_(op.GetEntityView()),
252 maxv_(op.GetMaxV()){}
264 mh_(op.GetMapHandle()),
267 maxv_(op.GetMaxV()){}
IndexedVertexArray sel_va_
std::pair< bool, Color > ColorOfAtom(mol::AtomHandle &atom) const
std::pair< bool, Color > ColorOfAtom(mol::AtomHandle &atom) const
virtual ~EntityRenderer()
mol::EntityView full_sel_
GradientLevelGetCol(const GradientLevelColorOp &op)
unsigned int debug_flags_
Real Get(const AtomHandle &atom) const
get float property throwing an exception when the value does not exist
#define DLLEXPORT_OST_GFX
ChainHandle GetChain() const
The chain this residue is attached to.
const String & GetElement() const
returns the element name of the atom
ResidueHandle GetResidue() const
std::pair< bool, Color > ColorOfAtom(mol::AtomHandle &atom) const
Color GetColor(const String &ident) const
const geom::Vec3 & GetPos() const
Get global position in cartesian coordinates with entity transformations applied. ...
float Normalize(float v, float min_v, float max_v)
mol::EntityView hidden_view_
mol::EntityView full_view_
Color GetColorAt(float t) const
get color
static Color Ele2Color(const String &ele)
std::pair< bool, Color > ColorOfAtom(mol::AtomHandle &atom) const
boost::shared_ptr< RenderOptions > RenderOptionsPtr
const ByChainColorOp & op_
std::pair< bool, Color > ColorOfAtom(mol::AtomHandle &atom) const
IndexedVertexArray & VA()
float DLLEXPORT_OST_GFX MappedProperty(const mol::EntityView &ev, const String &prop, const geom::Vec3 &pos)
Manage shared instances of images.
mol::EntityView effective_view_
EntityViewGetCol(const EntityViewColorOp &op)
MapHandleGetCol(const MapHandleColorOp &op)
ByChainGetCol(const ByChainColorOp &op)
mol::EntityPropertyMapper epm_