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

Last change on this file since 93 was 88, checked in by Torben Dannhauer, 14 years ago

Moved memory leak detection from source file to headerfile. Its still in the class but at least not in the source file.

The leak detection works, but the false positives are not stopped.
Use Linux/Valgrind? to make your final leak detection beyond the easy first approach in MSVC

File size: 3.1 KB
Line 
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{
39        #include <leakDetection.h>
40public:
41        /**
42         * \brief Constructor : Initializes attributes.
43         *
44         */ 
45    skySilverLining_cloudsDrawable();
46
47        /**
48         * \brief Constructor : Initializes attributes.
49         *
50         * @param view : Pointer to the viewer instance.
51         */ 
52        skySilverLining_cloudsDrawable(osgViewer::Viewer* view);
53
54        /**
55         * \brief This function checks if this object is the same kind as the specified one.
56         *
57         * This function is required by subclassing osg::Drawable.
58         *
59         * @param obj : object to compare this type to.
60         * @return : True if it is the same kind.
61         */ 
62    virtual bool isSameKindAs(const Object* obj) const {
63        return dynamic_cast<const skySilverLining_cloudsDrawable*>(obj)!=NULL;
64    }
65
66        /**
67         * \brief This function clones this class/type.
68         *
69         * This function is required by subclassing osg::Drawable.
70         *
71         * @return : Cloned instance.
72         */ 
73    virtual Object* cloneType() const {
74        return new skySilverLining_cloudsDrawable();
75    }
76
77        /**
78         * \brief This function clones this class/type.
79         *
80         * This function is required by subclassing osg::Drawable.
81         *
82         * @param copyop : Copy operator flag which indicates how to clone.
83         * @return : Cloned instance.
84         */ 
85    virtual Object* clone(const osg::CopyOp& copyop) const {
86        return new skySilverLining_cloudsDrawable();
87    }
88
89        /**
90         * \brief Draw implementation which will be drawn every frame and is the true payload of thes class.
91         *
92         * @param renderInfo : rendering information.. (?)
93         */ 
94    virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
95
96protected:
97        /**
98         * Pointer to the viewer instance.
99         */ 
100    osgViewer::Viewer* _view;
101};
102
103}       // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.