Public Member Functions | |
MatrixArray (const MatrixArray &) | |
MatrixArray (const Matrix4 &object, const Matrix4 &camera, const Matrix4 &projection, const Matrix4 &format) | |
int | num_matrices () const |
const Matrix4 & | object_matrix () const |
void | set_object_matrix (const Matrix4 &m) |
const Matrix4 & | camera_matrix () const |
void | set_camera_matrix (const Matrix4 &m) |
const Matrix4 & | projection_matrix () const |
void | set_projection_matrix (const Matrix4 &m) |
void | set_format_matrix (const Matrix4 &m) |
const Matrix4 & | format_matrix () const |
const Matrix4 & | matrix (int n) |
const Matrix4 & | matrix (int from, int to) |
const Matrix4 & | inverse_matrix (int n) |
const Matrix4 & | inverse_matrix (int from, int to) |
const Matrix4 & | operator[] (int n) |
void | reset () |
void | calculate_all_now () |
void | print_info (const char *title) |
void MatrixArray::set_object_matrix | ( | const Matrix4 & | m | ) |
Update the transform matrix array with a new object matrix. The matrices that are dependant upon it are marked invalid.
Referenced by DD::Image::GeoInfo::draw(), DD::Image::Scene::evaluate_lights(), and DD::Image::Scene::validate().
void MatrixArray::set_camera_matrix | ( | const Matrix4 & | m | ) |
Update the transform matrix array with a new camera matrix. The matrices that are dependant upon it are marked invalid.
Referenced by DD::Image::Render::_validate(), and DD::Image::Scene::evaluate_lights().
void MatrixArray::set_projection_matrix | ( | const Matrix4 & | m | ) |
Update the transform matrix array with a new projection matrix. The matrices that are dependant upon it are marked invalid.
Referenced by DD::Image::Render::_validate(), and DD::Image::Scene::evaluate_lights().
void MatrixArray::set_format_matrix | ( | const Matrix4 & | m | ) |
Update the transform matrix array with a new format matrix. The matrices that are dependant upon it are marked invalid.
Referenced by DD::Image::Render::_validate(), and DD::Image::Scene::evaluate_lights().
const Matrix4 & MatrixArray::matrix | ( | int | n | ) |
Return the 4x4 matrix at entry 'n'. Check if it's been calculated yet(validated.) If not, call matrix() on the dependency matrix until we can return a result (a dependency matrix may in turn have a dependency it must also resolve, so this can be a recursive call.)
References DD::Image::CLIP_SPACE, DD::Image::EYE_SPACE, DD::Image::Matrix4::inverse(), and DD::Image::WORLD_SPACE.
Referenced by DD::Image::rPoint::add_to_render(), calculate_all_now(), DD::Image::MBParticleSpriteGenerator::getSprite(), and DD::Image::Scene::validate().
void MatrixArray::reset | ( | ) |
Reset all matrices to their identity.
Referenced by DD::Image::Scene::Scene().
void MatrixArray::calculate_all_now | ( | ) |
Calculate all invalid matrices for testing purposes. Only use this for testing as it will calculate all the inverses!
References DD::Image::LOCAL_SPACE, matrix(), and DD::Image::SCREEN_SPACE.
©2009 The Foundry Visionmongers, Ltd. All Rights Reserved. |