Frustrum::Split & Frustrum::WriteToByte edited

Their paramlists did not follow coding practice standard. Now corrected.
Old versions still available as inline methods and is marked DEPRECATED.
This commit is contained in:
Dander7BD 2013-11-10 13:34:35 +01:00
parent c021187db9
commit 4f14c5662e
2 changed files with 15 additions and 4 deletions

View File

@ -101,7 +101,7 @@ Frustrum & Frustrum::operator = ( const Float4x4 &vp )
return *this;
}
void Frustrum::Split( Frustrum target[], unsigned int numX, unsigned int numY, unsigned int numZ ) const
void Frustrum::Split( unsigned int numX, unsigned int numY, unsigned int numZ, Frustrum target[] ) const
{
float incrementX = 1.0f / numX,
incrementY = 1.0f / numY,
@ -174,7 +174,7 @@ void Frustrum::Split( Frustrum target[], unsigned int numX, unsigned int numY, u
}
}
void Frustrum::WriteToByte( unsigned char targetMem[], unsigned int &nextIndex ) const
void Frustrum::WriteToByte( unsigned int &nextIndex, unsigned char targetMem[] ) const
{
Float *fMem = (Float*)&targetMem[nextIndex];
for( int p = 0; p < 6; ++p )

View File

@ -31,13 +31,24 @@ namespace Oyster { namespace Collision3D
Frustrum & operator = ( const Frustrum &frustrum );
Frustrum & operator = ( const ::Oyster::Math::Float4x4 &viewProjection );
void Split( Frustrum targetList[], unsigned int numX, unsigned int numY = 1U, unsigned int numZ = 1u ) const;
void WriteToByte( unsigned char targetMem[], unsigned int &nextIndex ) const;
void Split( unsigned int numX, unsigned int numY, unsigned int numZ, Frustrum targetList[] ) const;
void WriteToByte( unsigned int &nextIndex, unsigned char targetMem[] ) const;
void Split( Frustrum targetList[], unsigned int numX, unsigned int numY = 1U, unsigned int numZ = 1u ) const; /// DEPRECATED
void WriteToByte( unsigned char targetMem[], unsigned int &nextIndex ) const; /// DEPRECATED
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};
// INLINE IMPLEMENTATIONS ///////////////////////////////////////
inline void Frustrum::Split( Frustrum targetList[], unsigned int numX, unsigned int numY, unsigned int numZ ) const /// DEPRECATED
{ this->Split( numX, numY, numZ, targetList ); }
inline void Frustrum::WriteToByte( unsigned char targetMem[], unsigned int &nextIndex ) const /// DEPRECATED
{ this->WriteToByte( nextIndex, targetMem ); }
} }
#endif