Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::PhysicalComponents::Projection Class Reference

Areas that need projection matrix. More...

#include <Projection.h>

Inheritance diagram for Teddy::PhysicalComponents::Projection:

Inheritance graph
[legend]
Collaboration diagram for Teddy::PhysicalComponents::Projection:

Collaboration graph
[legend]
List of all members.

Public Methods

 Projection (const std::string &name, Camera *camera)
 Constructor. More...

virtual ~Projection ()
 Destructor. More...

void setProjectionMatrix ()
void setProjectionMatrix (Matrix &m)
void setModelViewMatrix ()
void setModelViewMatrix (Matrix &m)
Model * pick (const Vector2 &pos)
float getRatio ()
virtual AreagetHit (const Vector2 &pos)
 Area Input Interface - Get Hit Area, NULL if none. More...

virtual void drawSelf ()
 Drawing code. More...

Material * getMaster ()
Options & getSelect ()
void setSelect (unsigned long select)
void enableSelect (unsigned long select)
void disableSelect (unsigned long select)
void setClearColor (Color c)
Color getClearColor ()
Camera * getCamera ()
 Camera get accessor. More...

void setCamera (Camera *c=NULL)
 Camera set accessor. More...

void doMaterial (Material *m)
 Apply Material to Projection. More...

void materialReapplyActive ()
 Apply material. More...

bool materialPass ()
 Apply single material application pass. More...

void pickState (const bool state)
 Enable and or disable pick mode. More...

void applyFillOutline ()
void applyRemoveHidden ()
void applyFrustumCull ()
void applySortInstances ()
void applySortElements ()

Static Public Attributes

int material_skip_count = 0

Protected Attributes

Camera * camera
Material * active_material
Texture * active_texture
Areaframe
Material * master_material
Uint8 render_pass
Uint8 render_pass_count
Options render_options_selection_mask
Color clear_color

Detailed Description

Areas that need projection matrix.

Each projection area maintains it own rendering preferences. Those are independent of potential Material properties of ModelInstances which can be viewed in the Projection area.

While some of the projection properties are default values, which can be overridden by material properties, others may override any material properties. For example, if projection is set to use wireframe rendering, no material property can override this - all modelinstances are drawn in wireframe mode.

Projection is responsible for implementing and applying Material properties.

Definition at line 70 of file Projection.h.


Constructor & Destructor Documentation

Teddy::PhysicalComponents::Projection::Projection const std::string &    name,
Camera *    camera
 

Constructor.

Definition at line 49 of file Projection.cpp.

References active_material, active_texture, clear_color, Teddy::PhysicalComponents::Area::drawing_ordering, Teddy::PhysicalComponents::Area::fill_free_size_relative, master_material, Teddy::MixIn::Options::options, render_pass_count, Teddy::PhysicalComponents::Area::separate_self, setSelect, and Vector2.

Teddy::PhysicalComponents::Projection::~Projection   [virtual]
 

Destructor.

Definition at line 74 of file Projection.cpp.


Member Function Documentation

void Teddy::PhysicalComponents::Projection::applyFillOutline  
 

void Teddy::PhysicalComponents::Projection::applyFrustumCull  
 

void Teddy::PhysicalComponents::Projection::applyRemoveHidden  
 

void Teddy::PhysicalComponents::Projection::applySortElements  
 

void Teddy::PhysicalComponents::Projection::applySortInstances  
 

void Teddy::PhysicalComponents::Projection::disableSelect unsigned long    select
 

Todo:
doc

Definition at line 353 of file Projection.cpp.

References render_options_selection_mask.

void Teddy::PhysicalComponents::Projection::doMaterial Material *    m
 

Apply Material to Projection.

Definition at line 103 of file Projection.cpp.

References active_material, Teddy::SysSupport::dmsg, Teddy::MixIn::Options::isEnabled, Teddy::SysSupport::M_MAT, material_skip_count, materialReapplyActive, render_pass, and render_pass_count.

void Teddy::PhysicalComponents::Projection::drawSelf   [virtual]
 

Drawing code.

Reimplemented from Teddy::PhysicalComponents::Area.

Definition at line 278 of file Projection.cpp.

References active_material, camera, clear_color, Teddy::MixIn::Options::isEnabled, master_material, material_skip_count, Teddy::PhysicalComponents::Area::rect, render_options_selection_mask, Teddy::PhysicalComponents::Area::size, and Teddy::Graphics::ViewClient::view.

void Teddy::PhysicalComponents::Projection::enableSelect unsigned long    select
 

Todo:
doc

Definition at line 347 of file Projection.cpp.

References render_options_selection_mask.

Camera * Teddy::PhysicalComponents::Projection::getCamera  
 

Camera get accessor.

Definition at line 323 of file Projection.cpp.

References camera.

Color Teddy::PhysicalComponents::Projection::getClearColor  
 

Todo:
doc

Definition at line 384 of file Projection.cpp.

References clear_color.

Area * Teddy::PhysicalComponents::Projection::getHit const Vector2 &    pos [virtual]
 

Area Input Interface - Get Hit Area, NULL if none.

Reimplemented from Teddy::PhysicalComponents::Area.

Definition at line 79 of file Projection.cpp.

