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 {
58 virtual void DeepSwap(
GfxObj& go);
60 virtual void RenderPov(
PovState& pov);
63 virtual int GetType()
const;
67 virtual void SetMatAmb(
const Color& c);
68 virtual void SetMatDiff(
const Color& c);
69 virtual void SetMatSpec(
const Color& c);
70 virtual void SetMatShin(
float s);
71 virtual void SetMatEmm(
const Color& c);
72 virtual void ContextSwitch();
76 virtual void SetLineWidth(
float w);
77 virtual void SetPolyMode(
unsigned int m);
78 virtual void SetAALines(
bool f);
79 virtual void SetLineHalo(
float f);
80 virtual void SetOutline(
bool f);
82 virtual void SetOutlineMode(
int m);
84 virtual void SetOutlineWidth(
float f);
85 virtual float GetOutlineWidth()
const;
86 virtual void SetOutlineExpandFactor(
float f);
87 virtual float GetOutlineExpandFactor()
const;
88 virtual void SetOutlineExpandColor(
const Color& c);
89 virtual Color GetOutlineExpandColor()
const;
90 virtual void SetOpacity(
float f);
92 virtual void SetSolid(
bool f);
94 virtual void SetSolidColor(
const Color& c);
97 virtual void SetClip(
bool f);
98 virtual bool GetClip()
const {
return clip_flag_;}
101 virtual void SetClipOffset(
float f);
106 const Gradient& g,
float minv,
float maxv);
110 const Gradient& g,
float minv,
float maxv);
151 virtual void CustomPreRenderGL(
bool rebuild);
155 virtual void InitGL();
158 virtual void CustomRenderPov(
PovState& pov);
176 virtual void OnRenderModeChange();
177 virtual void OnGLCleanup();
206 void SetNormalSmoothFactor(
float smoothf);
207 float GetNormalSmoothFactor()
const;
210 void SetMaterial(
const Material& m);
213 void SmoothVertices(
float smoothf);
220 void Debug(
unsigned int flags);
227 void PreRenderGL(
bool flag);
235 void CleanColorOps();
236 void ReapplyColorOps();
237 void render_labels()
const;
238 void render_depth_only();
virtual bool GetSolid() const
virtual bool GetOutline() const
get state of outline rendering
unsigned int debug_flags_
float GetLineWidth() const
geom::Transform transform_
virtual bool GetClip() const
virtual geom::Vec4 GetClipPlane() const
float GetLineHalo() const
boost::ptr_vector< gfx::ColorOp > c_ops_
virtual Color GetSolidColor() const
main class for all graphic objects
const IndexedVertexArray & GetVA() const
#define DLLEXPORT_OST_GFX
std::stack< GfxNode * > Stack
main interface for all graphic objects, both in C++ and Python
RenderMode::Type render_mode_
Three dimensional vector class, using Real precision.
virtual float GetClipOffset() const
ImageStateConstModIPAlgorithm< ClearFnc > Clear
virtual int GetOutlineMode() const
get current outline mode
std::vector< TextPrim > TextPrimList
Manage shared instances of images.
virtual float GetOpacity() const
returns a value smaller than 1.0 if transparency is used in this object
boost::shared_ptr< GfxNode > GfxNodeP
IndexedVertexArray & GetVA()