From 959831f4ef5a3e797f576c3de08cd65032c997ad Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 13 Jan 2013 18:54:10 +1000 Subject: Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard. --- libraries/irrlicht-1.8/include/SSkinMeshBuffer.h | 808 +++++++++++------------ 1 file changed, 404 insertions(+), 404 deletions(-) (limited to 'libraries/irrlicht-1.8/include/SSkinMeshBuffer.h') diff --git a/libraries/irrlicht-1.8/include/SSkinMeshBuffer.h b/libraries/irrlicht-1.8/include/SSkinMeshBuffer.h index 4582b80..d47de19 100644 --- a/libraries/irrlicht-1.8/include/SSkinMeshBuffer.h +++ b/libraries/irrlicht-1.8/include/SSkinMeshBuffer.h @@ -1,404 +1,404 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SKIN_MESH_BUFFER_H_INCLUDED__ -#define __I_SKIN_MESH_BUFFER_H_INCLUDED__ - -#include "IMeshBuffer.h" -#include "S3DVertex.h" - - -namespace irr -{ -namespace scene -{ - - -//! A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime -struct SSkinMeshBuffer : public IMeshBuffer -{ - //! Default constructor - SSkinMeshBuffer(video::E_VERTEX_TYPE vt=video::EVT_STANDARD) : - ChangedID_Vertex(1), ChangedID_Index(1), VertexType(vt), - MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER), - BoundingBoxNeedsRecalculated(true) - { - #ifdef _DEBUG - setDebugName("SSkinMeshBuffer"); - #endif - } - - //! Get Material of this buffer. - virtual const video::SMaterial& getMaterial() const - { - return Material; - } - - //! Get Material of this buffer. - virtual video::SMaterial& getMaterial() - { - return Material; - } - - //! Get standard vertex at given index - virtual video::S3DVertex *getVertex(u32 index) - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return (video::S3DVertex*)&Vertices_2TCoords[index]; - case video::EVT_TANGENTS: - return (video::S3DVertex*)&Vertices_Tangents[index]; - default: - return &Vertices_Standard[index]; - } - } - - //! Get pointer to vertex array - virtual const void* getVertices() const - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords.const_pointer(); - case video::EVT_TANGENTS: - return Vertices_Tangents.const_pointer(); - default: - return Vertices_Standard.const_pointer(); - } - } - - //! Get pointer to vertex array - virtual void* getVertices() - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords.pointer(); - case video::EVT_TANGENTS: - return Vertices_Tangents.pointer(); - default: - return Vertices_Standard.pointer(); - } - } - - //! Get vertex count - virtual u32 getVertexCount() const - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords.size(); - case video::EVT_TANGENTS: - return Vertices_Tangents.size(); - default: - return Vertices_Standard.size(); - } - } - - //! Get type of index data which is stored in this meshbuffer. - /** \return Index type of this buffer. */ - virtual video::E_INDEX_TYPE getIndexType() const - { - return video::EIT_16BIT; - } - - //! Get pointer to index array - virtual const u16* getIndices() const - { - return Indices.const_pointer(); - } - - //! Get pointer to index array - virtual u16* getIndices() - { - return Indices.pointer(); - } - - //! Get index count - virtual u32 getIndexCount() const - { - return Indices.size(); - } - - //! Get bounding box - virtual const core::aabbox3d& getBoundingBox() const - { - return BoundingBox; - } - - //! Set bounding box - virtual void setBoundingBox( const core::aabbox3df& box) - { - BoundingBox = box; - } - - //! Recalculate bounding box - virtual void recalculateBoundingBox() - { - if(!BoundingBoxNeedsRecalculated) - return; - - BoundingBoxNeedsRecalculated = false; - - switch (VertexType) - { - case video::EVT_STANDARD: - { - if (Vertices_Standard.empty()) - BoundingBox.reset(0,0,0); - else - { - BoundingBox.reset(Vertices_Standard[0].Pos); - for (u32 i=1; i Vertices_Tangents; - core::array Vertices_2TCoords; - core::array Vertices_Standard; - core::array Indices; - - u32 ChangedID_Vertex; - u32 ChangedID_Index; - - //ISkinnedMesh::SJoint *AttachedJoint; - core::matrix4 Transformation; - - video::SMaterial Material; - video::E_VERTEX_TYPE VertexType; - - core::aabbox3d BoundingBox; - - // hardware mapping hint - E_HARDWARE_MAPPING MappingHint_Vertex:3; - E_HARDWARE_MAPPING MappingHint_Index:3; - - bool BoundingBoxNeedsRecalculated:1; -}; - - -} // end namespace scene -} // end namespace irr - -#endif - +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SKIN_MESH_BUFFER_H_INCLUDED__ +#define __I_SKIN_MESH_BUFFER_H_INCLUDED__ + +#include "IMeshBuffer.h" +#include "S3DVertex.h" + + +namespace irr +{ +namespace scene +{ + + +//! A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime +struct SSkinMeshBuffer : public IMeshBuffer +{ + //! Default constructor + SSkinMeshBuffer(video::E_VERTEX_TYPE vt=video::EVT_STANDARD) : + ChangedID_Vertex(1), ChangedID_Index(1), VertexType(vt), + MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER), + BoundingBoxNeedsRecalculated(true) + { + #ifdef _DEBUG + setDebugName("SSkinMeshBuffer"); + #endif + } + + //! Get Material of this buffer. + virtual const video::SMaterial& getMaterial() const + { + return Material; + } + + //! Get Material of this buffer. + virtual video::SMaterial& getMaterial() + { + return Material; + } + + //! Get standard vertex at given index + virtual video::S3DVertex *getVertex(u32 index) + { + switch (VertexType) + { + case video::EVT_2TCOORDS: + return (video::S3DVertex*)&Vertices_2TCoords[index]; + case video::EVT_TANGENTS: + return (video::S3DVertex*)&Vertices_Tangents[index]; + default: + return &Vertices_Standard[index]; + } + } + + //! Get pointer to vertex array + virtual const void* getVertices() const + { + switch (VertexType) + { + case video::EVT_2TCOORDS: + return Vertices_2TCoords.const_pointer(); + case video::EVT_TANGENTS: + return Vertices_Tangents.const_pointer(); + default: + return Vertices_Standard.const_pointer(); + } + } + + //! Get pointer to vertex array + virtual void* getVertices() + { + switch (VertexType) + { + case video::EVT_2TCOORDS: + return Vertices_2TCoords.pointer(); + case video::EVT_TANGENTS: + return Vertices_Tangents.pointer(); + default: + return Vertices_Standard.pointer(); + } + } + + //! Get vertex count + virtual u32 getVertexCount() const + { + switch (VertexType) + { + case video::EVT_2TCOORDS: + return Vertices_2TCoords.size(); + case video::EVT_TANGENTS: + return Vertices_Tangents.size(); + default: + return Vertices_Standard.size(); + } + } + + //! Get type of index data which is stored in this meshbuffer. + /** \return Index type of this buffer. */ + virtual video::E_INDEX_TYPE getIndexType() const + { + return video::EIT_16BIT; + } + + //! Get pointer to index array + virtual const u16* getIndices() const + { + return Indices.const_pointer(); + } + + //! Get pointer to index array + virtual u16* getIndices() + { + return Indices.pointer(); + } + + //! Get index count + virtual u32 getIndexCount() const + { + return Indices.size(); + } + + //! Get bounding box + virtual const core::aabbox3d& getBoundingBox() const + { + return BoundingBox; + } + + //! Set bounding box + virtual void setBoundingBox( const core::aabbox3df& box) + { + BoundingBox = box; + } + + //! Recalculate bounding box + virtual void recalculateBoundingBox() + { + if(!BoundingBoxNeedsRecalculated) + return; + + BoundingBoxNeedsRecalculated = false; + + switch (VertexType) + { + case video::EVT_STANDARD: + { + if (Vertices_Standard.empty()) + BoundingBox.reset(0,0,0); + else + { + BoundingBox.reset(Vertices_Standard[0].Pos); + for (u32 i=1; i Vertices_Tangents; + core::array Vertices_2TCoords; + core::array Vertices_Standard; + core::array Indices; + + u32 ChangedID_Vertex; + u32 ChangedID_Index; + + //ISkinnedMesh::SJoint *AttachedJoint; + core::matrix4 Transformation; + + video::SMaterial Material; + video::E_VERTEX_TYPE VertexType; + + core::aabbox3d BoundingBox; + + // hardware mapping hint + E_HARDWARE_MAPPING MappingHint_Vertex:3; + E_HARDWARE_MAPPING MappingHint_Index:3; + + bool BoundingBoxNeedsRecalculated:1; +}; + + +} // end namespace scene +} // end namespace irr + +#endif + -- cgit v1.1