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

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