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

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

adding ogre 1.2 and dependencies

RevLine 
[692]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 H_THINGRENDERABLE
15#define H_THINGRENDERABLE
16
17#include <OgrePrerequisites.h>
18#include <OgreSimpleRenderable.h>
19#include <OgreQuaternion.h>
20#include <OgreVector3.h>
21
22/** Quad fragments that rotate around origin (0,0,0) in a random orbit, always oriented to 0,0,0.
23        @author W.J. van der Laan
24*/
25class ThingRenderable: public Ogre::SimpleRenderable {
26public:
27        /** Create one this object.
28                @param radius   Radius of orbits
29                @param count    Number of quads
30                @param qsize    Size of quads
31         */
32        ThingRenderable(float radius, size_t count, float qsize);
33        ~ThingRenderable();
34        /**
35         * Retrieves ratios of the origin-centered bounding sphere for this
36         * object.
37         */
38        Ogre::Real getBoundingRadius() const;
39        /**
40         * Returns the camera-relative squared depth of this renderable.
41         */
42        Ogre::Real getSquaredViewDepth(const Ogre::Camera*) const;
43        /**
44         * Notify that t seconds have elapsed.
45         */
46        void addTime(float t);
47protected:
48        void initialise();
49        void fillBuffer();
50
51        Ogre::HardwareVertexBufferSharedPtr vbuf;// Our vertex buffer
52        float mRadius;
53        size_t mCount;
54        float mQSize;
55        std::vector <Ogre::Quaternion> things;
56        std::vector <Ogre::Quaternion> orbits;
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.