arsa  2.7
Public Member Functions | Public Attributes | List of all members
irr::scene::SCollisionTriangleRange Struct Reference

Additional information about the triangle arrays returned by ITriangleSelector::getTriangles. More...

#include <ITriangleSelector.h>

Public Member Functions

 SCollisionTriangleRange ()
 
bool isIndexInRange (irr::u32 triangleIndex) const
 Check if this triangle index inside the range. More...
 

Public Attributes

irr::u32 RangeStart
 First index in the returned triangle array for which this struct is valid. More...
 
irr::u32 RangeSize
 Number of elements in the returned triangle array for which this struct is valid (starting with RangeStart) More...
 
ITriangleSelectorSelector
 Real selector which contained those triangles (useful when working with MetaTriangleSelector) More...
 
ISceneNodeSceneNode
 SceneNode from which the triangles are from. More...
 
const IMeshBufferMeshBuffer
 
irr::u32 MaterialIndex
 Index of selected material in the SceneNode. Usually only valid when MeshBuffer is also set, otherwise always 0. More...
 

Detailed Description

Additional information about the triangle arrays returned by ITriangleSelector::getTriangles.

ITriangleSelector are free to fill out this information fully, partly or ignore it. Usually they will try to fill it when they can and set values to 0 otherwise.

Definition at line 28 of file ITriangleSelector.h.

Constructor & Destructor Documentation

◆ SCollisionTriangleRange()

irr::scene::SCollisionTriangleRange::SCollisionTriangleRange ( )
inline

Definition at line 30 of file ITriangleSelector.h.

31  : RangeStart(0), RangeSize(0)
32  , Selector(0), SceneNode(0)
33  , MeshBuffer(0), MaterialIndex(0)
34  {}
irr::u32 RangeStart
First index in the returned triangle array for which this struct is valid.
ITriangleSelector * Selector
Real selector which contained those triangles (useful when working with MetaTriangleSelector)
irr::u32 MaterialIndex
Index of selected material in the SceneNode. Usually only valid when MeshBuffer is also set,...
irr::u32 RangeSize
Number of elements in the returned triangle array for which this struct is valid (starting with Range...
ISceneNode * SceneNode
SceneNode from which the triangles are from.

Member Function Documentation

◆ isIndexInRange()

bool irr::scene::SCollisionTriangleRange::isIndexInRange ( irr::u32  triangleIndex) const
inline

Check if this triangle index inside the range.

Parameters
triangleIndexIndex to an element inside the array of triangles returned by ITriangleSelector::getTriangles

Definition at line 40 of file ITriangleSelector.h.

41  {
42  return triangleIndex >= RangeStart && triangleIndex < RangeStart+RangeSize;
43  }
irr::u32 RangeStart
First index in the returned triangle array for which this struct is valid.
irr::u32 RangeSize
Number of elements in the returned triangle array for which this struct is valid (starting with Range...

Member Data Documentation

◆ MaterialIndex

irr::u32 irr::scene::SCollisionTriangleRange::MaterialIndex

Index of selected material in the SceneNode. Usually only valid when MeshBuffer is also set, otherwise always 0.

Definition at line 62 of file ITriangleSelector.h.

◆ MeshBuffer

const IMeshBuffer* irr::scene::SCollisionTriangleRange::MeshBuffer

Meshbuffer from which the triangles are from Is 0 when the ITriangleSelector doesn't support meshbuffer selection

Definition at line 59 of file ITriangleSelector.h.

◆ RangeSize

irr::u32 irr::scene::SCollisionTriangleRange::RangeSize

Number of elements in the returned triangle array for which this struct is valid (starting with RangeStart)

Definition at line 49 of file ITriangleSelector.h.

◆ RangeStart

irr::u32 irr::scene::SCollisionTriangleRange::RangeStart

First index in the returned triangle array for which this struct is valid.

Definition at line 46 of file ITriangleSelector.h.

◆ SceneNode

ISceneNode* irr::scene::SCollisionTriangleRange::SceneNode

SceneNode from which the triangles are from.

Definition at line 55 of file ITriangleSelector.h.

◆ Selector

ITriangleSelector* irr::scene::SCollisionTriangleRange::Selector

Real selector which contained those triangles (useful when working with MetaTriangleSelector)

Definition at line 52 of file ITriangleSelector.h.


The documentation for this struct was generated from the following file: