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

Revision 2183, 1.5 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*/
12#if 1
13class __declspec(dllexport) OgreMeshInstance: public GtpVisibilityPreprocessor::Intersectable
14{
15public:
16        /** The default constructor taking an entity into account.
17        */
18        OgreMeshInstance(Entity *ent);
19       
20        /** Returns 'mesh' associated with this instance.
21        */
22        Entity *GetEntity() const;
23
24        /** See get.
25        */
26        void SetEntity(Entity *entity);
27
28
29        /////////////////////////////
30        //-- inherited functions from Intersectable
31
32        GtpVisibilityPreprocessor::AxisAlignedBox3 GetBox() const;
33       
34        int CastRay(GtpVisibilityPreprocessor::Ray &ray);
35       
36        bool IsConvex() const;
37        bool IsWatertight() const;
38        float IntersectionComplexity();
39 
40        int NumberOfFaces() const;
41        int Type() const;
42
43        int GetRandomSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
44                                                          GtpVisibilityPreprocessor::Vector3 &normal);
45
46        int GetRandomVisibleSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
47                                                                         GtpVisibilityPreprocessor::Vector3 &normal,
48                                                                         const GtpVisibilityPreprocessor::Vector3 &viewpoint,
49                                                                         const int maxTries);
50 
51        int GetRandomEdgePoint(GtpVisibilityPreprocessor::Vector3 &point,
52                                                   GtpVisibilityPreprocessor::Vector3 &normal);
53
54        std::ostream &Describe(std::ostream &s);
55       
56
57protected:
58       
59        Entity *mEntity;
60};
61
62
63} // namespace Ogre
64#endif
65#endif // OgreMeshIntance
Note: See TracBrowser for help on using the repository browser.