openscenegraph
|
#include <Matrixd>
Public Types | |
typedef double | value_type |
typedef float | other_value_type |
Protected Attributes | |
value_type | _mat [4][4] |
|
inline |
Referenced by rotate().
osg::Matrixd::Matrixd | ( | value_type | a00, |
value_type | a01, | ||
value_type | a02, | ||
value_type | a03, | ||
value_type | a10, | ||
value_type | a11, | ||
value_type | a12, | ||
value_type | a13, | ||
value_type | a20, | ||
value_type | a21, | ||
value_type | a22, | ||
value_type | a23, | ||
value_type | a30, | ||
value_type | a31, | ||
value_type | a32, | ||
value_type | a33 | ||
) |
|
inline |
void osg::Matrixd::decompose | ( | osg::Vec3d & | translation, |
osg::Quat & | rotation, | ||
osg::Vec3d & | scale, | ||
osg::Quat & | so | ||
) | const |
decompose the matrix into translation, rotation, scale and scale orientation.
void osg::Matrixd::decompose | ( | osg::Vec3f & | translation, |
osg::Quat & | rotation, | ||
osg::Vec3f & | scale, | ||
osg::Quat & | so | ||
) | const |
decompose the matrix into translation, rotation, scale and scale orientation.
|
inlinestatic |
Create a perspective projection. See glFrustum for further details.
References makeFrustum(), and set().
bool osg::Matrixd::getFrustum | ( | double & | left, |
double & | right, | ||
double & | bottom, | ||
double & | top, | ||
double & | zNear, | ||
double & | zFar | ||
) | const |
Get the frustum settings of a perspective projection matrix. Note, if matrix is not a perspective matrix then invalid values will be returned.
bool osg::Matrixd::getFrustum | ( | float & | left, |
float & | right, | ||
float & | bottom, | ||
float & | top, | ||
float & | zNear, | ||
float & | zFar | ||
) | const |
float version of getFrustum(..)
void osg::Matrixd::getLookAt | ( | Vec3d & | eye, |
Vec3d & | center, | ||
Vec3d & | up, | ||
value_type | lookDistance = 1.0f |
||
) | const |
Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt.
void osg::Matrixd::getLookAt | ( | Vec3f & | eye, |
Vec3f & | center, | ||
Vec3f & | up, | ||
value_type | lookDistance = 1.0f |
||
) | const |
Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt.
Referenced by osgManipulator::PointerInfo::setCamera().
bool osg::Matrixd::getOrtho | ( | double & | left, |
double & | right, | ||
double & | bottom, | ||
double & | top, | ||
double & | zNear, | ||
double & | zFar | ||
) | const |
Get the orthographic settings of the orthographic projection matrix. Note, if matrix is not an orthographic matrix then invalid values will be returned.
bool osg::Matrixd::getOrtho | ( | float & | left, |
float & | right, | ||
float & | bottom, | ||
float & | top, | ||
float & | zNear, | ||
float & | zFar | ||
) | const |
float version of getOrtho(..)
bool osg::Matrixd::getPerspective | ( | double & | fovy, |
double & | aspectRatio, | ||
double & | zNear, | ||
double & | zFar | ||
) | const |
Get the frustum settings of a symmetric perspective projection matrix. Return false if matrix is not a perspective matrix, where parameter values are undefined. Note, if matrix is not a symmetric perspective matrix then the shear will be lost. Asymmetric matrices occur when stereo, power walls, caves and reality center display are used. In these configuration one should use the AsFrustum method instead.
bool osg::Matrixd::getPerspective | ( | float & | fovy, |
float & | aspectRatio, | ||
float & | zNear, | ||
float & | zFar | ||
) | const |
float version of getPerspective(..)
Quat osg::Matrixd::getRotate | ( | ) | const |
Get the matrix rotation as a Quat. Note that this function assumes a non-scaled matrix and will return incorrect results for scaled matrixces. Consider decompose() instead.
|
inline |
References osg::Vec3d::length().
|
inline |
|
inlinestatic |
References makeIdentity(), and set().
Referenced by osg::View::addSlave(), and osgAnimation::RigTransformSoftware::VertexGroup::computeMatrixForVertexSet().
References invert(), and set().
Referenced by osgGA::AnimationPathManipulator::getInverseMatrix(), osgUtil::LineSegmentIntersector::Intersection::getWorldIntersectNormal(), osgUtil::RayIntersector::Intersection::getWorldIntersectNormal(), osgGA::DriveManipulator::setByInverseMatrix(), and osgGA::SphericalManipulator::setByInverseMatrix().
invert the matrix rhs, automatically select invert_4x3 or invert_4x4.
References _mat.
Referenced by osg::MatrixTransform::getInverseMatrix(), osgManipulator::Projector::getWorldToLocal(), inverse(), osgTerrain::Locator::setTransform(), osgVolume::Locator::setTransform(), osg::Plane::transform(), and osg::Polytope::transform().
4x3 matrix invert, not right hand column is assumed to be 0,0,0,1.
|
inline |
|
inline |
References osg::isNaN().
|
inlinestatic |
Create the position and orientation as per a camera, using the same convention as gluLookAt.
References makeLookAt(), and set().
|
inlinestatic |
Create the position and orientation as per a camera, using the same convention as gluLookAt.
References makeLookAt(), and set().
void osg::Matrixd::makeFrustum | ( | double | left, |
double | right, | ||
double | bottom, | ||
double | top, | ||
double | zNear, | ||
double | zFar | ||
) |
Set to a perspective projection. See glFrustum for further details.
Referenced by frustum().
void osg::Matrixd::makeIdentity | ( | ) |
void osg::Matrixd::makeOrtho | ( | double | left, |
double | right, | ||
double | bottom, | ||
double | top, | ||
double | zNear, | ||
double | zFar | ||
) |
Set to an orthographic projection. See glOrtho for further details.
Referenced by ortho().
Set to a 2D orthographic projection. See glOrtho2D for further details.
Referenced by ortho2D().
Set to a symmetrical perspective projection. See gluPerspective for further details. Aspect ratio is defined as width/height.
Referenced by perspective().
void osg::Matrixd::makeRotate | ( | value_type | angle, |
const Vec3d & | axis | ||
) |
void osg::Matrixd::makeRotate | ( | value_type | angle, |
const Vec3f & | axis | ||
) |
void osg::Matrixd::makeRotate | ( | value_type | angle, |
value_type | x, | ||
value_type | y, | ||
value_type | z | ||
) |
void osg::Matrixd::makeRotate | ( | value_type | angle1, |
const Vec3d & | axis1, | ||
value_type | angle2, | ||
const Vec3d & | axis2, | ||
value_type | angle3, | ||
const Vec3d & | axis3 | ||
) |
void osg::Matrixd::makeRotate | ( | value_type | angle1, |
const Vec3f & | axis1, | ||
value_type | angle2, | ||
const Vec3f & | axis2, | ||
value_type | angle3, | ||
const Vec3f & | axis3 | ||
) |
void osg::Matrixd::makeScale | ( | value_type | , |
value_type | , | ||
value_type | |||
) |
void osg::Matrixd::makeTranslate | ( | value_type | , |
value_type | , | ||
value_type | |||
) |
Referenced by operator*().
|
inline |
|
inline |
|
inline |
References mult().
|
inline |
References postMult().
|
inline |
References postMult().
|
inline |
References postMult().
|
inline |
References postMult().
|
inline |
|
inline |
|
inline |
References ptr().
Matrixd & osg::Matrixd::operator= | ( | const Matrixf & | other | ) |
|
inline |
|
inlinestatic |
Create an orthographic projection matrix. See glOrtho for further details.
References makeOrtho(), and set().
Create a 2D orthographic projection. See glOrtho for further details.
References makeOrtho2D(), and set().
References orthoNormalize(), and set().
ortho-normalize the 3x3 rotation & scale matrix
Referenced by orthoNormal().
|
inlinestatic |
Create a symmetrical perspective projection. See gluPerspective for further details. Aspect ratio is defined as width/height.
References makePerspective(), and set().
References _mat, set(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().
References _mat, set(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
Referenced by operator*(), operator*(), operator*(), operator*(), postMultRotate(), and osgManipulator::PointerInfo::setCamera().
References _mat, osg::Vec4d::w(), osg::Vec4d::x(), osg::Vec4d::y(), and osg::Vec4d::z().
References _mat, osg::Vec4f::w(), osg::Vec4f::x(), osg::Vec4f::y(), and osg::Vec4f::z().
Optimized version of postMult(rotate(q));
References postMult(), set(), and setRotate().
Optimized version of postMult(scale(v));
References _mat.
Referenced by osg::AnimationPath::ControlPoint::getInverse().
Optimized version of postMult(translate(v));
Referenced by osg::AnimationPath::ControlPoint::getMatrix().
References _mat, set(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().
References _mat, set(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
Referenced by osg::operator*(), osg::operator*(), osg::operator*(), osg::operator*(), preMultRotate(), osgParticle::ParticleProcessor::rotateLocalToWorld(), osgParticle::ParticleProcessor::rotateWorldToLocal(), osgParticle::Particle::transformAngleVelocity(), osgParticle::ParticleProcessor::transformLocalToWorld(), osgParticle::Particle::transformPositionVelocity(), osgParticle::Particle::transformPositionVelocity(), and osgParticle::ParticleProcessor::transformWorldToLocal().
References _mat, osg::Vec4d::w(), osg::Vec4d::x(), osg::Vec4d::y(), and osg::Vec4d::z().
References _mat, osg::Vec4f::w(), osg::Vec4f::x(), osg::Vec4f::y(), and osg::Vec4f::z().
Optimized version of preMult(rotate(q));
References preMult(), set(), and setRotate().
Optimized version of preMult(scale(v));
References _mat.
Referenced by osg::AnimationPath::ControlPoint::getMatrix().
Optimized version of preMult(translate(v));
Referenced by osg::AnimationPath::ControlPoint::getInverse().
|
inline |
Referenced by osgAnimation::RigTransformSoftware::VertexGroup::accummulateMatrix(), Matrixd(), operator=(), and set().
|
inline |
References makeRotate(), and set().
References makeRotate(), and set().
Referenced by osgManipulator::Rotate3DCommand::getMotionMatrix().
|
inlinestatic |
References makeRotate(), and set().
|
inlinestatic |
References makeRotate(), and set().
|
inlinestatic |
References makeRotate(), and set().
|
inlinestatic |
References makeRotate(), and set().
|
inlinestatic |
References makeRotate(), and set().
References scale(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().
References scale(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
Referenced by osg::Viewport::computeWindowMatrix(), osgManipulator::Scale1DCommand::getMotionMatrix(), osgManipulator::Scale2DCommand::getMotionMatrix(), osgManipulator::ScaleUniformCommand::getMotionMatrix(), scale(), and scale().
|
inlinestatic |
References makeScale(), and set().
|
inline |
Referenced by osg::CullStack::createOrReuseMatrix(), frustum(), identity(), inverse(), lookAt(), lookAt(), ortho(), ortho2D(), orthoNormal(), perspective(), postMult(), postMult(), postMultRotate(), postMultTranslate(), postMultTranslate(), preMult(), preMult(), preMultRotate(), preMultTranslate(), preMultTranslate(), rotate(), rotate(), rotate(), rotate(), rotate(), rotate(), rotate(), rotate(), scale(), set(), transform3x3(), transform3x3(), transform3x3(), transform3x3(), and translate().
void osg::Matrixd::set | ( | const Matrixf & | rhs | ) |
|
inline |
|
inline |
void osg::Matrixd::set | ( | value_type | a00, |
value_type | a01, | ||
value_type | a02, | ||
value_type | a03, | ||
value_type | a10, | ||
value_type | a11, | ||
value_type | a12, | ||
value_type | a13, | ||
value_type | a20, | ||
value_type | a21, | ||
value_type | a22, | ||
value_type | a23, | ||
value_type | a30, | ||
value_type | a31, | ||
value_type | a32, | ||
value_type | a33 | ||
) |
Referenced by postMultRotate(), and preMultRotate().
void osg::Matrixd::setTrans | ( | value_type | tx, |
value_type | ty, | ||
value_type | tz | ||
) |
apply a 3x3 transform of M[0..2,0..2]*v.
References set(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().
apply a 3x3 transform of M[0..2,0..2]*v.
References set(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
apply a 3x3 transform of v*M[0..2,0..2].
References set(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().
apply a 3x3 transform of v*M[0..2,0..2].
References set(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
Referenced by osgAnimation::RigTransformSoftware::computeNormal(), osgUtil::LineSegmentIntersector::Intersection::getWorldIntersectNormal(), osgUtil::RayIntersector::Intersection::getWorldIntersectNormal(), osgParticle::Particle::transformPositionVelocity(), and osgParticle::Particle::transformPositionVelocity().
References translate(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().
References translate(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
Referenced by osg::Viewport::computeWindowMatrix(), osgManipulator::TranslateInLineCommand::getMotionMatrix(), osgManipulator::TranslateInPlaneCommand::getMotionMatrix(), osgManipulator::Scale1DCommand::getMotionMatrix(), osgManipulator::Scale2DCommand::getMotionMatrix(), osgManipulator::ScaleUniformCommand::getMotionMatrix(), translate(), and translate().
|
inlinestatic |
References makeTranslate(), and set().
|
inline |
References osg::isNaN().
|
protected |