5#ifndef NIRT_I_TRIANGLE_SELECTOR_HPP_INCLUDED
6#define NIRT_I_TRIANGLE_SELECTOR_HPP_INCLUDED
8#include <nirtcpp/core/engine/IReferenceCounted.hpp>
9#include <nirtcpp/core/engine/triangle3d.hpp>
10#include <nirtcpp/core/engine/aabbox3d.hpp>
11#include <nirtcpp/core/engine/matrix4.hpp>
12#include <nirtcpp/core/engine/line3d.hpp>
13#include <nirtcpp/core/engine/irrArray.hpp>
21class ITriangleSelector;
103 bool useNodeTransform=
true,
133 const core::matrix4* transform=0,
bool useNodeTransform=
true,
163 const core::matrix4* transform=0,
bool useNodeTransform=
true,
Base class of most objects of the Nirtcpp Engine.
Definition IReferenceCounted.hpp:46
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
Definition matrix4.hpp:49
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Class for holding a mesh with a single material.
Definition IMeshBuffer.hpp:41
Scene node interface.
Definition ISceneNode.hpp:43
Interface to return triangles with specific properties.
Definition ITriangleSelector.hpp:74
virtual void getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::line3d< f32 > &line, const core::matrix4 *transform=0, bool useNodeTransform=true, nirt::core::array< SCollisionTriangleRange > *outTriangleInfo=0) const =0
Gets the triangles for one associated node which have or may have contact with a 3d line.
virtual ITriangleSelector * getSelector(u32 index)=0
Get TriangleSelector based on index based on getSelectorCount.
virtual ISceneNode * getSceneNodeForTriangle(u32 triangleIndex) const =0
Get scene node associated with a given triangle.
virtual void getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::matrix4 *transform=0, bool useNodeTransform=true, nirt::core::array< SCollisionTriangleRange > *outTriangleInfo=0) const =0
Gets the triangles for one associated node.
virtual const ITriangleSelector * getSelector(u32 index) const =0
Get TriangleSelector based on index based on getSelectorCount.
virtual void getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::aabbox3d< f32 > &box, const core::matrix4 *transform=0, bool useNodeTransform=true, nirt::core::array< SCollisionTriangleRange > *outTriangleInfo=0) const =0
Gets the triangles for one associated node which may lie within a specific bounding box.
virtual s32 getTriangleCount() const =0
Get amount of all available triangles in this selector.
virtual u32 getSelectorCount() const =0
Get number of TriangleSelectors that are part of this one.
Additional information about the triangle arrays returned by ITriangleSelector::getTriangles.
Definition ITriangleSelector.hpp:29
const IMeshBuffer * MeshBuffer
Definition ITriangleSelector.hpp:60
ISceneNode * SceneNode
SceneNode from which the triangles are from.
Definition ITriangleSelector.hpp:56
nirt::u32 MaterialIndex
Index of selected material in the SceneNode. Usually only valid when MeshBuffer is also set,...
Definition ITriangleSelector.hpp:63
bool isIndexInRange(nirt::u32 triangleIndex) const
Check if this triangle index inside the range.
Definition ITriangleSelector.hpp:41
nirt::u32 RangeSize
Number of elements in the returned triangle array for which this class is valid (starting with RangeS...
Definition ITriangleSelector.hpp:50
nirt::u32 RangeStart
First index in the returned triangle array for which this class is valid.
Definition ITriangleSelector.hpp:47
const ITriangleSelector * Selector
Real selector which contained those triangles (useful when working with MetaTriangleSelector)
Definition ITriangleSelector.hpp:53
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64