aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h
new file mode 100644
index 0000000..1294675
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h
@@ -0,0 +1,76 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __C_META_TRIANGLE_SELECTOR_H_INCLUDED__
6#define __C_META_TRIANGLE_SELECTOR_H_INCLUDED__
7
8#include "IMetaTriangleSelector.h"
9#include "irrArray.h"
10
11namespace irr
12{
13namespace scene
14{
15
16//! Interface for making multiple triangle selectors work as one big selector.
17class CMetaTriangleSelector : public IMetaTriangleSelector
18{
19public:
20
21 //! constructor
22 CMetaTriangleSelector();
23
24 //! destructor
25 virtual ~CMetaTriangleSelector();
26
27 //! Get amount of all available triangles in this selector
28 virtual s32 getTriangleCount() const;
29
30 //! Gets all triangles.
31 virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
32 s32& outTriangleCount, const core::matrix4* transform=0) const;
33
34 //! Gets all triangles which lie within a specific bounding box.
35 virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
36 s32& outTriangleCount, const core::aabbox3d<f32>& box,
37 const core::matrix4* transform=0) const;
38
39 //! Gets all triangles which have or may have contact with a 3d line.
40 virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
41 s32& outTriangleCount, const core::line3d<f32>& line,
42 const core::matrix4* transform=0) const;
43
44 //! Adds a triangle selector to the collection of triangle selectors
45 //! in this metaTriangleSelector.
46 virtual void addTriangleSelector(ITriangleSelector* toAdd);
47
48 //! Removes a specific triangle selector which was added before from the collection.
49 virtual bool removeTriangleSelector(ITriangleSelector* toRemove);
50
51 //! Removes all triangle selectors from the collection.
52 virtual void removeAllTriangleSelectors();
53
54 //! Get the scene node associated with a given triangle.
55 virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const;
56
57 // Get the number of TriangleSelectors that are part of this one
58 virtual u32 getSelectorCount() const;
59
60 // Get the TriangleSelector based on index based on getSelectorCount
61 virtual ITriangleSelector* getSelector(u32 index);
62
63 // Get the TriangleSelector based on index based on getSelectorCount
64 virtual const ITriangleSelector* getSelector(u32 index) const;
65
66private:
67
68 core::array<ITriangleSelector*> TriangleSelectors;
69};
70
71} // end namespace scene
72} // end namespace irr
73
74
75#endif
76