GfxObj Class Reference

Base class for all graphical rendering objects. More...

#include <gfx_object.hh>

Inherits ost::gfx::GfxNode.

Inherited by Entity, GfxTestObj, MapIso, MapSlab, PrimList, and Surface.


Public Member Functions

 GfxObj (const String &name)
virtual ~GfxObj ()
virtual GfxNodeP Copy () const
virtual void Apply (GfxNodeVisitor &v, GfxNodeVisitor::Stack st)
virtual int GetType () const
virtual void RenderGL (RenderPass pass)
virtual void RenderPov (PovState &pov)
void Clear ()
const mol::TransformGetTF () const
void SetTF (const mol::Transform &tf)
virtual geom::Vec3 GetCenter () const
virtual geom::AlignedCuboid GetBoundingBox () const
virtual void ProcessLimits (geom::Vec3 &minc, geom::Vec3 &maxc, const mol::Transform &tf) const
virtual void CustomRenderGL (RenderPass pass)
virtual void CustomRenderPov (PovState &pov)
virtual bool OnSelect (const geom::Line3 &l, geom::Vec3 &result, float zlim, bool pick_flag)
virtual void OnInput (const InputEvent &e)
virtual void DeepSwap (GfxObj &go)
virtual void OnRenderModeChange ()
virtual void OnGLCleanup ()
virtual void SetRenderMode (RenderMode::Type m)
RenderMode::Type GetRenderMode () const
void SetLineWidth (float w)
float GetLineWidth () const
void SetSphereDetail (unsigned int d)
unsigned int GetSphereDetail () const
void SetArcDetail (unsigned int d)
unsigned int GetArcDetail () const
void SetSplineDetail (unsigned int d)
unsigned int GetSplineDetail () const
void SetPolyMode (unsigned int m)
unsigned int GetPolyMode () const
void SetAALines (bool f)
bool GetAALines () const
void SetLineHalo (float f)
float GetLineHalo () const
void AddLabel (const String &s, const geom::Vec3 &pos, const Color &col, float psize)
void AddLabel (const String &s, const geom::Vec3 &pos, const Color &col)
void AddLabel (const String &s, const geom::Vec3 &pos, float psize)
void AddLabel (const String &s, const geom::Vec3 &pos)
void ClearLabels ()
void SetMatAmb (const Color &c)
void SetMatAmb (float c)
void SetMatDiff (const Color &c)
void SetMatDiff (float c)
void SetMatSpec (const Color &c)
void SetMatSpec (float c)
void SetMatShin (float s)
void SetMatEmm (const Color &c)
void SetMatEmm (float c)
void SetMat (const Color &amb, const Color &diff, const Color &spec, float shin)
void SetMat (float amb, float diff, float spec, float shin)
void SetOpacity (float o)
float GetOpacity () const
void FlagRebuild ()
void FlagRefresh ()
void SetNormalSmoothFactor (float smoothf)
float GetNormalSmoothFactor () const
Material GetMaterial () const
void SetMaterial (const Material &m)
void SetOutlineMode (int m)
void SetOutlineExpandFactor (float f)
void SetOutlineExpandColor (const Color &c)
void SmoothVertices (float smoothf)
void AmbientOcclusion (bool f)
void GLCleanup ()
virtual void ColorBy (const mol::EntityView &ev, const String &prop, const Gradient &g, float minv, float maxv)
void ColorBy (const mol::EntityView &ev, const String &prop, const Color &c1, const Color &c2, float minv, float maxv)
void ColorBy (const mol::EntityHandle &eh, const String &prop, const Gradient &g, float minv, float maxv)
void ColorBy (const mol::EntityHandle &eh, const String &prop, const Color &c1, const Color &c2, float minv, float maxv)
void ColorBy (const mol::EntityView &ev, const String &prop, const Gradient &g)
void ColorBy (const mol::EntityView &ev, const String &prop, const Color &c1, const Color &c2)
void ColorBy (const mol::EntityHandle &ev, const String &prop, const Gradient &g)
void ColorBy (const mol::EntityHandle &ev, const String &prop, const Color &c1, const Color &c2)
void Debug (unsigned int flags)

