aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CTriangleSelector.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CTriangleSelector.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CTriangleSelector.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CTriangleSelector.h184
1 files changed, 92 insertions, 92 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CTriangleSelector.h b/libraries/irrlicht-1.8/source/Irrlicht/CTriangleSelector.h
index 3d3b5f7..ad72a34 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CTriangleSelector.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CTriangleSelector.h
@@ -1,92 +1,92 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_TRIANGLE_SELECTOR_H_INCLUDED__ 5#ifndef __C_TRIANGLE_SELECTOR_H_INCLUDED__
6#define __C_TRIANGLE_SELECTOR_H_INCLUDED__ 6#define __C_TRIANGLE_SELECTOR_H_INCLUDED__
7 7
8#include "ITriangleSelector.h" 8#include "ITriangleSelector.h"
9#include "IMesh.h" 9#include "IMesh.h"
10#include "irrArray.h" 10#include "irrArray.h"
11#include "aabbox3d.h" 11#include "aabbox3d.h"
12 12
13namespace irr 13namespace irr
14{ 14{
15namespace scene 15namespace scene
16{ 16{
17 17
18class ISceneNode; 18class ISceneNode;
19class IAnimatedMeshSceneNode; 19class IAnimatedMeshSceneNode;
20 20
21//! Stupid triangle selector without optimization 21//! Stupid triangle selector without optimization
22class CTriangleSelector : public ITriangleSelector 22class CTriangleSelector : public ITriangleSelector
23{ 23{
24public: 24public:
25 25
26 //! Constructs a selector based on a mesh 26 //! Constructs a selector based on a mesh
27 CTriangleSelector(ISceneNode* node); 27 CTriangleSelector(ISceneNode* node);
28 28
29 //! Constructs a selector based on a mesh 29 //! Constructs a selector based on a mesh
30 CTriangleSelector(const IMesh* mesh, ISceneNode* node); 30 CTriangleSelector(const IMesh* mesh, ISceneNode* node);
31 31
32 //! Constructs a selector based on an animated mesh scene node 32 //! Constructs a selector based on an animated mesh scene node
33 //!\param node An animated mesh scene node, which must have a valid mesh 33 //!\param node An animated mesh scene node, which must have a valid mesh
34 CTriangleSelector(IAnimatedMeshSceneNode* node); 34 CTriangleSelector(IAnimatedMeshSceneNode* node);
35 35
36 //! Constructs a selector based on a bounding box 36 //! Constructs a selector based on a bounding box
37 CTriangleSelector(const core::aabbox3d<f32>& box, ISceneNode* node); 37 CTriangleSelector(const core::aabbox3d<f32>& box, ISceneNode* node);
38 38
39 //! Gets all triangles. 39 //! Gets all triangles.
40 void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, 40 void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount,
41 const core::matrix4* transform=0) const; 41 const core::matrix4* transform=0) const;
42 42
43 //! Gets all triangles which lie within a specific bounding box. 43 //! Gets all triangles which lie within a specific bounding box.
44 void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, 44 void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount,
45 const core::aabbox3d<f32>& box, const core::matrix4* transform=0) const; 45 const core::aabbox3d<f32>& box, const core::matrix4* transform=0) const;
46 46
47 //! Gets all triangles which have or may have contact with a 3d line. 47 //! Gets all triangles which have or may have contact with a 3d line.
48 virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, 48 virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
49 s32& outTriangleCount, const core::line3d<f32>& line, 49 s32& outTriangleCount, const core::line3d<f32>& line,
50 const core::matrix4* transform=0) const; 50 const core::matrix4* transform=0) const;
51 51
52 //! Returns amount of all available triangles in this selector 52 //! Returns amount of all available triangles in this selector
53 virtual s32 getTriangleCount() const; 53 virtual s32 getTriangleCount() const;
54 54
55 //! Return the scene node associated with a given triangle. 55 //! Return the scene node associated with a given triangle.
56 virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const { return SceneNode; } 56 virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const { return SceneNode; }
57 57
58 // Get the number of TriangleSelectors that are part of this one 58 // Get the number of TriangleSelectors that are part of this one
59 virtual u32 getSelectorCount() const; 59 virtual u32 getSelectorCount() const;
60 60
61 // Get the TriangleSelector based on index based on getSelectorCount 61 // Get the TriangleSelector based on index based on getSelectorCount
62 virtual ITriangleSelector* getSelector(u32 index); 62 virtual ITriangleSelector* getSelector(u32 index);
63 63
64 // Get the TriangleSelector based on index based on getSelectorCount 64 // Get the TriangleSelector based on index based on getSelectorCount
65 virtual const ITriangleSelector* getSelector(u32 index) const; 65 virtual const ITriangleSelector* getSelector(u32 index) const;
66 66
67protected: 67protected:
68 //! Create from a mesh 68 //! Create from a mesh
69 virtual void createFromMesh(const IMesh* mesh); 69 virtual void createFromMesh(const IMesh* mesh);
70 70
71 //! Update when the mesh has changed 71 //! Update when the mesh has changed
72 virtual void updateFromMesh(const IMesh* mesh) const; 72 virtual void updateFromMesh(const IMesh* mesh) const;
73 73
74 //! Update the triangle selector, which will only have an effect if it 74 //! Update the triangle selector, which will only have an effect if it
75 //! was built from an animated mesh and that mesh's frame has changed 75 //! was built from an animated mesh and that mesh's frame has changed
76 //! since the last time it was updated. 76 //! since the last time it was updated.
77 virtual void update(void) const; 77 virtual void update(void) const;
78 78
79 ISceneNode* SceneNode; 79 ISceneNode* SceneNode;
80 mutable core::array<core::triangle3df> Triangles; // (mutable for CTriangleBBSelector) 80 mutable core::array<core::triangle3df> Triangles; // (mutable for CTriangleBBSelector)
81 mutable core::aabbox3df BoundingBox; // Allows for trivial rejection 81 mutable core::aabbox3df BoundingBox; // Allows for trivial rejection
82 82
83 IAnimatedMeshSceneNode* AnimatedNode; 83 IAnimatedMeshSceneNode* AnimatedNode;
84 mutable u32 LastMeshFrame; 84 mutable u32 LastMeshFrame;
85}; 85};
86 86
87} // end namespace scene 87} // end namespace scene
88} // end namespace irr 88} // end namespace irr
89 89
90 90
91#endif 91#endif
92 92