~ubuntu-branches/debian/experimental/openscenegraph/experimental

« back to all changes in this revision

Viewing changes to OpenSceneGraph/include/osgViewer/Keystone

  • Committer: Package Import Robot
  • Author(s): Alberto Luaces Fernández
  • Date: 2014-08-01 20:41:55 UTC
  • mfrom: (1.4.4) (24.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20140801204155-ykq00e43h6eg0ms3
Tags: 3.2.1-1
* Acknowledge NMU.
* New upstream version.
* Removal of old patches.
* Confirmation that (LP: #1339264) is already closed.
* Removed obsolete conflict rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
namespace osgViewer
26
26
{
27
 
    
 
27
 
28
28
class OSGVIEWER_EXPORT Keystone : public osg::Object
29
29
{
30
30
public:
31
31
    Keystone();
32
32
 
33
33
    Keystone(const Keystone& rhs, const osg::CopyOp& copop=osg::CopyOp::SHALLOW_COPY);
34
 
        
 
34
 
35
35
    META_Object(osgViewer, Keystone)
36
36
 
37
37
    void reset();
38
38
 
39
39
    Keystone& operator = (const Keystone& rhs);
40
 
    
 
40
 
41
41
    void setKeystoneEditingEnabled(bool flag) { keystoneEditingEnabled = flag; }
42
42
    bool getKeystoneEditingEnabled() const { return keystoneEditingEnabled; }
43
 
    
 
43
 
44
44
    void setGridColor(const osg::Vec4& color) { gridColour = color; }
45
45
    osg::Vec4& getGridColor() { return gridColour; }
46
46
    const osg::Vec4& getGridColor() const { return gridColour; }
61
61
    osg::Vec2d& getTopRight() { return top_right; }
62
62
    const osg::Vec2d& getTopRight() const { return top_right; }
63
63
 
64
 
    
65
 
    
 
64
 
 
65
 
66
66
    void compute3DPositions(osg::DisplaySettings* ds, osg::Vec3& tl, osg::Vec3& tr, osg::Vec3& br, osg::Vec3& bl) const;
67
 
    
 
67
 
68
68
    osg::Geode* createKeystoneDistortionMesh();
69
 
    
 
69
 
70
70
    osg::Node* createGrid();
71
 
    
 
71
 
72
72
    /** Write the file specified by the "filename" user value field. Return true if file successfully written. */
73
73
    bool writeToFile();
74
 
    
 
74
 
75
75
    /** convinience function that loads and assigns any keystone files specified in the DisplaySettings::KeystoneFileNames list, return true if Keystone's assigned to DisplaySettings.*/
76
76
    static bool loadKeystoneFiles(osg::DisplaySettings* ds);
77
77
 
78
78
 
79
 
protected:    
80
 
    
 
79
protected:
 
80
 
81
81
    bool        keystoneEditingEnabled;
82
82
 
83
83
    osg::Vec4   gridColour;
91
91
protected:
92
92
 
93
93
    virtual ~Keystone() {}
94
 
    
95
 
    
 
94
 
 
95
 
96
96
};
97
97
 
98
98
class OSGVIEWER_EXPORT KeystoneHandler : public osgGA::GUIEventHandler
125
125
    osg::Vec2d incrementScale(const osgGA::GUIEventAdapter& ea) const;
126
126
    Region computeRegion(const osgGA::GUIEventAdapter& ea) const;
127
127
    void move(Region region, const osg::Vec2d& delta);
128
 
    
 
128
 
129
129
protected:
130
130
 
131
131
 
138
138
 
139
139
    osg::Vec2d                          _startPosition;
140
140
    osg::ref_ptr<Keystone>              _startControlPoints;
141
 
    
 
141
 
142
142
    Region                              _selectedRegion;
143
143
    osg::ref_ptr<Keystone>              _currentControlPoints;
144
144
 
146
146
 
147
147
}
148
148
 
149
 
#endif
 
 
b'\\ No newline at end of file'
 
149
#endif