Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/OgreMain/include/OgreSimpleRenderable.h @ 3

Last change on this file since 3 was 3, checked in by anonymous, 17 years ago

=update

File size: 3.2 KB
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-2006 Torus Knot Software Ltd
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23
24You may alternatively use this source under the terms of a specific version of
25the OGRE Unrestricted License provided you have obtained such a license from
26Torus Knot Software Ltd.
27-----------------------------------------------------------------------------
28*/
29#ifndef __SimpleRenderable_H__
30#define __SimpleRenderable_H__
31
32#include "OgrePrerequisites.h"
33
34#include "OgreMovableObject.h"
35#include "OgreRenderable.h"
36#include "OgreAxisAlignedBox.h"
37#include "OgreMaterial.h"
38
39namespace Ogre {
40
41    class _OgreExport SimpleRenderable : public MovableObject, public Renderable
42    {
43    protected:
44        RenderOperation mRenderOp;
45
46        Matrix4 m_matWorldTransform;
47        AxisAlignedBox mBox;
48
49        String m_strMatName;
50        MaterialPtr m_pMaterial;
51
52        /// The scene manager for the current frame.
53        SceneManager *m_pParentSceneManager;
54
55        /// The camera for the current frame.
56        Camera *m_pCamera;
57
58        /// Static member used to automatically generate names for SimpleRendaerable objects.
59        static uint ms_uGenNameCount;
60
61    public:
62        SimpleRenderable();
63
64        void setMaterial( const String& matName );
65        virtual const MaterialPtr& getMaterial(void) const;
66
67        virtual void setRenderOperation( const RenderOperation& rend );
68        virtual void getRenderOperation(RenderOperation& op);
69
70        void setWorldTransform( const Matrix4& xform );
71        virtual void getWorldTransforms( Matrix4* xform ) const;
72        /** @copydoc Renderable::getWorldOrientation */
73        const Quaternion& getWorldOrientation(void) const;
74        /** @copydoc Renderable::getWorldPosition */
75        const Vector3& getWorldPosition(void) const;
76
77
78        virtual void _notifyCurrentCamera(Camera* cam);
79
80        void setBoundingBox( const AxisAlignedBox& box );
81        virtual const AxisAlignedBox& getBoundingBox(void) const;
82
83        virtual void _updateRenderQueue(RenderQueue* queue);
84
85        virtual ~SimpleRenderable();
86
87
88        /** Overridden from MovableObject */
89        virtual const String& getMovableType(void) const;
90
91        /** @copydoc Renderable::getLights */
92        const LightList& getLights(void) const;
93
94    };
95}
96
97#endif
98
Note: See TracBrowser for help on using the repository browser.