From f9158592e1478b2013afc7041d9ed041cf2d2f4a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 13 Jan 2014 19:47:58 +1000 Subject: Update Irrlicht to 1.8.1. Include actual change markers this time. lol --- .../source/Irrlicht/CMetaTriangleSelector.cpp | 188 --------------------- 1 file changed, 188 deletions(-) delete mode 100644 libraries/irrlicht-1.8/source/Irrlicht/CMetaTriangleSelector.cpp (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CMetaTriangleSelector.cpp') diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CMetaTriangleSelector.cpp b/libraries/irrlicht-1.8/source/Irrlicht/CMetaTriangleSelector.cpp deleted file mode 100644 index cb3c393..0000000 --- a/libraries/irrlicht-1.8/source/Irrlicht/CMetaTriangleSelector.cpp +++ /dev/null @@ -1,188 +0,0 @@ -// 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 - -#include "CMetaTriangleSelector.h" - -namespace irr -{ -namespace scene -{ - -//! constructor -CMetaTriangleSelector::CMetaTriangleSelector() -{ - #ifdef _DEBUG - setDebugName("CMetaTriangleSelector"); - #endif -} - - -//! destructor -CMetaTriangleSelector::~CMetaTriangleSelector() -{ - removeAllTriangleSelectors(); -} - - -//! Returns amount of all available triangles in this selector -s32 CMetaTriangleSelector::getTriangleCount() const -{ - s32 count = 0; - for (u32 i=0; igetTriangleCount(); - - return count; -} - - -//! Gets all triangles. -void CMetaTriangleSelector::getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::matrix4* transform) const -{ - s32 outWritten = 0; - for (u32 i=0; igetTriangles(triangles + outWritten, - arraySize - outWritten, t, transform); - outWritten += t; - if (outWritten==arraySize) - break; - } - - outTriangleCount = outWritten; -} - - -//! Gets all triangles which lie within a specific bounding box. -void CMetaTriangleSelector::getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::aabbox3d& box, - const core::matrix4* transform) const -{ - s32 outWritten = 0; - for (u32 i=0; igetTriangles(triangles + outWritten, - arraySize - outWritten, t, box, transform); - outWritten += t; - if (outWritten==arraySize) - break; - } - - outTriangleCount = outWritten; -} - - -//! Gets all triangles which have or may have contact with a 3d line. -void CMetaTriangleSelector::getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::line3d& line, - const core::matrix4* transform) const -{ - s32 outWritten = 0; - for (u32 i=0; igetTriangles(triangles + outWritten, - arraySize - outWritten, t, line, transform); - outWritten += t; - if (outWritten==arraySize) - break; - } - - outTriangleCount = outWritten; -} - - -//! Adds a triangle selector to the collection of triangle selectors -//! in this metaTriangleSelector. -void CMetaTriangleSelector::addTriangleSelector(ITriangleSelector* toAdd) -{ - if (!toAdd) - return; - - TriangleSelectors.push_back(toAdd); - toAdd->grab(); -} - - -//! Removes a specific triangle selector which was added before from the collection. -bool CMetaTriangleSelector::removeTriangleSelector(ITriangleSelector* toRemove) -{ - for (u32 i=0; idrop(); - TriangleSelectors.erase(i); - return true; - } - } - - return false; -} - - -//! Removes all triangle selectors from the collection. -void CMetaTriangleSelector::removeAllTriangleSelectors() -{ - for (u32 i=0; idrop(); - - TriangleSelectors.clear(); -} - - -//! Return the scene node associated with a given triangle. -ISceneNode* CMetaTriangleSelector::getSceneNodeForTriangle(u32 triangleIndex) const -{ - u32 totalTriangles = 0; - - for (u32 i=0; igetTriangleCount(); - - if(totalTriangles > triangleIndex) - return TriangleSelectors[i]->getSceneNodeForTriangle(0); - } - - // For lack of anything more sensible, return the first selector. - return TriangleSelectors[0]->getSceneNodeForTriangle(0); -} - - -/* Return the number of TriangleSelectors that are inside this one, -Only useful for MetaTriangleSelector others return 1 -*/ -u32 CMetaTriangleSelector::getSelectorCount() const -{ - return TriangleSelectors.size(); -} - - -/* Returns the TriangleSelector based on index based on getSelectorCount -Only useful for MetaTriangleSelector others return 'this' -*/ -ITriangleSelector* CMetaTriangleSelector::getSelector(u32 index) -{ - if (index >= TriangleSelectors.size()) - return 0; - return TriangleSelectors[index]; -} - - -/* Returns the TriangleSelector based on index based on getSelectorCount -Only useful for MetaTriangleSelector others return 'this' -*/ -const ITriangleSelector* CMetaTriangleSelector::getSelector(u32 index) const -{ - if (index >= TriangleSelectors.size()) - return 0; - return TriangleSelectors[index]; -} - - -} // end namespace scene -} // end namespace irr - -- cgit v1.1