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

A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime. More...

#include <SSkinMeshBuffer.h>

Inheritance diagram for irr::scene::SSkinMeshBuffer:
irr::scene::IMeshBuffer irr::IReferenceCounted

Public Member Functions

 SSkinMeshBuffer (video::E_VERTEX_TYPE vt=video::EVT_STANDARD)
 Default constructor. More...
 
virtual const video::SMaterialgetMaterial () const _IRR_OVERRIDE_
 Get Material of this buffer. More...
 
virtual video::SMaterialgetMaterial () _IRR_OVERRIDE_
 Get Material of this buffer. More...
 
virtual video::S3DVertexgetVertex (u32 index)
 Get standard vertex at given index. More...
 
virtual const voidgetVertices () const _IRR_OVERRIDE_
 Get pointer to vertex array. More...
 
virtual voidgetVertices () _IRR_OVERRIDE_
 Get pointer to vertex array. More...
 
virtual u32 getVertexCount () const _IRR_OVERRIDE_
 Get vertex count. More...
 
virtual video::E_INDEX_TYPE getIndexType () const _IRR_OVERRIDE_
 Get type of index data which is stored in this meshbuffer. More...
 
virtual const u16getIndices () const _IRR_OVERRIDE_
 Get pointer to index array. More...
 
virtual u16getIndices () _IRR_OVERRIDE_
 Get pointer to index array. More...
 
virtual u32 getIndexCount () const _IRR_OVERRIDE_
 Get index count. More...
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const _IRR_OVERRIDE_
 Get bounding box. More...
 
virtual void setBoundingBox (const core::aabbox3df &box) _IRR_OVERRIDE_
 Set bounding box. More...
 
virtual void recalculateBoundingBox () _IRR_OVERRIDE_
 Recalculate bounding box. More...
 
virtual video::E_VERTEX_TYPE getVertexType () const _IRR_OVERRIDE_
 Get vertex type. More...
 
void convertTo2TCoords ()
 Convert to 2tcoords vertex type. More...
 
void convertToTangents ()
 Convert to tangents vertex type. More...
 
virtual const core::vector3dfgetPosition (u32 i) const _IRR_OVERRIDE_
 returns position of vertex i More...
 
virtual core::vector3dfgetPosition (u32 i) _IRR_OVERRIDE_
 returns position of vertex i More...
 
virtual const core::vector3dfgetNormal (u32 i) const _IRR_OVERRIDE_
 returns normal of vertex i More...
 
virtual core::vector3dfgetNormal (u32 i) _IRR_OVERRIDE_
 returns normal of vertex i More...
 
virtual const core::vector2dfgetTCoords (u32 i) const _IRR_OVERRIDE_
 returns texture coords of vertex i More...
 
virtual core::vector2dfgetTCoords (u32 i) _IRR_OVERRIDE_
 returns texture coords of vertex i More...
 
virtual void append (const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices) _IRR_OVERRIDE_
 append the vertices and indices to the current buffer More...
 
virtual void append (const IMeshBuffer *const other) _IRR_OVERRIDE_
 append the meshbuffer to the current buffer More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex () const _IRR_OVERRIDE_
 get the current hardware mapping hint for vertex buffers More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index () const _IRR_OVERRIDE_
 get the current hardware mapping hint for index buffers More...
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
 set the hardware mapping hint, for driver More...
 
