[870] | 1 | #include "OgreMeshInstance.h" |
---|
| 2 | #include "OgreTypeConverter.h" |
---|
| 3 | |
---|
| 4 | namespace Ogre |
---|
| 5 | { |
---|
| 6 | OgreMeshInstance::OgreMeshInstance(Entity *ent): |
---|
[1593] | 7 | GtpVisibilityPreprocessor::Intersectable(), mEntity(ent) |
---|
[870] | 8 | { |
---|
| 9 | } |
---|
| 10 | |
---|
[1593] | 11 | void OgreMeshInstance::SetEntity(Entity *entity) |
---|
[870] | 12 | { |
---|
[1593] | 13 | mEntity = entity; |
---|
[870] | 14 | } |
---|
| 15 | |
---|
[1593] | 16 | Entity *OgreMeshInstance::GetEntity() const
|
---|
[870] | 17 | {
|
---|
[1593] | 18 | return mEntity;
|
---|
[870] | 19 | }
|
---|
| 20 | |
---|
[1028] | 21 | GtpVisibilityPreprocessor::AxisAlignedBox3 OgreMeshInstance::GetBox() const |
---|
[870] | 22 | { |
---|
[1593] | 23 | return OgreTypeConverter::ConvertFromOgre(mEntity->getWorldBoundingBox()); |
---|
[870] | 24 | } |
---|
| 25 | |
---|
| 26 | int OgreMeshInstance::CastRay(GtpVisibilityPreprocessor::Ray &ray)
|
---|
| 27 | {
|
---|
| 28 | return 0;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
[1028] | 31 | bool OgreMeshInstance::IsConvex() const
|
---|
[870] | 32 | {
|
---|
| 33 | return true;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
[1028] | 36 | bool OgreMeshInstance::IsWatertight() const
|
---|
[870] | 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,
|
---|
[2115] | 57 | GtpVisibilityPreprocessor::Vector3 &normal)
|
---|
[870] | 58 | {
|
---|
| 59 | return 0;
|
---|
| 60 | }
|
---|
| 61 |
|
---|
[2115] | 62 | int OgreMeshInstance::GetRandomEdgePoint(GtpVisibilityPreprocessor::Vector3 &point,
|
---|
| 63 | GtpVisibilityPreprocessor::Vector3 &normal)
|
---|
| 64 | {
|
---|
| 65 | return 0;
|
---|
| 66 | }
|
---|
| 67 |
|
---|
[870] | 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 | }
|
---|
[2115] | 75 |
|
---|
[870] | 76 | ostream &OgreMeshInstance::Describe(ostream &s)
|
---|
| 77 | {
|
---|
[1593] | 78 | s << mEntity;
|
---|
[870] | 79 | return s;
|
---|
[2066] | 80 | } |
---|
[870] | 81 | } |
---|