Fix constness issues of new getSelector method
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3716 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
c61e99a740
commit
5eaa187004
|
@ -114,6 +114,11 @@ public:
|
|||
*/
|
||||
virtual const u32 getSelectorCount() const = 0;
|
||||
|
||||
//! Get TriangleSelector based on index based on getSelectorCount
|
||||
/** Only useful for MetaTriangleSelector, others return 'this' or 0
|
||||
*/
|
||||
virtual ITriangleSelector* getSelector(u32 index) = 0;
|
||||
|
||||
//! Get TriangleSelector based on index based on getSelectorCount
|
||||
/** Only useful for MetaTriangleSelector, others return 'this' or 0
|
||||
*/
|
||||
|
|
|
@ -161,12 +161,23 @@ const u32 CMetaTriangleSelector::getSelectorCount() const
|
|||
}
|
||||
|
||||
|
||||
/* 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())
|
||||
if (index >= TriangleSelectors.size())
|
||||
return 0;
|
||||
return TriangleSelectors[index];
|
||||
}
|
||||
|
|
|
@ -57,6 +57,9 @@ public:
|
|||
// Get the number of TriangleSelectors that are part of this one
|
||||
virtual const u32 getSelectorCount() const;
|
||||
|
||||
// Get the TriangleSelector based on index based on getSelectorCount
|
||||
virtual ITriangleSelector* getSelector(u32 index);
|
||||
|
||||
// Get the TriangleSelector based on index based on getSelectorCount
|
||||
virtual const ITriangleSelector* getSelector(u32 index) const;
|
||||
|
||||
|
|
|
@ -206,6 +206,18 @@ const u32 CTerrainTriangleSelector::getSelectorCount() const
|
|||
}
|
||||
|
||||
|
||||
/* Get the TriangleSelector based on index based on getSelectorCount.
|
||||
Only useful for MetaTriangleSelector others return 'this' or 0
|
||||
*/
|
||||
ITriangleSelector* CTerrainTriangleSelector::getSelector(u32 index)
|
||||
{
|
||||
if (index)
|
||||
return 0;
|
||||
else
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/* Get the TriangleSelector based on index based on getSelectorCount.
|
||||
Only useful for MetaTriangleSelector others return 'this' or 0
|
||||
*/
|
||||
|
|
|
@ -60,6 +60,9 @@ public:
|
|||
// Get the number of TriangleSelectors that are part of this one
|
||||
virtual const u32 getSelectorCount() const;
|
||||
|
||||
// Get the TriangleSelector based on index based on getSelectorCount
|
||||
virtual ITriangleSelector* getSelector(u32 index);
|
||||
|
||||
// Get the TriangleSelector based on index based on getSelectorCount
|
||||
virtual const ITriangleSelector* getSelector(u32 index) const;
|
||||
|
||||
|
|
|
@ -240,6 +240,18 @@ const u32 CTriangleSelector::getSelectorCount() const
|
|||
}
|
||||
|
||||
|
||||
/* Get the TriangleSelector based on index based on getSelectorCount.
|
||||
Only useful for MetaTriangleSelector others return 'this' or 0
|
||||
*/
|
||||
ITriangleSelector* CTriangleSelector::getSelector(u32 index)
|
||||
{
|
||||
if (index)
|
||||
return 0;
|
||||
else
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/* Get the TriangleSelector based on index based on getSelectorCount.
|
||||
Only useful for MetaTriangleSelector others return 'this' or 0
|
||||
*/
|
||||
|
|
|
@ -57,6 +57,9 @@ public:
|
|||
// Get the number of TriangleSelectors that are part of this one
|
||||
virtual const u32 getSelectorCount() const;
|
||||
|
||||
// Get the TriangleSelector based on index based on getSelectorCount
|
||||
virtual ITriangleSelector* getSelector(u32 index);
|
||||
|
||||
// Get the TriangleSelector based on index based on getSelectorCount
|
||||
virtual const ITriangleSelector* getSelector(u32 index) const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue