source: OGRE/trunk/ogrenew/Samples/VolumeTex/include/VolumeRenderable.h @ 692

Revision 692, 1.6 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10You may use this sample code for anything you like, it is not covered by the
11LGPL like the rest of the engine.
12-----------------------------------------------------------------------------
13*/
14#ifndef OWL_VOLUMERENDERABLE
15#define OWL_VOLUMERENDERABLE
16#include <OgrePrerequisites.h>
17#include <OgreSimpleRenderable.h>
18
19/** Direct Volume Rendering.
20        TODO: LOD: reduce number of slices in distance
21        TODO: option to generate normals for lighting
22        @author W.J. van der Laan
23*/
24class VolumeRenderable: public Ogre::SimpleRenderable {
25public:
26        VolumeRenderable(size_t nSlices, float size, const Ogre::String & texture);
27        ~VolumeRenderable();
28       
29        // Copydoc Ogre::SimpleRenderable::notifyCurrentCamera
30        void _notifyCurrentCamera( Ogre::Camera* cam );
31        void getWorldTransforms( Ogre::Matrix4* xform ) const;
32       
33        /**
34         * Retrieves ratios of the origin-centered bounding sphere for this
35         * object.
36         */
37        Ogre::Real getBoundingRadius() const;
38       
39        /**
40         * Returns the camera-relative squared depth of this renderable.
41         */
42        Ogre::Real getSquaredViewDepth(const Ogre::Camera*) const;
43protected:
44        void initialise();
45
46        size_t mSlices;
47        float mSize;
48        float mRadius;
49        Ogre::Matrix3 mFakeOrientation;
50        Ogre::String mTexture;
51        Ogre::TextureUnitState *mUnit;
52};
53#endif
Note: See TracBrowser for help on using the repository browser.