OpenSceneGraph/include/osg/Projection
Robert Osfield 3351306d80 Added new osg::Projection node, and osgUtil::NewCullVisitor which are work
in progress for the new support for controlling the projection matrix from
within the scene graph.

Also Added osg::State::getClippingVolume(), getProjectionMatrix() and
getModelViewMatrix() with allows drawables to access the current projection,
and model view matrices and the view frustum in local coords to the drawable.
2002-03-31 16:40:44 +00:00

53 lines
1.3 KiB
Plaintext

//C++ header - Open Scene Graph - Copyright (C) 1998-2001 Robert Osfield
//Distributed under the terms of the GNU Library General Public License (LGPL)
//as published by the Free Software Foundation.
#ifndef OSG_PROJECTION
#define OSG_PROJECTION 1
#include <osg/Group>
#include <osg/Matrix>
namespace osg {
/** Projection nodes set up the frustum/orthographic projection used when rendering the scene .
*/
class SG_EXPORT Projection : public Group
{
public :
Projection();
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
Projection(const Projection&,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
Projection(const Matrix& matix);
META_Node(Projection);
/** Set the transform's matrix.*/
void setMatrix(const Matrix& mat) { (*_matrix) = mat; }
/** Get the transform's matrix. */
inline const Matrix& getMatrix() const { return *_matrix; }
/** preMult transform.*/
void preMult(const Matrix& mat) { _matrix->preMult(mat); }
/** postMult transform.*/
void postMult(const Matrix& mat) { _matrix->postMult(mat); }
protected :
virtual ~Projection();
ref_ptr<Matrix> _matrix;
};
}
#endif