19 #ifndef OST_GFX_ENTITY_RENDERER_HH
20 #define OST_GFX_ENTITY_RENDERER_HH
27 #if defined(GetAtomProps)
54 #endif //OST_IMG_ENABLED
59 namespace ost {
namespace gfx {
namespace impl {
81 virtual bool HasDataToRender()
const;
83 virtual const String& GetName()
const;
85 void SetEnabled(
bool enabled=
true);
87 bool IsEnabled()
const;
90 bool HasSelection()
const;
98 const Color& GetSelectionColor()
const;
100 const Color& GetSelectionColorOutline()
const;
112 virtual void UpdateViews()=0;
115 virtual void PrepareRendering()=0;
127 virtual void RenderPov(
PovState& pov,
const std::string& name);
153 virtual void RenderOptionsChanged();
164 bool IsDirty()
const;
166 void FlagPositionsDirty();
168 void Debug(
unsigned int flags);
172 virtual void SetName(
const String& name);
210 return std::make_pair(
true,
col_);
235 return std::make_pair(
false,
Color());
238 }
catch(std::exception&){
240 return std::make_pair(
false,
Color());
242 return std::make_pair(
false,
Color());
253 ev_(op.GetEntityView()),
256 maxv_(op.GetMaxV()){}
267 struct MapHandleGetCol {
IndexedVertexArray sel_va_
std::pair< bool, Color > ColorOfAtom(mol::AtomHandle &atom) const
virtual ~EntityRenderer()
mol::EntityView full_sel_
GradientLevelGetCol(const GradientLevelColorOp &op)
virtual const img::MapHandle & GetMapHandle() const
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_
virtual gfx::Gradient GetGradient() const
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)
virtual float GetMaxV() const
Manage shared instances of images.
mol::EntityView effective_view_
EntityViewGetCol(const EntityViewColorOp &op)
virtual float GetMinV() const
ByChainGetCol(const ByChainColorOp &op)
virtual String GetProperty() const
mol::EntityPropertyMapper epm_