Static Public Member Functions

static Color Ele2Color (const String &ele)

Protected Member Functions

void PreRenderGL (bool flag)
virtual void CustomPreRenderGL (bool flag)
void RefreshVA (IndexedVertexArray &va)
virtual void RefreshVA ()
void AppendColorOp (gfx::ColorOp *op)
void CleanColorOps ()
void ReapplyColorOps ()

Protected Attributes

IndexedVertexArray va_
RenderMode::Type render_mode_
unsigned int debug_flags_


Detailed Description

Base class for all graphical rendering objects.

Definition at line 63 of file gfx_object.hh.


Constructor & Destructor Documentation

GfxObj ( const String name  ) 

virtual ~GfxObj (  )  [virtual]


Member Function Documentation

void AddLabel ( const String s,
const geom::Vec3 pos 
)

void AddLabel ( const String s,
const geom::Vec3 pos,
float  psize 
)

void AddLabel ( const String s,
const geom::Vec3 pos,
const Color col 
)

void AddLabel ( const String s,
const geom::Vec3 pos,
const Color col,
float  psize 
)

void AmbientOcclusion ( bool  f  ) 

void AppendColorOp ( gfx::ColorOp op  )  [protected]

virtual void Apply ( GfxNodeVisitor v,
GfxNodeVisitor::Stack  st 
) [virtual]

Reimplemented from GfxNode.

void CleanColorOps (  )  [protected]

Reimplemented in Entity, and Surface.

void Clear (  ) 

Reimplemented in PrimList.

void ClearLabels (  ) 

void ColorBy ( const mol::EntityHandle ev,
const String prop,
const Color c1,
const Color c2 
)

void ColorBy ( const mol::EntityHandle ev,
const String prop,
const Gradient g 
)

void ColorBy ( const mol::EntityView ev,
const String prop,
const Color c1,
const Color c2 
)

void ColorBy ( const mol::EntityView ev,
const String prop,
const Gradient g 
)

void ColorBy ( const mol::EntityHandle eh,
const String prop,
const Color c1,
const Color c2,
float  minv,
float  maxv 
)

convenience method

void ColorBy ( const mol::EntityHandle eh,
const String prop,
const Gradient g,
float  minv,
float  maxv 
)

convenience method

void ColorBy ( const mol::EntityView ev,
const String prop,
const Color c1,
const Color c2,
float  minv,
float  maxv 
)

convenience method

virtual void ColorBy ( const mol::EntityView ev,
const String prop,
const Gradient g,
float  minv,
float  maxv 
) [virtual]

color each component based on the gradient-mapped property of the given entity

Reimplemented in Entity, and Surface.

virtual GfxNodeP Copy (  )  const [virtual]

Reimplemented from GfxNode.

virtual void CustomPreRenderGL ( bool  flag  )  [protected, virtual]

Reimplemented in Entity, MapIso, MapSlab, PrimList, and Surface.

virtual void CustomRenderGL ( RenderPass  pass  )  [virtual]

Reimplemented in Entity, GfxTestObj, MapIso, MapSlab, PrimList, and Surface.

virtual void CustomRenderPov ( PovState pov  )  [virtual]

Reimplemented in Entity, MapIso, MapSlab, PrimList, and Surface.

void Debug ( unsigned int  flags  )  [inline]

Definition at line 259 of file gfx_object.hh.

virtual void DeepSwap ( GfxObj go  )  [virtual]

static Color Ele2Color ( const String ele  )  [static]

void FlagRebuild (  ) 

void FlagRefresh (  ) 

bool GetAALines (  )  const

unsigned int GetArcDetail (  )  const

virtual geom::AlignedCuboid GetBoundingBox (  )  const [virtual]

returns the left-bottom-front and the right-top-back corner that encompasses all graphical elements in this object

the bounding box is in local coordinates. to obtain the coordinates in the scene, multiply the bounding box by the object's transformation matrix.

