|
Revision 13041, 1.1 kB
(checked in by robert, 14 months 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 | |
|---|
| 10 | using namespace osg; |
|---|
| 11 | using namespace osgDB; |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | bool Projection_readLocalData(Object& obj, Input& fr); |
|---|
| 15 | bool Projection_writeLocalData(const Object& obj, Output& fw); |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | REGISTER_DOTOSGWRAPPER(Projection) |
|---|
| 19 | ( |
|---|
| 20 | new osg::Projection, |
|---|
| 21 | "Projection", |
|---|
| 22 | "Object Node Group Projection", |
|---|
| 23 | &Projection_readLocalData, |
|---|
| 24 | &Projection_writeLocalData |
|---|
| 25 | ); |
|---|
| 26 | |
|---|
| 27 | bool 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 | |
|---|
| 43 | bool 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 | } |
|---|