root/OpenSceneGraph/trunk/include/osg/Projection @ 13041

Revision 13041, 1.6 kB (checked in by robert, 3 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSG_PROJECTION
15#define OSG_PROJECTION 1
16
17#include <osg/Group>
18#include <osg/Matrix>
19
20namespace osg {
21
22/** Projection nodes set up the frustum/orthographic projection used when rendering the scene.
23*/
24class OSG_EXPORT Projection : public Group
25{
26    public :
27
28
29        Projection();
30
31        /** Copy constructor using CopyOp to manage deep vs shallow copy.*/
32        Projection(const Projection&,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
33
34        Projection(const Matrix& matix);
35
36        META_Node(osg, Projection);
37
38        /** Set the transform's matrix.*/
39        void setMatrix(const Matrix& mat) { _matrix = mat; }
40
41        /** Get the transform's matrix. */
42        inline const Matrix& getMatrix() const { return _matrix; }
43
44        /** preMult transform.*/
45        void preMult(const Matrix& mat) { _matrix.preMult(mat); }
46
47        /** postMult transform.*/
48        void postMult(const Matrix& mat)  { _matrix.postMult(mat); }
49
50
51    protected :
52
53        virtual ~Projection();
54
55        Matrix  _matrix;
56
57};
58
59}
60
61#endif
Note: See TracBrowser for help on using the browser.