2
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
3
* Copyright 2008-2010 Pelican Mapping
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.
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.
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/>
19
#ifndef OSGEARTH_DROAM_ENGINE_MANIFOLD_H
20
#define OSGEARTH_DROAM_ENGINE_MANIFOLD_H 1
22
#include <osg/BoundingSphere>
24
#include <osgUtil/CullVisitor>
29
/** Abstract base class that represents the layout of a diamond mesh. */
30
class Manifold : public osg::Referenced
35
/** builds the base diamond framework for this manifold. */
36
virtual void initialize( MeshManager* mesh ) =0;
38
/** update the culling status of the manifold based on a new eyepoint. */
39
virtual void cull( osgUtil::CullVisitor* cv ) =0;
41
/** calculates the midpoint between two coordinates */
42
virtual osg::Vec3d midpoint( const osg::Vec3d& mapCoord0, const osg::Vec3d& mapCoord1 ) const =0;
44
/** calculates an initial bound for the manifold. */
45
virtual osg::BoundingSphere initialBound() const =0;
47
/** creates a mesh node for a coordinate in manifold profile */
48
virtual MeshNode createNode( const osg::Vec3d& manifoldCoord ) const =0;
51
#endif // OSGEARTH_DROAM_ENGINE_MANIFOLD_H