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