OpenSceneGraph/include/osg/Projection
Robert Osfield f36bc69c58 Made the more of the OSG's referenced object desctructors protected to ensure
that they arn't created on the stack inappropriately.

Split the implemention of Matrix up so that it is a simple no referenced counted
class and can be safefly created on the stack.  To support referenced counting a
seperate subclass now exists, this is RefMatrix which inherits from both Matrix and
Object.
2003-01-10 09:25:42 +00:00

53 lines
1.3 KiB
Plaintext

//C++ header - Open Scene Graph - Copyright (C) 1998-2002 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(osg, 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();
Matrix _matrix;
};
}
#endif