source: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreMeshInstance.h @ 1593

Revision 1593, 1.4 KB checked in by mattausch, 18 years ago (diff)
Line 
1#ifndef _OgreMeshIntance_H__
2#define _OgreMeshIntance_H__
3
4#include <OgreEntity.h>
5#include "Intersectable.h"
6
7namespace Ogre {
8 
9/**
10        Wrapper for Ogre object intances for use with the preprocessed view cells.
11*/
12class __declspec(dllexport) OgreMeshInstance: public GtpVisibilityPreprocessor::Intersectable
13{
14public:
15        /** The default constructor taking an entity into account.
16        */
17        OgreMeshInstance(Entity *ent);
18       
19        /** Returns 'mesh' associated with this instance.
20        */
21        Entity *GetEntity() const;
22
23        /** See get.
24        */
25        void SetEntity(Entity *entity);
26
27
28        /////////////////////////////
29        //-- inherited functions from Intersectable
30
31        GtpVisibilityPreprocessor::AxisAlignedBox3 GetBox() const;
32       
33        int CastRay(GtpVisibilityPreprocessor::Ray &ray);
34       
35        bool IsConvex() const;
36        bool IsWatertight() const;
37        float IntersectionComplexity();
38 
39        int NumberOfFaces() const;
40        int Type() const;
41
42        int GetRandomSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
43                                                          GtpVisibilityPreprocessor::Vector3 &normal);
44
45        int GetRandomVisibleSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
46                                                                         GtpVisibilityPreprocessor::Vector3 &normal,
47                                                                         const GtpVisibilityPreprocessor::Vector3 &viewpoint,
48                                                                         const int maxTries);
49 
50        ostream &Describe(ostream &s);
51       
52
53protected:
54       
55        Entity *mEntity;
56};
57
58} // namespace Ogre
59
60#endif // OgreMeshIntance
Note: See TracBrowser for help on using the repository browser.