References Teddy::SysSupport::dmsg, Teddy::SysSupport::M_WM, and Teddy::PhysicalComponents::Area::rect.

Material * Teddy::PhysicalComponents::Projection::getMaster  
 

Todo:
doc

Definition at line 372 of file Projection.cpp.

References master_material.

float Teddy::PhysicalComponents::Projection::getRatio  
 

Definition at line 421 of file Projection.cpp.

References Teddy::PhysicalComponents::Area::size.

Options & Teddy::PhysicalComponents::Projection::getSelect  
 

Todo:
doc

Definition at line 335 of file Projection.cpp.

References render_options_selection_mask.

bool Teddy::PhysicalComponents::Projection::materialPass  
 

Apply single material application pass.

Definition at line 187 of file Projection.cpp.

References active_material, active_texture, Teddy::MixIn::Options::isEnabled, master_material, MIN, render_options_selection_mask, render_pass, render_pass_count, and Teddy::Graphics::ViewClient::view.

void Teddy::PhysicalComponents::Projection::materialReapplyActive  
 

Apply material.

Definition at line 133 of file Projection.cpp.

References active_material, Teddy::SysSupport::dmsg, Teddy::MixIn::Options::enable, Teddy::SysSupport::M_MAT, master_material, MIN, render_options_selection_mask, render_pass_count, and Teddy::Graphics::ViewClient::view.

Referenced by doMaterial.

Model * Teddy::PhysicalComponents::Projection::pick const Vector2 &    pos
 

Todo:
doc

Definition at line 414 of file Projection.cpp.

References camera, and Teddy::Graphics::ViewClient::view.

void Teddy::PhysicalComponents::Projection::pickState const bool    state
 

Enable and or disable pick mode.

Definition at line 359 of file Projection.cpp.

References active_material, active_texture, Teddy::MixIn::Options::disable, and Teddy::MixIn::Options::enable.

void Teddy::PhysicalComponents::Projection::setCamera Camera *    c = NULL
 

Camera set accessor.

Definition at line 329 of file Projection.cpp.

References camera.

void Teddy::PhysicalComponents::Projection::setClearColor Color    c
 

Todo:
doc

Definition at line 378 of file Projection.cpp.

References clear_color.

void Teddy::PhysicalComponents::Projection::setModelViewMatrix Matrix &    m
 

Todo:
doc

Definition at line 408 of file Projection.cpp.

References Teddy::Graphics::ViewClient::view.

void Teddy::PhysicalComponents::Projection::setModelViewMatrix  
 

Todo:
doc

Definition at line 402 of file Projection.cpp.

References Teddy::Graphics::ViewClient::view.

void Teddy::PhysicalComponents::Projection::setProjectionMatrix Matrix &    m
 

Todo:
doc

Definition at line 396 of file Projection.cpp.

References Teddy::Graphics::ViewClient::view.

void Teddy::PhysicalComponents::Projection::setProjectionMatrix  
 

Todo:
doc

Definition at line 390 of file Projection.cpp.

References Teddy::Graphics::ViewClient::view.

void Teddy::PhysicalComponents::Projection::setSelect unsigned long    select
 

Todo:
doc

Definition at line 341 of file Projection.cpp.

References render_options_selection_mask.

Referenced by Projection.


Member Data Documentation

Material* Teddy::PhysicalComponents::Projection::active_material [protected]
 

Definition at line 117 of file Projection.h.

Referenced by doMaterial, drawSelf, materialPass, materialReapplyActive, pickState, and Projection.

Texture* Teddy::PhysicalComponents::Projection::active_texture [protected]
 

Definition at line 118 of file Projection.h.

Referenced by materialPass, pickState, and Projection.

Camera* Teddy::PhysicalComponents::Projection::camera [protected]
 

Definition at line 116 of file Projection.h.

Referenced by drawSelf, getCamera, pick, and setCamera.

Color Teddy::PhysicalComponents::Projection::clear_color [protected]
 

Definition at line 124 of file Projection.h.

Referenced by drawSelf, getClearColor, Projection, and setClearColor.

Area* Teddy::PhysicalComponents::Projection::frame [protected]
 

Definition at line 119 of file Projection.h.

Material* Teddy::PhysicalComponents::Projection::master_material [protected]
 

Definition at line 120 of file Projection.h.

Referenced by drawSelf, getMaster, materialPass, materialReapplyActive, and Projection.

int Teddy::PhysicalComponents::Projection::material_skip_count = 0 [static]
 

Definition at line 45 of file Projection.cpp.

Referenced by doMaterial, and drawSelf.

Options Teddy::PhysicalComponents::Projection::render_options_selection_mask [protected]
 

Definition at line 123 of file Projection.h.

Referenced by disableSelect, drawSelf, enableSelect, getSelect, materialPass, materialReapplyActive, and setSelect.

Uint8 Teddy::PhysicalComponents::Projection::render_pass [protected]
 

Definition at line 121 of file Projection.h.

Referenced by doMaterial, and materialPass.

Uint8 Teddy::PhysicalComponents::Projection::render_pass_count [protected]
 

Definition at line 122 of file Projection.h.

Referenced by doMaterial, materialPass, materialReapplyActive, and Projection.


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