root/OpenSceneGraph/trunk/src/osgWrappers/deprecated-dotosg/osgVolume/SwitchProperty.cpp @ 13041

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

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
Line 
1#include <osgVolume/Property>
2
3#include <iostream>
4#include <string>
5
6#include <osg/Vec3>
7#include <osg/Vec4>
8#include <osg/io_utils>
9
10#include <osgDB/ReadFile>
11#include <osgDB/Registry>
12#include <osgDB/Input>
13#include <osgDB/Output>
14#include <osgDB/ParameterOutput>
15
16bool SwitchProperty_readLocalData(osg::Object &obj, osgDB::Input &fr);
17bool SwitchProperty_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
18
19REGISTER_DOTOSGWRAPPER(SwitchProperty_Proxy)
20(
21    new osgVolume::SwitchProperty,
22    "SwitchProperty",
23    "Object SwitchProperty CompositeProperty",
24    SwitchProperty_readLocalData,
25    SwitchProperty_writeLocalData
26);
27
28
29bool SwitchProperty_readLocalData(osg::Object& obj, osgDB::Input &fr)
30{
31    osgVolume::SwitchProperty& sp = static_cast<osgVolume::SwitchProperty&>(obj);
32
33    bool itrAdvanced = false;
34
35    int value=0;
36    if (fr.read("activeProperty",value))
37    {
38        itrAdvanced = true;
39        sp.setActiveProperty(value);
40    }
41
42    return itrAdvanced;
43}
44
45bool SwitchProperty_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
46{
47    const osgVolume::SwitchProperty& sp = static_cast<const osgVolume::SwitchProperty&>(obj);
48
49    fw.indent()<<"activeProperty "<<sp.getActiveProperty()<<std::endl;
50
51    return true;
52}
Note: See TracBrowser for help on using the browser.