Irrlicht 3D Engine
ITriangleSelector.h
Go to the documentation of this file.
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 __I_TRIANGLE_SELECTOR_H_INCLUDED__
6 #define __I_TRIANGLE_SELECTOR_H_INCLUDED__
7 
8 #include "IReferenceCounted.h"
9 #include "triangle3d.h"
10 #include "aabbox3d.h"
11 #include "matrix4.h"
12 #include "line3d.h"
13 
14 namespace irr
15 {
16 namespace scene
17 {
18 
19 class ISceneNode;
20 
22 
28 class ITriangleSelector : public virtual IReferenceCounted
29 {
30 public:
31 
33  virtual s32 getTriangleCount() const = 0;
34 
36 
50  virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
51  s32& outTriangleCount, const core::matrix4* transform=0) const = 0;
52 
54 
73  virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
74  s32& outTriangleCount, const core::aabbox3d<f32>& box,
75  const core::matrix4* transform=0) const = 0;
76 
78 
97  virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
98  s32& outTriangleCount, const core::line3d<f32>& line,
99  const core::matrix4* transform=0) const = 0;
100 
102 
110  virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const = 0;
111 
113 
115  virtual u32 getSelectorCount() const = 0;
116 
118 
120  virtual ITriangleSelector* getSelector(u32 index) = 0;
121 
123 
125  virtual const ITriangleSelector* getSelector(u32 index) const = 0;
126 };
127 
128 } // end namespace scene
129 } // end namespace irr
130 
131 #endif
Interface to return triangles with specific properties.
Scene node interface.
Definition: ISceneNode.h:40
3d triangle template class for doing collision detection and other things.
Definition: triangle3d.h:20
Everything in the Irrlicht Engine can be found in this namespace.
Definition: aabbox3d.h:12
virtual u32 getSelectorCount() const =0
Get number of TriangleSelectors that are part of this one.
3D line between two points with intersection methods.
Definition: line3d.h:18
signed int s32
32 bit signed variable.
Definition: irrTypes.h:66
virtual ITriangleSelector * getSelector(u32 index)=0
Get TriangleSelector based on index based on getSelectorCount.
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:58
virtual ISceneNode * getSceneNodeForTriangle(u32 triangleIndex) const =0
Get scene node associated with a given triangle.
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
Definition: matrix4.h:45
virtual void getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::matrix4 *transform=0) const =0
Gets the triangles for one associated node.
Base class of most objects of the Irrlicht Engine.
virtual s32 getTriangleCount() const =0
Get amount of all available triangles in this selector.