virtual void setPrimitiveType (E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
 Describe what kind of primitive geometry is used by the meshbuffer. More...
 
virtual E_PRIMITIVE_TYPE getPrimitiveType () const _IRR_OVERRIDE_
 Get the kind of primitive geometry which is used by the meshbuffer. More...
 
virtual void setDirty (E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
 flags the mesh as changed, reloads hardware buffers More...
 
virtual u32 getChangedID_Vertex () const _IRR_OVERRIDE_
 Get the currently used ID for identification of changes. More...
 
virtual u32 getChangedID_Index () const _IRR_OVERRIDE_
 Get the currently used ID for identification of changes. More...
 
void boundingBoxNeedsRecalculated (void)
 Call this after changing the positions of any vertex. More...
 
- Public Member Functions inherited from irr::scene::IMeshBuffer
virtual u32 getPrimitiveCount () const
 Calculate how many geometric primitives are used by this meshbuffer. More...
 
- Public Member Functions inherited from irr::IReferenceCounted
 IReferenceCounted ()
 Constructor. More...
 
virtual ~IReferenceCounted ()
 Destructor. More...
 
void grab () const
 Grabs the object. Increments the reference counter by one. More...
 
bool drop () const
 Drops the object. Decrements the reference counter by one. More...
 
s32 getReferenceCount () const
 Get the reference count. More...
 
const c8getDebugName () const
 Returns the debug name of the object. More...
 

Public Attributes

core::array< video::S3DVertexTangentsVertices_Tangents
 
core::array< video::S3DVertex2TCoordsVertices_2TCoords
 
core::array< video::S3DVertexVertices_Standard
 
core::array< u16Indices
 
u32 ChangedID_Vertex
 
u32 ChangedID_Index
 
core::matrix4 Transformation
 
video::SMaterial Material
 
video::E_VERTEX_TYPE VertexType
 
core::aabbox3d< f32BoundingBox
 
E_PRIMITIVE_TYPE PrimitiveType
 Primitive type used for rendering (triangles, lines, ...) More...
 
E_HARDWARE_MAPPING MappingHint_Vertex:3
 
E_HARDWARE_MAPPING MappingHint_Index:3
 
bool BoundingBoxNeedsRecalculated:1
 

Additional Inherited Members

- Protected Member Functions inherited from irr::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object. More...
 

Detailed Description

A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime.

Definition at line 19 of file SSkinMeshBuffer.h.

Constructor & Destructor Documentation

◆ SSkinMeshBuffer()

irr::scene::SSkinMeshBuffer::SSkinMeshBuffer ( video::E_VERTEX_TYPE  vt = video::EVT_STANDARD)
inline

Default constructor.

Definition at line 22 of file SSkinMeshBuffer.h.

22  :
27  {
28  #ifdef _DEBUG
29  setDebugName("SSkinMeshBuffer");
30  #endif
31  }
E_HARDWARE_MAPPING MappingHint_Index
video::E_VERTEX_TYPE VertexType
E_HARDWARE_MAPPING MappingHint_Vertex
Don't store on the hardware.
Explicitly set all vertices for each triangle.
void setDebugName(const c8 *newName)
Sets the debug name of the object.
E_PRIMITIVE_TYPE PrimitiveType
Primitive type used for rendering (triangles, lines, ...)

Member Function Documentation

◆ append() [1/2]

virtual void irr::scene::SSkinMeshBuffer::append ( const void *const  vertices,
u32  numVertices,
const u16 *const  indices,
u32  numIndices 
)
inlinevirtual

append the vertices and indices to the current buffer

Implements irr::scene::IMeshBuffer.

Definition at line 330 of file SSkinMeshBuffer.h.

330 {}

◆ append() [2/2]

virtual void irr::scene::SSkinMeshBuffer::append ( const IMeshBuffer *const  other)
inlinevirtual

append the meshbuffer to the current buffer

Implements irr::scene::IMeshBuffer.

Definition at line 333 of file SSkinMeshBuffer.h.

333 {}

◆ boundingBoxNeedsRecalculated()

void irr::scene::SSkinMeshBuffer::boundingBoxNeedsRecalculated ( void  )
inline

Call this after changing the positions of any vertex.

Definition at line 387 of file SSkinMeshBuffer.h.

◆ convertTo2TCoords()

void irr::scene::SSkinMeshBuffer::convertTo2TCoords ( )
inline

Convert to 2tcoords vertex type.

Definition at line 194 of file SSkinMeshBuffer.h.

195  {
197  {
198  for(u32 n=0;n<Vertices_Standard.size();++n)
199  {
200  video::S3DVertex2TCoords Vertex;
201  Vertex.Color=Vertices_Standard[n].Color;
202  Vertex.Pos=Vertices_Standard[n].Pos;
203  Vertex.Normal=Vertices_Standard[n].Normal;
204  Vertex.TCoords=Vertices_Standard[n].TCoords;
205  Vertices_2TCoords.push_back(Vertex);
206  }
207  Vertices_Standard.clear();
209  }
210  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
GLdouble n
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
Definition: S3DVertex.h:21

◆ convertToTangents()

void irr::scene::SSkinMeshBuffer::convertToTangents ( )
inline

Convert to tangents vertex type.

Definition at line 213 of file SSkinMeshBuffer.h.

214  {
216  {
217  for(u32 n=0;n<Vertices_Standard.size();++n)
218  {
219  video::S3DVertexTangents Vertex;
220  Vertex.Color=Vertices_Standard[n].Color;
221  Vertex.Pos=Vertices_Standard[n].Pos;
222  Vertex.Normal=Vertices_Standard[n].Normal;
223  Vertex.TCoords=Vertices_Standard[n].TCoords;
224  Vertices_Tangents.push_back(Vertex);
225  }
226  Vertices_Standard.clear();
228  }
230  {
231  for(u32 n=0;n<Vertices_2TCoords.size();++n)
232  {
233  video::S3DVertexTangents Vertex;
234  Vertex.Color=Vertices_2TCoords[n].Color;
235  Vertex.Pos=Vertices_2TCoords[n].Pos;
236  Vertex.Normal=Vertices_2TCoords[n].Normal;
237  Vertex.TCoords=Vertices_2TCoords[n].TCoords;
238  Vertices_Tangents.push_back(Vertex);
239  }
240  Vertices_2TCoords.clear();
242  }
243  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
GLdouble n
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
Definition: S3DVertex.h:21
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getBoundingBox()

virtual const core::aabbox3d<f32>& irr::scene::SSkinMeshBuffer::getBoundingBox ( ) const
inlinevirtual

Get bounding box.

Implements irr::scene::IMeshBuffer.

Definition at line 127 of file SSkinMeshBuffer.h.

128  {
129  return BoundingBox;
130  }
core::aabbox3d< f32 > BoundingBox

◆ getChangedID_Index()

virtual u32 irr::scene::SSkinMeshBuffer::getChangedID_Index ( ) const
inlinevirtual

Get the currently used ID for identification of changes.

This shouldn't be used for anything outside the VideoDriver.

Implements irr::scene::IMeshBuffer.

Definition at line 384 of file SSkinMeshBuffer.h.

◆ getChangedID_Vertex()

virtual u32 irr::scene::SSkinMeshBuffer::getChangedID_Vertex ( ) const
inlinevirtual

Get the currently used ID for identification of changes.

This shouldn't be used for anything outside the VideoDriver.

Implements irr::scene::IMeshBuffer.

Definition at line 382 of file SSkinMeshBuffer.h.

◆ getHardwareMappingHint_Index()

virtual E_HARDWARE_MAPPING irr::scene::SSkinMeshBuffer::getHardwareMappingHint_Index ( ) const
inlinevirtual

get the current hardware mapping hint for index buffers

Implements irr::scene::IMeshBuffer.

Definition at line 342 of file SSkinMeshBuffer.h.

343  {
344  return MappingHint_Index;
345  }
E_HARDWARE_MAPPING MappingHint_Index

◆ getHardwareMappingHint_Vertex()

virtual E_HARDWARE_MAPPING irr::scene::SSkinMeshBuffer::getHardwareMappingHint_Vertex ( ) const
inlinevirtual

get the current hardware mapping hint for vertex buffers

Implements irr::scene::IMeshBuffer.

Definition at line 336 of file SSkinMeshBuffer.h.

337  {
338  return MappingHint_Vertex;
339  }
E_HARDWARE_MAPPING MappingHint_Vertex

◆ getIndexCount()

virtual u32 irr::scene::SSkinMeshBuffer::getIndexCount ( ) const
inlinevirtual

Get index count.

Implements irr::scene::IMeshBuffer.

Definition at line 121 of file SSkinMeshBuffer.h.

122  {
123  return Indices.size();
124  }
u32 size() const
Get number of occupied elements of the array.
Definition: irrArray.h:364
core::array< u16 > Indices

◆ getIndexType()

virtual video::E_INDEX_TYPE irr::scene::SSkinMeshBuffer::getIndexType ( ) const
inlinevirtual

Get type of index data which is stored in this meshbuffer.

Returns
Index type of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 103 of file SSkinMeshBuffer.h.

104  {
105  return video::EIT_16BIT;
106  }

◆ getIndices() [1/2]

virtual const u16* irr::scene::SSkinMeshBuffer::getIndices ( ) const
inlinevirtual

Get pointer to index array.

Implements irr::scene::IMeshBuffer.

Definition at line 109 of file SSkinMeshBuffer.h.

110  {
111  return Indices.const_pointer();
112  }
const T * const_pointer() const
Gets a const pointer to the array.
Definition: irrArray.h:356
core::array< u16 > Indices

◆ getIndices() [2/2]

virtual u16* irr::scene::SSkinMeshBuffer::getIndices ( )
inlinevirtual

Get pointer to index array.

Implements irr::scene::IMeshBuffer.

Definition at line 115 of file SSkinMeshBuffer.h.

116  {
117  return Indices.pointer();
118  }
core::array< u16 > Indices
T * pointer()
Gets a pointer to the array.
Definition: irrArray.h:348

◆ getMaterial() [1/2]

virtual const video::SMaterial& irr::scene::SSkinMeshBuffer::getMaterial ( ) const
inlinevirtual

Get Material of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 34 of file SSkinMeshBuffer.h.

35  {
36  return Material;
37  }

◆ getMaterial() [2/2]

virtual video::SMaterial& irr::scene::SSkinMeshBuffer::getMaterial ( )
inlinevirtual

Get Material of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 40 of file SSkinMeshBuffer.h.

41  {
42  return Material;
43  }

◆ getNormal() [1/2]

virtual const core::vector3df& irr::scene::SSkinMeshBuffer::getNormal ( u32  i) const
inlinevirtual

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 274 of file SSkinMeshBuffer.h.

275  {
276  switch (VertexType)
277  {
278  case video::EVT_2TCOORDS:
279  return Vertices_2TCoords[i].Normal;
280  case video::EVT_TANGENTS:
281  return Vertices_Tangents[i].Normal;
282  default:
283  return Vertices_Standard[i].Normal;
284  }
285  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getNormal() [2/2]

virtual core::vector3df& irr::scene::SSkinMeshBuffer::getNormal ( u32  i)
inlinevirtual

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 288 of file SSkinMeshBuffer.h.

289  {
290  switch (VertexType)
291  {
292  case video::EVT_2TCOORDS:
293  return Vertices_2TCoords[i].Normal;
294  case video::EVT_TANGENTS:
295  return Vertices_Tangents[i].Normal;
296  default:
297  return Vertices_Standard[i].Normal;
298  }
299  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getPosition() [1/2]

virtual const core::vector3df& irr::scene::SSkinMeshBuffer::getPosition ( u32  i) const
inlinevirtual

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 246 of file SSkinMeshBuffer.h.

247  {
248  switch (VertexType)
249  {
250  case video::EVT_2TCOORDS:
251  return Vertices_2TCoords[i].Pos;
252  case video::EVT_TANGENTS:
253  return Vertices_Tangents[i].Pos;
254  default:
255  return Vertices_Standard[i].Pos;
256  }
257  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getPosition() [2/2]

virtual core::vector3df& irr::scene::SSkinMeshBuffer::getPosition ( u32  i)
inlinevirtual

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 260 of file SSkinMeshBuffer.h.

261  {
262  switch (VertexType)
263  {
264  case video::EVT_2TCOORDS:
265  return Vertices_2TCoords[i].Pos;
266  case video::EVT_TANGENTS:
267  return Vertices_Tangents[i].Pos;
268  default:
269  return Vertices_Standard[i].Pos;
270  }
271  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getPrimitiveType()

virtual E_PRIMITIVE_TYPE irr::scene::SSkinMeshBuffer::getPrimitiveType ( ) const
inlinevirtual

Get the kind of primitive geometry which is used by the meshbuffer.

Implements irr::scene::IMeshBuffer.

Definition at line 368 of file SSkinMeshBuffer.h.

369  {
370  return PrimitiveType;
371  }
E_PRIMITIVE_TYPE PrimitiveType
Primitive type used for rendering (triangles, lines, ...)

◆ getTCoords() [1/2]

virtual const core::vector2df& irr::scene::SSkinMeshBuffer::getTCoords ( u32  i) const
inlinevirtual

returns texture coords of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 302 of file SSkinMeshBuffer.h.

303  {
304  switch (VertexType)
305  {
306  case video::EVT_2TCOORDS:
307  return Vertices_2TCoords[i].TCoords;
308  case video::EVT_TANGENTS:
309  return Vertices_Tangents[i].TCoords;
310  default:
311  return Vertices_Standard[i].TCoords;
312  }
313  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getTCoords() [2/2]

virtual core::vector2df& irr::scene::SSkinMeshBuffer::getTCoords ( u32  i)
inlinevirtual

returns texture coords of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 316 of file SSkinMeshBuffer.h.

317  {
318  switch (VertexType)
319  {
320  case video::EVT_2TCOORDS:
321  return Vertices_2TCoords[i].TCoords;
322  case video::EVT_TANGENTS:
323  return Vertices_Tangents[i].TCoords;
324  default:
325  return Vertices_Standard[i].TCoords;
326  }
327  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getVertex()

virtual video::S3DVertex* irr::scene::SSkinMeshBuffer::getVertex ( u32  index)
inlinevirtual

Get standard vertex at given index.

Definition at line 46 of file SSkinMeshBuffer.h.

47  {
48  switch (VertexType)
49  {
51  return (video::S3DVertex*)&Vertices_2TCoords[index];
53  return (video::S3DVertex*)&Vertices_Tangents[index];
54  default:
55  return &Vertices_Standard[index];
56  }
57  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
GLuint index
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getVertexCount()

virtual u32 irr::scene::SSkinMeshBuffer::getVertexCount ( ) const
inlinevirtual

Get vertex count.

Implements irr::scene::IMeshBuffer.

Definition at line 88 of file SSkinMeshBuffer.h.

89  {
90  switch (VertexType)
91  {
93  return Vertices_2TCoords.size();
95  return Vertices_Tangents.size();
96  default:
97  return Vertices_Standard.size();
98  }
99  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getVertexType()

virtual video::E_VERTEX_TYPE irr::scene::SSkinMeshBuffer::getVertexType ( ) const
inlinevirtual

Get vertex type.

Implements irr::scene::IMeshBuffer.

Definition at line 188 of file SSkinMeshBuffer.h.

189  {
190  return VertexType;
191  }
video::E_VERTEX_TYPE VertexType

◆ getVertices() [1/2]

virtual const void* irr::scene::SSkinMeshBuffer::getVertices ( ) const
inlinevirtual

Get pointer to vertex array.

Implements irr::scene::IMeshBuffer.

Definition at line 60 of file SSkinMeshBuffer.h.

61  {
62  switch (VertexType)
63  {
65  return Vertices_2TCoords.const_pointer();
67  return Vertices_Tangents.const_pointer();
68  default:
69  return Vertices_Standard.const_pointer();
70  }
71  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ getVertices() [2/2]

virtual void* irr::scene::SSkinMeshBuffer::getVertices ( )
inlinevirtual

Get pointer to vertex array.

Implements irr::scene::IMeshBuffer.

Definition at line 74 of file SSkinMeshBuffer.h.

75  {
76  switch (VertexType)
77  {
79  return Vertices_2TCoords.pointer();
81  return Vertices_Tangents.pointer();
82  default:
83  return Vertices_Standard.pointer();
84  }
85  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::array< video::S3DVertexTangents > Vertices_Tangents

◆ recalculateBoundingBox()

virtual void irr::scene::SSkinMeshBuffer::recalculateBoundingBox ( )
inlinevirtual

Recalculate bounding box.

Implements irr::scene::IMeshBuffer.

Definition at line 139 of file SSkinMeshBuffer.h.

140  {
142  return;
143 
145 
146  switch (VertexType)
147  {
148  case video::EVT_STANDARD:
149  {
150  if (Vertices_Standard.empty())
151  BoundingBox.reset(0,0,0);
152  else
153  {
155  for (u32 i=1; i<Vertices_Standard.size(); ++i)
157  }
158  break;
159  }
160  case video::EVT_2TCOORDS:
161  {
162  if (Vertices_2TCoords.empty())
163  BoundingBox.reset(0,0,0);
164  else
165  {
167  for (u32 i=1; i<Vertices_2TCoords.size(); ++i)
169  }
170  break;
171  }
172  case video::EVT_TANGENTS:
173  {
174  if (Vertices_Tangents.empty())
175  BoundingBox.reset(0,0,0);
176  else
177  {
179  for (u32 i=1; i<Vertices_Tangents.size(); ++i)
181  }
182  break;
183  }
184  }
185  }
core::array< video::S3DVertex2TCoords > Vertices_2TCoords
video::E_VERTEX_TYPE VertexType
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
void reset(T x, T y, T z)
Resets the bounding box to a one-point box.
Definition: aabbox3d.h:50
core::array< video::S3DVertex > Vertices_Standard
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31
core::aabbox3d< f32 > BoundingBox
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
Definition: S3DVertex.h:21
core::array< video::S3DVertexTangents > Vertices_Tangents
void addInternalPoint(const vector3d< T > &p)
Adds a point to the bounding box.
Definition: aabbox3d.h:74

◆ setBoundingBox()

virtual void irr::scene::SSkinMeshBuffer::setBoundingBox ( const core::aabbox3df box)
inlinevirtual

Set bounding box.

Implements irr::scene::IMeshBuffer.

Definition at line 133 of file SSkinMeshBuffer.h.

134  {
135  BoundingBox = box;
136  }
core::aabbox3d< f32 > BoundingBox

◆ setDirty()

virtual void irr::scene::SSkinMeshBuffer::setDirty ( E_BUFFER_TYPE  Buffer = EBT_VERTEX_AND_INDEX)
inlinevirtual

flags the mesh as changed, reloads hardware buffers

Implements irr::scene::IMeshBuffer.

Definition at line 374 of file SSkinMeshBuffer.h.

375  {
376  if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
378  if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
379  ++ChangedID_Index;
380  }
Change the vertex mapping.
Change both vertex and index mapping to the same value.
Change the index mapping.

◆ setHardwareMappingHint()

virtual void irr::scene::SSkinMeshBuffer::setHardwareMappingHint ( E_HARDWARE_MAPPING  NewMappingHint,
E_BUFFER_TYPE  Buffer = EBT_VERTEX_AND_INDEX 
)
inlinevirtual

set the hardware mapping hint, for driver

Implements irr::scene::IMeshBuffer.

Definition at line 348 of file SSkinMeshBuffer.h.

349  {
350  if (Buffer==EBT_VERTEX)
351  MappingHint_Vertex=NewMappingHint;
352  else if (Buffer==EBT_INDEX)
353  MappingHint_Index=NewMappingHint;
354  else if (Buffer==EBT_VERTEX_AND_INDEX)
355  {
356  MappingHint_Vertex=NewMappingHint;
357  MappingHint_Index=NewMappingHint;
358  }
359  }
Change the vertex mapping.
E_HARDWARE_MAPPING MappingHint_Index
E_HARDWARE_MAPPING MappingHint_Vertex
Change both vertex and index mapping to the same value.
Change the index mapping.

◆ setPrimitiveType()

virtual void irr::scene::SSkinMeshBuffer::setPrimitiveType ( E_PRIMITIVE_TYPE  type)
inlinevirtual

Describe what kind of primitive geometry is used by the meshbuffer.

Implements irr::scene::IMeshBuffer.

Definition at line 362 of file SSkinMeshBuffer.h.

363  {
365  }
GLuint GLuint GLsizei GLenum type
Definition: SDL_opengl.h:1571
E_PRIMITIVE_TYPE PrimitiveType
Primitive type used for rendering (triangles, lines, ...)

Member Data Documentation

◆ BoundingBox

core::aabbox3d<f32> irr::scene::SSkinMeshBuffer::BoundingBox

Definition at line 403 of file SSkinMeshBuffer.h.

◆ BoundingBoxNeedsRecalculated

bool irr::scene::SSkinMeshBuffer::BoundingBoxNeedsRecalculated

Definition at line 412 of file SSkinMeshBuffer.h.

◆ ChangedID_Index

u32 irr::scene::SSkinMeshBuffer::ChangedID_Index

Definition at line 395 of file SSkinMeshBuffer.h.

◆ ChangedID_Vertex

u32 irr::scene::SSkinMeshBuffer::ChangedID_Vertex

Definition at line 394 of file SSkinMeshBuffer.h.

◆ Indices

core::array<u16> irr::scene::SSkinMeshBuffer::Indices

Definition at line 392 of file SSkinMeshBuffer.h.

◆ MappingHint_Index

E_HARDWARE_MAPPING irr::scene::SSkinMeshBuffer::MappingHint_Index

Definition at line 410 of file SSkinMeshBuffer.h.

◆ MappingHint_Vertex

E_HARDWARE_MAPPING irr::scene::SSkinMeshBuffer::MappingHint_Vertex

Definition at line 409 of file SSkinMeshBuffer.h.

◆ Material

video::SMaterial irr::scene::SSkinMeshBuffer::Material

Definition at line 400 of file SSkinMeshBuffer.h.

◆ PrimitiveType

E_PRIMITIVE_TYPE irr::scene::SSkinMeshBuffer::PrimitiveType

Primitive type used for rendering (triangles, lines, ...)

Definition at line 406 of file SSkinMeshBuffer.h.

◆ Transformation

core::matrix4 irr::scene::SSkinMeshBuffer::Transformation

Definition at line 398 of file SSkinMeshBuffer.h.

◆ VertexType

video::E_VERTEX_TYPE irr::scene::SSkinMeshBuffer::VertexType

Definition at line 401 of file SSkinMeshBuffer.h.

◆ Vertices_2TCoords

core::array<video::S3DVertex2TCoords> irr::scene::SSkinMeshBuffer::Vertices_2TCoords

Definition at line 390 of file SSkinMeshBuffer.h.

◆ Vertices_Standard

core::array<video::S3DVertex> irr::scene::SSkinMeshBuffer::Vertices_Standard

Definition at line 391 of file SSkinMeshBuffer.h.

◆ Vertices_Tangents

core::array<video::S3DVertexTangents> irr::scene::SSkinMeshBuffer::Vertices_Tangents

Definition at line 389 of file SSkinMeshBuffer.h.


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