root/OpenSceneGraph/trunk/src/osgWrappers/deprecated-dotosg/osg/Projection.cpp @ 13041

Revision 13041, 1.1 kB (checked in by robert, 2 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#include <osg/Projection>
2#include <osg/Matrix>
3
4#include "osgDB/Registry"
5#include "osgDB/Input"
6#include "osgDB/Output"
7
8#include "Matrix.h"
9
10using namespace osg;
11using namespace osgDB;
12
13// forward declare functions to use later.
14bool Projection_readLocalData(Object& obj, Input& fr);
15bool Projection_writeLocalData(const Object& obj, Output& fw);
16
17// register the read and write functions with the osgDB::Registry.
18REGISTER_DOTOSGWRAPPER(Projection)
19(
20    new osg::Projection,
21    "Projection",
22    "Object Node Group Projection",
23    &Projection_readLocalData,
24    &Projection_writeLocalData
25);
26
27bool Projection_readLocalData(Object& obj, Input& fr)
28{
29    Projection &myobj = static_cast<Projection &>(obj);
30    bool iteratorAdvanced = false;
31
32    Matrix matrix;
33    if (readMatrix(matrix,fr))
34    {
35        myobj.setMatrix(matrix);
36        iteratorAdvanced = true;
37    }
38
39    return iteratorAdvanced;
40}
41
42
43bool Projection_writeLocalData(const Object& obj, Output& fw)
44{
45    const Projection& myobj = static_cast<const Projection&>(obj);
46
47    writeMatrix(myobj.getMatrix(),fw);
48
49    return true;
50}
Note: See TracBrowser for help on using the browser.