* add atVec2f

This commit is contained in:
2015-07-10 18:45:26 -07:00
parent 8d3524b1f6
commit 4f8df65a3d
4 changed files with 56 additions and 1 deletions

View File

@@ -204,6 +204,27 @@ public:
*/
inline void writeBool(bool val) {writeUBytes((atUint8*)&val, 1);}
/*! \brief Writes an atVec2f (8 bytes) to the buffer and advances the buffer.
* It also swaps the bytes depending on the platform and Stream settings.
*
* \sa Endian
* \param vec The value to write to the buffer
*/
inline void writeVec2f(atVec2f vec)
{
if (m_endian == BigEndian)
{
utility::BigFloat(vec.vec[0]);
utility::BigFloat(vec.vec[1]);
}
else
{
utility::LittleFloat(vec.vec[0]);
utility::LittleFloat(vec.vec[1]);
}
writeUBytes((atUint8*)&vec, 8);
}
/*! \brief Writes an atVec3f (12 bytes) to the buffer and advances the buffer.
* It also swaps the bytes depending on the platform and Stream settings.
*