Fluxus::PixelPrimitive Class Reference

#include <PixelPrimitive.h>

Inheritance diagram for Fluxus::PixelPrimitive:

Inheritance graph
[legend]
Collaboration diagram for Fluxus::PixelPrimitive:

Collaboration graph
[legend]

Public Member Functions

 PixelPrimitive (unsigned int w, unsigned int h)
 PixelPrimitive (const PixelPrimitive &other)
virtual ~PixelPrimitive ()
void Upload ()
 Upload the texture to the graphics card.
void Load (const string &filename)
 Load a png file into this primitive.
void Save (const string &filename) const
 Save to a png file.
unsigned int GetTexture ()
 Get the uploaded texture ID - call Upload() first.
unsigned int GetWidth ()
 Get the width.
unsigned int GetHeight ()
 Get the height.
Primitive Interface
virtual PixelPrimitiveClone () const
virtual void Render ()
virtual dBoundingBox GetBoundingBox ()
virtual void RecalculateNormals (bool smooth)
 Only makes sense for certain primitive types.
virtual void ApplyTransform (bool ScaleRotOnly=false)
virtual string GetTypeName ()
 This needs to be set appropriately for all derived types.
virtual EvaluatorMakeEvaluator ()

Protected Member Functions

virtual void PDataDirty ()
 Called when a named pdata mapping changes.

Protected Attributes

vector< dVectorm_Points
vector< dColour > * m_ColourData
unsigned int m_Texture
unsigned int m_Width
unsigned int m_Height
bool m_ReadyForUpload

Detailed Description

A pixel primitive - this allows you to make procedural textures, as the pixel values are accessable as pdata in this primitive. The resulting texture can then be uploaded and applied to other primitives.

Definition at line 31 of file PixelPrimitive.h.


Constructor & Destructor Documentation

PixelPrimitive::PixelPrimitive ( unsigned int  w,
unsigned int  h 
)

Definition at line 26 of file PixelPrimitive.cpp.

PixelPrimitive::PixelPrimitive ( const PixelPrimitive other  ) 

Definition at line 53 of file PixelPrimitive.cpp.

PixelPrimitive::~PixelPrimitive (  )  [virtual]

Definition at line 64 of file PixelPrimitive.cpp.


Member Function Documentation

PixelPrimitive * PixelPrimitive::Clone (  )  const [virtual]

Implements Fluxus::Primitive.

Definition at line 72 of file PixelPrimitive.cpp.

void PixelPrimitive::Render (  )  [virtual]

Implements Fluxus::Primitive.

Definition at line 106 of file PixelPrimitive.cpp.

dBoundingBox PixelPrimitive::GetBoundingBox (  )  [virtual]

Implements Fluxus::Primitive.

Definition at line 140 of file PixelPrimitive.cpp.

virtual void Fluxus::PixelPrimitive::RecalculateNormals ( bool  smooth  )  [inline, virtual]

Only makes sense for certain primitive types.

Reimplemented from Fluxus::Primitive.

Definition at line 44 of file PixelPrimitive.h.

void PixelPrimitive::ApplyTransform ( bool  ScaleRotOnly = false  )  [virtual]

Implements Fluxus::Primitive.

Definition at line 150 of file PixelPrimitive.cpp.

virtual string Fluxus::PixelPrimitive::GetTypeName (  )  [inline, virtual]

This needs to be set appropriately for all derived types.

Reimplemented from Fluxus::Primitive.

Definition at line 46 of file PixelPrimitive.h.

virtual Evaluator* Fluxus::PixelPrimitive::MakeEvaluator (  )  [inline, virtual]

Implements Fluxus::Primitive.

Definition at line 47 of file PixelPrimitive.h.

void PixelPrimitive::Upload (  ) 

Upload the texture to the graphics card.

Definition at line 83 of file PixelPrimitive.cpp.

void PixelPrimitive::Load ( const string &  filename  ) 

Load a png file into this primitive.

Definition at line 88 of file PixelPrimitive.cpp.

void PixelPrimitive::Save ( const string &  filename  )  const

Save to a png file.

Definition at line 97 of file PixelPrimitive.cpp.

unsigned int Fluxus::PixelPrimitive::GetTexture (  )  [inline]

Get the uploaded texture ID - call Upload() first.

Definition at line 60 of file PixelPrimitive.h.

unsigned int Fluxus::PixelPrimitive::GetWidth (  )  [inline]

Get the width.

Definition at line 63 of file PixelPrimitive.h.

unsigned int Fluxus::PixelPrimitive::GetHeight (  )  [inline]

Get the height.

Definition at line 66 of file PixelPrimitive.h.

void PixelPrimitive::PDataDirty (  )  [protected, virtual]

Called when a named pdata mapping changes.

Implements Fluxus::PDataContainer.

Definition at line 77 of file PixelPrimitive.cpp.


Field Documentation

vector<dVector> Fluxus::PixelPrimitive::m_Points [protected]

Definition at line 72 of file PixelPrimitive.h.

vector<dColour>* Fluxus::PixelPrimitive::m_ColourData [protected]

Definition at line 73 of file PixelPrimitive.h.

unsigned int Fluxus::PixelPrimitive::m_Texture [protected]

Definition at line 75 of file PixelPrimitive.h.

unsigned int Fluxus::PixelPrimitive::m_Width [protected]

Definition at line 77 of file PixelPrimitive.h.

unsigned int Fluxus::PixelPrimitive::m_Height [protected]

Definition at line 78 of file PixelPrimitive.h.

bool Fluxus::PixelPrimitive::m_ReadyForUpload [protected]

Definition at line 80 of file PixelPrimitive.h.


The documentation for this class was generated from the following files:
Generated on Wed Sep 17 21:16:51 2008 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1