00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_GFX_OBJ_BASE_HH
00020 #define OST_GFX_OBJ_BASE_HH
00021
00022
00023
00024
00025
00026 #include <ost/geom/geom.hh>
00027 #include <ost/mol/entity_handle.hh>
00028 #include <ost/mol/entity_view.hh>
00029 #if OST_IMG_ENABLED
00030 # include <ost/img/map.hh>
00031 #endif
00032
00033 #include <ost/config.hh>
00034 #include "module_config.hh"
00035
00036 #include "gfx_node.hh"
00037 #include "color.hh"
00038 #include "render_mode.hh"
00039 #include "gradient.hh"
00040 #include "material.hh"
00041 #include "color_ops/color_op.hh"
00042
00043 namespace ost { namespace gfx {
00044
00045 class Scene;
00046
00048
00049
00050
00051
00052
00053 class DLLEXPORT_OST_GFX GfxObjBase: public GfxNode
00054 {
00055 public:
00056 GfxObjBase(const String& name): GfxNode(name) {}
00057
00059 virtual void SetMatAmb(const Color& c) = 0;
00061 virtual void SetMatDiff(const Color& c) = 0;
00063 virtual void SetMatSpec(const Color& c) = 0;
00065 virtual void SetMatShin(float s) = 0;
00067 virtual void SetMatEmm(const Color& c) = 0;
00068
00070 virtual void ContextSwitch() = 0;
00071
00073 virtual void SetRenderMode(RenderMode::Type m) = 0;
00075 virtual RenderMode::Type GetRenderMode() const = 0;
00076
00078 virtual geom::Vec3 GetCenter() const = 0;
00079
00081 virtual void SetLineWidth(float w) = 0;
00082
00084 virtual void SetPolyMode(unsigned int m) = 0;
00085
00087 virtual void SetAALines(bool f) = 0;
00088
00090 virtual void SetLineHalo(float f) = 0;
00091
00093 virtual void SetOutline(bool f) = 0;
00095 virtual bool GetOutline() const = 0;
00097 virtual void SetOutlineMode(int m) = 0;
00099 virtual int GetOutlineMode() const = 0;
00102 virtual void SetOutlineWidth(float f) = 0;
00104 virtual float GetOutlineWidth() const = 0;
00107 virtual void SetOutlineExpandFactor(float f) = 0;
00109 virtual float GetOutlineExpandFactor() const = 0;
00111 virtual void SetOutlineExpandColor(const Color& c) = 0;
00113 virtual Color GetOutlineExpandColor() const = 0;
00114
00116 virtual void SetOpacity(float f) = 0;
00118 virtual float GetOpacity() const = 0;
00119
00120 virtual void SetSolid(bool f) = 0;
00121 virtual bool GetSolid() const = 0;
00122 virtual void SetSolidColor(const Color& c) = 0;
00123 virtual Color GetSolidColor() const = 0;
00124
00125 virtual void SetClip(bool f) = 0;
00126 virtual bool GetClip() const = 0;
00127 virtual void SetClipPlane(const geom::Vec4&) = 0;
00128 virtual geom::Vec4 GetClipPlane() const = 0;
00129 virtual void SetClipOffset(float f) = 0;
00130 virtual float GetClipOffset() const = 0;
00131
00134 virtual void ColorBy(const mol::EntityView& ev,
00135 const String& prop,
00136 const Gradient& g, float minv, float maxv) = 0;
00137
00138 #if OST_IMG_ENABLED
00140 virtual void ColorBy(const img::MapHandle& mh,
00141 const String& prop,
00142 const Gradient& g,float minv, float maxv) = 0;
00143 #endif
00144
00145
00146
00147 };
00148
00149 }}
00150
00151 #endif