added a few methods for better vector_math compatibility with PS3 SDK version
This commit is contained in:
@@ -40,6 +40,17 @@
|
|||||||
namespace Vectormath {
|
namespace Vectormath {
|
||||||
namespace Aos {
|
namespace Aos {
|
||||||
|
|
||||||
|
|
||||||
|
inline void loadXYZW( Quat & quat, const float* quad )
|
||||||
|
{
|
||||||
|
quat = Quat( *quad );
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void storeXYZW( Quat vec, float * fptr )
|
||||||
|
{
|
||||||
|
vec = Quat(fptr[0],fptr[1],fptr[2],fptr[3]);
|
||||||
|
}
|
||||||
|
|
||||||
inline Quat::Quat( const Quat & quat )
|
inline Quat::Quat( const Quat & quat )
|
||||||
{
|
{
|
||||||
mX = quat.mX;
|
mX = quat.mX;
|
||||||
|
|||||||
@@ -109,6 +109,26 @@ inline const Vector3 slerp( float t, const Vector3 & unitVec0, const Vector3 & u
|
|||||||
return ( ( unitVec0 * scale0 ) + ( unitVec1 * scale1 ) );
|
return ( ( unitVec0 * scale0 ) + ( unitVec1 * scale1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void loadXYZ( Vector3 & vec, const float * quad )
|
||||||
|
{
|
||||||
|
vec = Vector3( *quad );
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void loadXYZW( Vector4 & vec, const float * quad )
|
||||||
|
{
|
||||||
|
vec = Vector4( *quad );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void storeXYZ( Vector3 vec, float * fptr )
|
||||||
|
{
|
||||||
|
vec = Vector3(fptr[0],fptr[1],fptr[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline Vector3 & Vector3::operator =( const Vector3 & vec )
|
inline Vector3 & Vector3::operator =( const Vector3 & vec )
|
||||||
{
|
{
|
||||||
mX = vec.mX;
|
mX = vec.mX;
|
||||||
|
|||||||
Reference in New Issue
Block a user