25 #include <osg/Matrixd> 28 #define MatrixImpl Matrixd 68 void Matrixd::MakeOrtho(
float left,
float right,
float bottom,
float top,
float zNear,
float zFar)
70 mMatrix.makeOrtho(left, right, bottom, top, zNear, zFar);
74 bool Matrixd::GetOrtho(
float& left,
float& right,
float& bottom,
float& top,
float& zNear,
float& zFar)
const 76 return mMatrix.getOrtho(left, right, bottom, top, zNear, zFar);
82 mMatrix.makeOrtho(left, right, bottom, top, -1.0, 1.0);
88 mMatrix.makeFrustum(left, right, bottom, top, zNear, zFar);
92 bool Matrixd::GetFrustum(
float& left,
float& right,
float& bottom,
float& top,
float& zNear,
float& zFar)
const 94 return mMatrix.getFrustum(left, right, bottom, top, zNear, zFar);
100 mMatrix.makePerspective(fovy, aspectRatio, zNear, zFar);
106 return mMatrix.getPerspective(fovy, aspectRatio, zNear, zFar);
113 m.
MakeOrtho(left, right, bottom, top, zNear, zFar);
129 m.
MakeFrustum(left, right, bottom, top, zNear, zFar);
Matrixd & operator=(const Matrixd &rhs)
Set operator.
bool GetOrtho(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
Get the orthographic settings of the orthographic projection matrix.
void MakeOrtho2D(double left, double right, double bottom, double top)
Set to a 2D orthographic projection.
A float Matrix class to be used for generic matrix operations.
void MakePerspective(double fovy, double aspectRatio, double zNear, double zFar)
Set to a symmetrical perspective projection.
bool GetPerspective(double &fovy, double &aspectRatio, double &zNear, double &zFar) const
Get the frustum settings of a symmetric perspective projection matrix.
static Matrixd Perspective(float fovy, float aspectRatio, float zNear, float zFar)
Create a symmetrical perspective projection matrix.
void Set(const Matrixd &rhs)
Set the current Matrix from a passed in one.
static Matrixd Frustum(double left, double right, double bottom, double top, double zNear, double zFar)
Create a perspective projection matrix.
void MakeOrtho(double left, double right, double bottom, double top, double zNear, double zFar)
Set to an orthographic projection.
A float Matrix class to be used for generic matrix operations.
value_type * Ptr()
Pointer to the internal Matrix array.
static Matrixd Ortho(double left, double right, double bottom, double top, double zNear, double zFar)
Create an orthographic projection matrix.
static Matrixd Ortho2D(double left, double right, double bottom, double top)
Create a 2D orthographic projection matrix.
void MakeFrustum(double left, double right, double bottom, double top, double zNear, double zFar)
Set to a perspective projection.
bool GetFrustum(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
Get the frustum settings of a perspective projection matrix.