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)
unsigned int GetTexture ()
 Get the uploaded texture ID - call Upload() first.
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.

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

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 52 of file PixelPrimitive.cpp.

PixelPrimitive::~PixelPrimitive (  )  [virtual]

Definition at line 62 of file PixelPrimitive.cpp.


Member Function Documentation

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

Implements Fluxus::Primitive.

Definition at line 70 of file PixelPrimitive.cpp.

void PixelPrimitive::Render (  )  [virtual]

Implements Fluxus::Primitive.

Definition at line 103 of file PixelPrimitive.cpp.

dBoundingBox PixelPrimitive::GetBoundingBox (  )  [virtual]

Implements Fluxus::Primitive.

Definition at line 121 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 131 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.

void PixelPrimitive::Upload (  ) 

Upload the texture to the graphics card.

Definition at line 81 of file PixelPrimitive.cpp.

void PixelPrimitive::Load ( const string &  filename  ) 

Load a png file into this primitive

Todo:
add a save too

Definition at line 94 of file PixelPrimitive.cpp.

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

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

Definition at line 57 of file PixelPrimitive.h.

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

Called when a named pdata mapping changes.

Implements Fluxus::PDataContainer.

Definition at line 75 of file PixelPrimitive.cpp.


Field Documentation

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

Definition at line 63 of file PixelPrimitive.h.

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

Definition at line 64 of file PixelPrimitive.h.

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

Definition at line 66 of file PixelPrimitive.h.

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

Definition at line 68 of file PixelPrimitive.h.

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

Definition at line 69 of file PixelPrimitive.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 11 06:54:50 2008 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1