25 #include <osg/Matrixf> 28 #define MatrixImpl Matrixf 68 void Matrixf::MakeOrtho(
double left,
double right,
double bottom,
double top,
double zNear,
double zFar)
70 mMatrix.makeOrtho(left, right, bottom, top, zNear, zFar);
74 bool Matrixf::GetOrtho(
double& left,
double& right,
double& bottom,
double& top,
double& zNear,
double& 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 Matrixf::GetFrustum(
double& left,
double& right,
double& bottom,
double& top,
double& zNear,
double& 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);
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 MakeOrtho(double left, double right, double bottom, double top, double zNear, double zFar)
Set to an orthographic projection.
void MakePerspective(double fovy, double aspectRatio, double zNear, double zFar)
Set to a symmetrical perspective projection.
A float Matrix class to be used for generic matrix operations.
Matrixf & operator=(const Matrixf &rhs)
Set operator.
void MakeOrtho2D(double left, double right, double bottom, double top)
Set to a 2D orthographic 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.
A float Matrix class to be used for generic matrix operations.
bool GetPerspective(double &fovy, double &aspectRatio, double &zNear, double &zFar) const
Get the frustum settings of a symmetric perspective projection matrix.
static Matrixf Ortho(double left, double right, double bottom, double top, double zNear, double zFar)
Create an orthographic projection matrix.
static Matrixf Perspective(float fovy, float aspectRatio, float zNear, float zFar)
Create a symmetrical perspective projection matrix.
void Set(const Matrixf &rhs)
Set the current Matrix from a passed in one.
void MakeFrustum(double left, double right, double bottom, double top, double zNear, double zFar)
Set to a perspective projection.
static Matrixf Frustum(double left, double right, double bottom, double top, double zNear, double zFar)
Create a perspective projection matrix.
static Matrixf Ortho2D(double left, double right, double bottom, double top)
Create a 2D orthographic projection matrix.
value_type * Ptr()
Pointer to the internal Matrix array.