19 #ifndef OST_GFX_OBJ_HH
20 #define OST_GFX_OBJ_HH
30 #include <boost/ptr_container/ptr_vector.hpp>
46 namespace ost {
namespace gfx {
98 virtual bool GetClip()
const {
return clip_flag_;}
106 const Gradient& g,
float minv,
float maxv);
109 const Gradient& g,
float minv,
float maxv);
Three dimensional vector class, using Real precision.
std::stack< GfxNode * > Stack
main interface for all graphic objects, both in C++ and Python
main class for all graphic objects
virtual void SetClip(bool f)
virtual void SetClipOffset(float f)
virtual void SetOutline(bool f)
turn outline rendering on or off
virtual void CustomRenderPov(PovState &pov)
virtual void OnGLCleanup()
static Color Ele2Color(const String &ele)
virtual geom::Vec4 GetClipPlane() const
virtual void ContextSwitch()
rendering context switch, some things need to be regenerated
RenderMode::Type render_mode_
virtual void OnRenderModeChange()
void AddLabel(const String &s, const geom::Vec3 &pos, const Color &col, float psize)
virtual int GetType() const
virtual void SetMatSpec(const Color &c)
material specular color
virtual Color GetSolidColor() const
virtual void ColorBy(const mol::EntityView &ev, const String &prop, const Gradient &g, float minv, float maxv)
color each component based on the gradient-mapped property of the given entity
virtual bool GetOutline() const
get state of outline rendering
virtual void ProcessLimits(geom::Vec3 &minc, geom::Vec3 &maxc, const geom::Transform &tf) const
adjust minimum and maximum extent based on graphical object
virtual void SetMatAmb(const Color &c)
material ambient color
virtual void SetRenderMode(RenderMode::Type m)
change render mode
virtual void SetSolid(bool f)
void AppendColorOp(gfx::ColorOp *op)
virtual void SetMatEmm(const Color &c)
material emmissive color
virtual void SetOutlineExpandFactor(float f)
set outline expansion factor (mode 3) this scales with resolution
void PreRenderGL(bool flag)
void render_labels() const
virtual Color GetOutlineExpandColor() const
get current outline color (mode 3)
virtual float GetClipOffset() const
virtual float GetOpacity() const
returns a value smaller than 1.0 if transparency is used in this object
float GetLineWidth() const
virtual void OnInput(const InputEvent &e)
boost::ptr_vector< gfx::ColorOp > c_ops_
virtual int GetOutlineMode() const
get current outline mode
unsigned int debug_flags_
void SetNormalSmoothFactor(float smoothf)
virtual void SetOpacity(float f)
set opacity (1 = no transparency)
float GetLineHalo() const
virtual float GetOutlineWidth() const
get current outline width
Material GetMaterial() const
virtual bool GetSolid() const
virtual float GetOutlineExpandFactor() const
get current outline expand factor (mode 3)
void AddLabel(const String &s, const geom::Vec3 &pos, const Color &col)
virtual void SetPolyMode(unsigned int m)
set polygon mode
void SmoothVertices(float smoothf)
virtual void ColorBy(const img::MapHandle &mh, const String &prop, const Gradient &g, float minv, float maxv)
color based on image
virtual void SetMatDiff(const Color &c)
material diffuse color
virtual geom::AlignedCuboid GetBoundingBox(bool use_tf=false) const
returns the bounding box of this object
void SetMaterial(const Material &m)
virtual void CustomPreRenderGL(bool rebuild)
virtual void SetAALines(bool f)
turn on sophisticated line anti-aliasing, requires shader
void Clear()
removes all graphical elements
virtual void SetClipPlane(const geom::Vec4 &)
virtual void SetLineHalo(float f)
turn on line halo of given strength
virtual geom::Vec3 GetCenter() const
get geometric center
virtual void CustomRenderGL(RenderPass pass)
void AddLabel(const String &s, const geom::Vec3 &pos, float psize)
GfxObj(const String &name)
float GetNormalSmoothFactor() const
virtual void SetSolidColor(const Color &c)
void AddLabel(const String &s, const geom::Vec3 &pos)
void Debug(unsigned int flags)
virtual bool OnSelect(const geom::Line3 &l, geom::Vec3 &result, float zlim, bool pick_flag)
virtual void RenderGL(RenderPass pass)
void SetTF(const geom::Transform &tf)
set transform
const geom::Transform & GetTF() const
get transform
virtual void RenderPov(PovState &pov)
const IndexedVertexArray & GetVA() const
virtual void SetOutlineExpandColor(const Color &c)
set outline color (mode 3)
virtual bool GetClip() const
virtual void SetMatShin(float s)
material shininess
virtual void SetOutlineMode(int m)
set outline mode, 1, 2 or 3
virtual RenderMode::Type GetRenderMode() const
current render mode
virtual void Export(Exporter *ex)
virtual void Apply(GfxNodeVisitor &v, GfxNodeVisitor::Stack st)
geom::Transform transform_
virtual void SetOutlineWidth(float f)
set outline width in pixels (modes 1 + 2) this does not scale with resolution
virtual void DeepSwap(GfxObj &go)
virtual GfxNodeP Copy() const
virtual void SetLineWidth(float w)
set line width
IndexedVertexArray & GetVA()
Manage shared instances of images.
#define DLLEXPORT_OST_GFX
std::vector< TextPrim > TextPrimList
boost::shared_ptr< GfxNode > GfxNodeP