Reimplemented in Entity, GfxTestObj, MapIso, MapSlab, and Surface.

virtual geom::Vec3 GetCenter (  )  const [virtual]

Reimplemented in GfxTestObj, MapIso, MapSlab, and PrimList.

float GetLineHalo (  )  const

float GetLineWidth (  )  const

get line width

Material GetMaterial (  )  const

float GetNormalSmoothFactor (  )  const

float GetOpacity (  )  const

unsigned int GetPolyMode (  )  const

RenderMode::Type GetRenderMode (  )  const

current render mode

unsigned int GetSphereDetail (  )  const

unsigned int GetSplineDetail (  )  const

const mol::Transform& GetTF (  )  const

get transform

virtual int GetType (  )  const [virtual]

Reimplemented from GfxNode.

void GLCleanup (  ) 

virtual void OnGLCleanup (  )  [virtual]

virtual void OnInput ( const InputEvent e  )  [virtual]

Reimplemented in MapIso.

virtual void OnRenderModeChange (  )  [virtual]

Reimplemented in Entity, MapIso, PrimList, and Surface.

virtual bool OnSelect ( const geom::Line3 l,
geom::Vec3 result,
float  zlim,
bool  pick_flag 
) [virtual]

Reimplemented in Entity.

void PreRenderGL ( bool  flag  )  [protected]

virtual void ProcessLimits ( geom::Vec3 minc,
geom::Vec3 maxc,
const mol::Transform tf 
) const [virtual]

adjust the given limits according to the represented data

Reimplemented in Entity, and PrimList.

void ReapplyColorOps (  )  [protected]

Reimplemented in Entity, and Surface.

virtual void RefreshVA (  )  [inline, protected, virtual]

Reimplemented in Entity.

Definition at line 268 of file gfx_object.hh.

void RefreshVA ( IndexedVertexArray va  )  [protected]

virtual void RenderGL ( RenderPass  pass  )  [virtual]

Reimplemented from GfxNode.

virtual void RenderPov ( PovState pov  )  [virtual]

Reimplemented from GfxNode.

void SetAALines ( bool  f  ) 

void SetArcDetail ( unsigned int  d  ) 

void SetLineHalo ( float  f  ) 

void SetLineWidth ( float  w  ) 

set line width

void SetMat ( float  amb,
float  diff,
float  spec,
float  shin 
)

void SetMat ( const Color amb,
const Color diff,
const Color spec,
float  shin 
)

void SetMatAmb ( float  c  ) 

void SetMatAmb ( const Color c  ) 

void SetMatDiff ( float  c  ) 

void SetMatDiff ( const Color c  ) 

void SetMatEmm ( float  c  ) 

void SetMatEmm ( const Color c  ) 

void SetMaterial ( const Material m  ) 

void SetMatShin ( float  s  ) 

void SetMatSpec ( float  c  ) 

void SetMatSpec ( const Color c  ) 

void SetNormalSmoothFactor ( float  smoothf  ) 

void SetOpacity ( float  o  ) 

void SetOutlineExpandColor ( const Color c  ) 

void SetOutlineExpandFactor ( float  f  ) 

void SetOutlineMode ( int  m  ) 

void SetPolyMode ( unsigned int  m  ) 

virtual void SetRenderMode ( RenderMode::Type  m  )  [virtual]

change render mode

Reimplemented in Entity.

void SetSphereDetail ( unsigned int  d  ) 

void SetSplineDetail ( unsigned int  d  ) 

void SetTF ( const mol::Transform tf  ) 

set transform

void SmoothVertices ( float  smoothf  ) 


Field Documentation

unsigned int debug_flags_ [protected]

Definition at line 281 of file gfx_object.hh.

Definition at line 280 of file gfx_object.hh.

IndexedVertexArray va_ [protected]

Definition at line 279 of file gfx_object.hh.


The documentation for this class was generated from the following file:

Generated on Fri Jul 2 14:23:06 2010 for OpenStructure by  doxygen 1.5.8