OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions
Primitive Class Reference

#include <primitives.hh>

Inherits GfxNode.

Inherited by Cuboid, and Quad.

Public Member Functions

void SetFill (const Color &color, bool fill=true)
 
void SetOutline (const Color &color, bool line=true, float width=1.0)
 
void SetFillColor (const Color &color)
 
void SetOutlineColor (const Color &color)
 
const ColorGetFillColor () const
 
const ColorGetOutlineColor () const
 
bool HasFill () const
 
bool HasOutline () const
 
float GetLineWidth () const
 
void SetLineWidth (float width)
 
- Public Member Functions inherited from GfxNode
 GfxNode (const String &name)
 
virtual ~GfxNode ()
 
virtual GfxNodeP Copy () const
 
virtual void DeepSwap (GfxNode &n)
 
virtual void RenderGL (RenderPass pass)
 
virtual void RenderPov (PovState &pov)
 
virtual void Export (Exporter *ex)
 
virtual void Apply (GfxNodeVisitor &v, GfxNodeVisitor::Stack st)
 
virtual int GetType () const
 
String GetName () const
 
void RemoveAll ()
 
void Rename (const String &name)
 
void Add (GfxObjP obj)
 
bool IsNameAvailable (const String &name) const
 
void Remove (GfxObjP obj)
 
void Add (GfxNodeP node)
 
void Remove (GfxNodeP node)
 
void Remove (const String &name)
 
size_t GetChildCount () const
 
void Hide ()
 
void Show ()
 
bool IsVisible () const
 
virtual void ContextSwitch ()
 
bool IsAttachedToScene () const
 
gfx::GfxNodeP GetParent () const
 
const GfxNodeVectorGetChildren () const
 
GfxNodeVectorGetChildren ()
 

Protected Member Functions

 Primitive (const String &name)
 

Detailed Description

base class for geometric primitives such as cuboids, and circles

The geometric primitives support rendering in both outline and solid mode. These properties are controllable with SetFill() and SetOutline() as well as SetFillColor() and SetOutlineColor(). The line width can be adjusted with SetLineWidth().

See Also
gfx::Cuboid, gfx::Quad
Todo:
transparent primitives would require the gfx objects to be ordered back to front. This has to be properly implemented in the rendering system.

Definition at line 43 of file primitives.hh.

Constructor & Destructor Documentation

Primitive ( const String name)
protected

Member Function Documentation

const Color& GetFillColor ( ) const
float GetLineWidth ( ) const
const Color& GetOutlineColor ( ) const
bool HasFill ( ) const
bool HasOutline ( ) const
void SetFill ( const Color color,
bool  fill = true 
)
void SetFillColor ( const Color color)
void SetLineWidth ( float  width)
void SetOutline ( const Color color,
bool  line = true,
float  width = 1.0 
)
void SetOutlineColor ( const Color color)

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