Line | |
---|
1 | #include "OgreMeshInstance.h" |
---|
2 | #include "OgreTypeConverter.h" |
---|
3 | |
---|
4 | namespace Ogre |
---|
5 | { |
---|
6 | |
---|
7 | OgreMeshInstance::OgreMeshInstance(Entity *ent): |
---|
8 | GtpVisibilityPreprocessor::Intersectable(), mEntity(ent) |
---|
9 | { |
---|
10 | } |
---|
11 | |
---|
12 | void OgreMeshInstance::SetEntity(Entity *entity) |
---|
13 | { |
---|
14 | mEntity = entity; |
---|
15 | } |
---|
16 | |
---|
17 | Entity *OgreMeshInstance::GetEntity() const
|
---|
18 | {
|
---|
19 | return mEntity;
|
---|
20 | }
|
---|
21 | |
---|
22 | GtpVisibilityPreprocessor::AxisAlignedBox3 OgreMeshInstance::GetBox() const |
---|
23 | { |
---|
24 | return OgreTypeConverter::ConvertFromOgre(mEntity->getWorldBoundingBox()); |
---|
25 | } |
---|
26 | |
---|
27 | int OgreMeshInstance::CastRay(GtpVisibilityPreprocessor::Ray &ray)
|
---|
28 | {
|
---|
29 | return 0;
|
---|
30 | }
|
---|
31 |
|
---|
32 | bool OgreMeshInstance::IsConvex() const
|
---|
33 | {
|
---|
34 | return true;
|
---|
35 | }
|
---|
36 |
|
---|
37 | bool OgreMeshInstance::IsWatertight() const
|
---|
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 | {
|
---|
73 | s << mEntity;
|
---|
74 | return s;
|
---|
75 | }
|
---|
76 | |
---|
77 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.