source: osgVisual/include/sky_Silverlining/skySilverLining_cloudsDrawable.h @ 69

Last change on this file since 69 was 32, checked in by Torben Dannhauer, 15 years ago

Adding first version of osgVisual!!

File size: 3.0 KB
RevLine 
[32]1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2010 Torben Dannhauer
3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16 *
17 * This file is based on the OSG example of the Silverlining SDK:
18 * Copyright (c) 2008 Sundog Software, LLC. All rights reserved worldwide.
19*/
20
21#include <osg/Drawable>
22#include <osgViewer/Viewer>
23#include <SilverLining.h>
24
25
26
27class SilverLining::Atmosphere;
28
29namespace osgVisual
30{
31/**
32 * \brief This class wraps Silverlining's endFrame() function which render clouds, fog and finishes the frame.
33 *
34 * @author Torben Dannhauer
35 * @date  Sep 2009
36 */ 
37class skySilverLining_cloudsDrawable : public osg::Drawable
38{
39public:
40        /**
41         * \brief Constructor : Initializes attributes.
42         *
43         */ 
44    skySilverLining_cloudsDrawable();
45
46        /**
47         * \brief Constructor : Initializes attributes.
48         *
49         * @param view : Pointer to the viewer instance.
50         */ 
51        skySilverLining_cloudsDrawable(osgViewer::Viewer* view);
52
53        /**
54         * \brief This function checks if this object is the same kind as the specified one.
55         *
56         * This function is required by subclassing osg::Drawable.
57         *
58         * @param obj : object to compare this type to.
59         * @return : True if it is the same kind.
60         */ 
61    virtual bool isSameKindAs(const Object* obj) const {
62        return dynamic_cast<const skySilverLining_cloudsDrawable*>(obj)!=NULL;
63    }
64
65        /**
66         * \brief This function clones this class/type.
67         *
68         * This function is required by subclassing osg::Drawable.
69         *
70         * @return : Cloned instance.
71         */ 
72    virtual Object* cloneType() const {
73        return new skySilverLining_cloudsDrawable();
74    }
75
76        /**
77         * \brief This function clones this class/type.
78         *
79         * This function is required by subclassing osg::Drawable.
80         *
81         * @param copyop : Copy operator flag which indicates how to clone.
82         * @return : Cloned instance.
83         */ 
84    virtual Object* clone(const osg::CopyOp& copyop) const {
85        return new skySilverLining_cloudsDrawable();
86    }
87
88        /**
89         * \brief Draw implementation which will be drawn every frame and is the true payload of thes class.
90         *
91         * @param renderInfo : rendering information.. (?)
92         */ 
93    virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
94
95protected:
96        /**
97         * Pointer to the viewer instance.
98         */ 
99    osgViewer::Viewer* _view;
100};
101
102}       // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.