~ubuntu-branches/debian/sid/osgearth/sid

« back to all changes in this revision

Viewing changes to src/osgEarthDrivers/engine_droam/Manifold

  • Committer: Bazaar Package Importer
  • Author(s): Pirmin Kalberer
  • Date: 2011-07-14 22:13:36 UTC
  • Revision ID: james.westby@ubuntu.com-20110714221336-94igk9rskxveh794
Tags: upstream-2.0+dfsg
ImportĀ upstreamĀ versionĀ 2.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*-c++-*- */
 
2
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
 
3
 * Copyright 2008-2010 Pelican Mapping
 
4
 * http://osgearth.org
 
5
 *
 
6
 * osgEarth is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU Lesser General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU Lesser General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public License
 
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 
18
 */
 
19
#ifndef OSGEARTH_DROAM_ENGINE_MANIFOLD_H
 
20
#define OSGEARTH_DROAM_ENGINE_MANIFOLD_H 1
 
21
 
 
22
#include <osg/BoundingSphere>
 
23
#include <osg/Vec3>
 
24
#include <osgUtil/CullVisitor>
 
25
 
 
26
class MeshManager;
 
27
class MeshNode;
 
28
 
 
29
/** Abstract base class that represents the layout of a diamond mesh. */
 
30
class Manifold : public osg::Referenced
 
31
{
 
32
public:
 
33
    Manifold();
 
34
 
 
35
    /** builds the base diamond framework for this manifold. */
 
36
    virtual void initialize( MeshManager* mesh ) =0;
 
37
 
 
38
    /** update the culling status of the manifold based on a new eyepoint. */
 
39
    virtual void cull( osgUtil::CullVisitor* cv ) =0;
 
40
 
 
41
    /** calculates the midpoint between two coordinates */
 
42
    virtual osg::Vec3d midpoint( const osg::Vec3d& mapCoord0, const osg::Vec3d& mapCoord1 ) const =0;
 
43
 
 
44
    /** calculates an initial bound for the manifold. */
 
45
    virtual osg::BoundingSphere initialBound() const =0;
 
46
 
 
47
    /** creates a mesh node for a coordinate in manifold profile */
 
48
    virtual MeshNode createNode( const osg::Vec3d& manifoldCoord ) const =0;
 
49
};
 
50
 
 
51
#endif // OSGEARTH_DROAM_ENGINE_MANIFOLD_H
 
52