source: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreMeshInstance.cpp @ 2115

Revision 2115, 1.6 KB checked in by mattausch, 17 years ago (diff)

changed pvs loading: loading objects in a first pass

Line 
1#include "OgreMeshInstance.h"
2#include "OgreTypeConverter.h"
3
4namespace Ogre
5{
6        OgreMeshInstance::OgreMeshInstance(Entity *ent):
7        GtpVisibilityPreprocessor::Intersectable(), mEntity(ent)
8        {
9        }
10
11        void OgreMeshInstance::SetEntity(Entity *entity)
12        {
13                mEntity = entity;
14        }
15
16        Entity *OgreMeshInstance::GetEntity() const
17        {
18                return mEntity;
19        }
20       
21        GtpVisibilityPreprocessor::AxisAlignedBox3 OgreMeshInstance::GetBox() const
22        {
23                return OgreTypeConverter::ConvertFromOgre(mEntity->getWorldBoundingBox());
24        }
25
26        int OgreMeshInstance::CastRay(GtpVisibilityPreprocessor::Ray &ray)
27        {
28                return 0;
29        }
30       
31        bool OgreMeshInstance::IsConvex() const
32        {
33                return true;
34        }
35
36        bool OgreMeshInstance::IsWatertight() const
37        {
38                return true;
39        }
40
41        float OgreMeshInstance::IntersectionComplexity()
42        {
43                return 1.0f;
44        }
45 
46        int OgreMeshInstance::NumberOfFaces() const
47        {
48                return 0;
49        }
50
51        int OgreMeshInstance::Type() const
52        {
53                return OGRE_MESH_INSTANCE;
54        }
55
56        int OgreMeshInstance::GetRandomSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
57                                                                                                GtpVisibilityPreprocessor::Vector3 &normal)
58        {
59                return 0;
60        }
61
62        int OgreMeshInstance::GetRandomEdgePoint(GtpVisibilityPreprocessor::Vector3 &point,
63                                                                                         GtpVisibilityPreprocessor::Vector3 &normal)
64        {
65                return 0;
66        }
67 
68        int OgreMeshInstance::GetRandomVisibleSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
69                                                                                                           GtpVisibilityPreprocessor::Vector3 &normal,
70                                                                                                           const GtpVisibilityPreprocessor::Vector3 &viewpoint,
71                                                                                                           const int maxTries)
72        {
73                return 0;
74        }
75
76        ostream &OgreMeshInstance::Describe(ostream &s)
77        {
78                s << mEntity;
79                return s;
80        }
81}
Note: See TracBrowser for help on using the repository browser.