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);
109 const Gradient& g,
float minv,
float maxv);
149 virtual void CustomPreRenderGL(
bool rebuild);
153 virtual void InitGL();
156 virtual void CustomRenderPov(
PovState& pov);
174 virtual void OnRenderModeChange();
175 virtual void OnGLCleanup();
204 void SetNormalSmoothFactor(
float smoothf);
205 float GetNormalSmoothFactor()
const;
208 void SetMaterial(
const Material& m);
211 void SmoothVertices(
float smoothf);
218 void Debug(
unsigned int flags);
225 void PreRenderGL(
bool flag);
233 void CleanColorOps();
234 void ReapplyColorOps();
235 void render_labels()
const;
236 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()