Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
MCore::Endian Class Reference

#include <Endian.h>

Public Types

enum  EEndianType { ENDIAN_LITTLE = 0 , ENDIAN_BIG = 1 }
 

Static Public Member Functions

static MCORE_INLINE void ConvertUnsignedInt16 (uint16 *value, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt32 (uint32 *value, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt64 (uint64 *value, uint32 count=1)
 
static MCORE_INLINE void ConvertSignedInt16 (int16 *value, uint32 count=1)
 
static MCORE_INLINE void ConvertSignedInt32 (int32 *value, uint32 count=1)
 
static MCORE_INLINE void ConvertFloat (float *value, uint32 count=1)
 
static MCORE_INLINE void ConvertVector2 (AZ::Vector2 *value, uint32 count=1)
 
static MCORE_INLINE void ConvertVector3 (AZ::Vector3 *value, uint32 count=1)
 
static MCORE_INLINE void ConvertVector4 (AZ::Vector4 *value, uint32 count=1)
 
static MCORE_INLINE void ConvertQuaternion (AZ::Quaternion *value, uint32 count=1)
 
static MCORE_INLINE void Convert16BitQuaternion (MCore::Compressed16BitQuaternion *value, uint32 count=1)
 
static MCORE_INLINE void ConvertRGBAColor (MCore::RGBAColor *value, uint32 count=1)
 
static MCORE_INLINE void SwapBytes (uint8 *byteA, uint8 *byteB)
 
static MCORE_INLINE void ConvertEndian16 (uint8 *buffer, uint32 count=1)
 
static MCORE_INLINE void ConvertEndian32 (uint8 *buffer, uint32 count=1)
 
static MCORE_INLINE void ConvertEndian64 (uint8 *buffer, uint32 count=1)
 
static MCORE_INLINE void ConvertFloat (float *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertSignedInt32 (int32 *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt32 (uint32 *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt64 (uint64 *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertSignedInt16 (int16 *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt16 (uint16 *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector2 (AZ::Vector2 *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector3 (AZ::Vector3 *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector4 (AZ::Vector4 *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertQuaternion (AZ::Quaternion *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void Convert16BitQuaternion (MCore::Compressed16BitQuaternion *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertRGBAColor (MCore::RGBAColor *value, EEndianType sourceEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertFloat (float *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertSignedInt32 (int32 *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt32 (uint32 *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt64 (uint64 *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertSignedInt16 (int16 *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt16 (uint16 *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector2 (AZ::Vector2 *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector3 (AZ::Vector3 *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector4 (AZ::Vector4 *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertQuaternion (AZ::Quaternion *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void Convert16BitQuaternion (MCore::Compressed16BitQuaternion *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertRGBAColor (MCore::RGBAColor *value, EEndianType sourceEndianType, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertFloatTo (float *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertSignedInt32To (int32 *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt32To (uint32 *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertSignedInt16To (int16 *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertUnsignedInt16To (uint16 *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector2To (AZ::Vector2 *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector3To (AZ::Vector3 *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertVector4To (AZ::Vector4 *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertQuaternionTo (AZ::Quaternion *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void Convert16BitQuaternionTo (MCore::Compressed16BitQuaternion *value, EEndianType targetEndianType, uint32 count=1)
 
static MCORE_INLINE void ConvertRGBAColorTo (MCore::RGBAColor *value, EEndianType targetEndianType, uint32 count=1)
 

Detailed Description

The endian class is a collection of static functions that allow you to convert specific object types into another endian conversion. This is useful when loading files from disk, which are stored in another endian than the platform you are running your code on.

Member Enumeration Documentation

◆ EEndianType

The supported endian conversion types.

Enumerator
ENDIAN_LITTLE 

Least significant bits have lowest memory address

ENDIAN_BIG 

Most significant bits have lowest memory address

Member Function Documentation

◆ Convert16BitQuaternion() [1/3]

MCORE_INLINE void Endian::Convert16BitQuaternion ( MCore::Compressed16BitQuaternion value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a 16-bit compressed Quaternion object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ Convert16BitQuaternion() [2/3]

static MCORE_INLINE void MCore::Endian::Convert16BitQuaternion ( MCore::Compressed16BitQuaternion value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert a 16-bit compressed Quaternion object into the endian used by our current platform.

Parameters
valueThe object to convert the endian for.
sourceEndianTypeThe endian type where the object is currently stored in.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ Convert16BitQuaternion() [3/3]

MCORE_INLINE void Endian::Convert16BitQuaternion ( MCore::Compressed16BitQuaternion value,
uint32  count = 1 
)
static

Swap the endian of one or more 16-bit compressed Quaternion objects.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ Convert16BitQuaternionTo()

MCORE_INLINE void Endian::Convert16BitQuaternionTo ( MCore::Compressed16BitQuaternion value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a 16-bit compressed Quaternion object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertEndian16()

MCORE_INLINE void Endian::ConvertEndian16 ( uint8 *  buffer,
uint32  count = 1 
)
static

Switches the endian (little or big) of a set of 16 bit values. This means the byte order gets inverted. A byte order of (B1 B2) gets converted into (B2 B1).

Parameters
bufferThe input buffer that points to the data containing the values to be converted.
countThe number of 16 bit values to convert.

◆ ConvertEndian32()

MCORE_INLINE void Endian::ConvertEndian32 ( uint8 *  buffer,
uint32  count = 1 
)
static

Switches the endian (little or big) of a set of 32 bit values. This means the byte order gets inverted. A byte order of (B1 B2 B3 B4) gets converted into (B4 B3 B2 B1).

Parameters
bufferThe input buffer that points to the data containing the values to be converted.
countThe number of 32 bit values to convert.

◆ ConvertEndian64()

MCORE_INLINE void Endian::ConvertEndian64 ( uint8 *  buffer,
uint32  count = 1 
)
static

Switches the endian (little or big) of a set of 64 bit values. This means the byte order gets inverted. A byte order of (B1 B2 B3 B4 B5 B6 B7 B8) gets converted into (B8 B7 B6 B5 B4 B3 B2 B1).

Parameters
bufferThe input buffer that points to the data containing the values to be converted.
countThe number of 64 bit values to convert.

◆ ConvertFloat() [1/3]

MCORE_INLINE void Endian::ConvertFloat ( float *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a floating point value into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertFloat() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertFloat ( float *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert one or more 32 bit floating point values into the endian used by our current platform.

Parameters
valueThe value(s) to convert. The number of values to follow at the specified address must be at least the number that you pass to the count parameter.
sourceEndianTypeThe endian type where the float is currently stored in.
countThe number of floats to convert.

◆ ConvertFloat() [3/3]

MCORE_INLINE void Endian::ConvertFloat ( float *  value,
uint32  count = 1 
)
static

Swap the endian of one or more floats.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertFloatTo()

MCORE_INLINE void Endian::ConvertFloatTo ( float *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a floating point value into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertQuaternion() [1/3]

MCORE_INLINE void Endian::ConvertQuaternion ( AZ::Quaternion *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a Quaternion object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertQuaternion() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertQuaternion ( AZ::Quaternion *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert a Quaternion object into the endian used by our current platform.

Parameters
valueThe object to convert the endian for.
sourceEndianTypeThe endian type where the object is currently stored in.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertQuaternion() [3/3]

MCORE_INLINE void Endian::ConvertQuaternion ( AZ::Quaternion *  value,
uint32  count = 1 
)
static

Swap the endian of one or more Quaternion objects.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertQuaternionTo()

MCORE_INLINE void Endian::ConvertQuaternionTo ( AZ::Quaternion *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a Quaternion object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertRGBAColor() [1/3]

MCORE_INLINE void Endian::ConvertRGBAColor ( MCore::RGBAColor value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert an RGBAColor object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertRGBAColor() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertRGBAColor ( MCore::RGBAColor value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert a RGBAColor object into the endian used by our current platform.

Parameters
valueThe object to convert the endian for.
sourceEndianTypeThe endian type where the object is currently stored in.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertRGBAColor() [3/3]

MCORE_INLINE void Endian::ConvertRGBAColor ( MCore::RGBAColor value,
uint32  count = 1 
)
static

Swap the endian of one or more RGBAColor objects.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertRGBAColorTo()

MCORE_INLINE void Endian::ConvertRGBAColorTo ( MCore::RGBAColor value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert an RGBAColor object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertSignedInt16() [1/3]

MCORE_INLINE void Endian::ConvertSignedInt16 ( int16 *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert an 16 bit short into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertSignedInt16() [2/3]

MCORE_INLINE void Endian::ConvertSignedInt16 ( int16 *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert one or more 16 bit short values into the endian used by our current platform.

Parameters
valueThe value(s) to convert. The number of values to follow at the specified address must be at least the number that you pass to the count parameter.
sourceEndianTypeThe endian type where the short is currently stored in.
countThe number of shorts to convert.

◆ ConvertSignedInt16() [3/3]

MCORE_INLINE void Endian::ConvertSignedInt16 ( int16 *  value,
uint32  count = 1 
)
static

Swap the endian of one or more shorts.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertSignedInt16To()

MCORE_INLINE void Endian::ConvertSignedInt16To ( int16 *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert an 16 bit short into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertSignedInt32() [1/3]

MCORE_INLINE void Endian::ConvertSignedInt32 ( int32 *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a 32 bit int32 into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertSignedInt32() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertSignedInt32 ( int32 *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert one or more 32 bit integer values into the endian used by our current platform.

Parameters
valueThe value(s) to convert. The number of values to follow at the specified address must be at least the number that you pass to the count parameter.
sourceEndianTypeThe endian type where the int32 is currently stored in.
countThe number of integers to convert.

◆ ConvertSignedInt32() [3/3]

MCORE_INLINE void Endian::ConvertSignedInt32 ( int32 *  value,
uint32  count = 1 
)
static

Swap the endian of one or more ints.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertSignedInt32To()

MCORE_INLINE void Endian::ConvertSignedInt32To ( int32 *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a 32 bit int32 into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertUnsignedInt16() [1/3]

MCORE_INLINE void Endian::ConvertUnsignedInt16 ( uint16 *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert an unsigned 16 bit short into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertUnsignedInt16() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertUnsignedInt16 ( uint16 *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert one or more 16 bit uint16 values into the endian used by our current platform.

Parameters
valueThe value(s) to convert. The number of values to follow at the specified address must be at least the number that you pass to the count parameter.
sourceEndianTypeThe endian type where the short is currently stored in.
countThe number of shorts to convert.

◆ ConvertUnsignedInt16() [3/3]

MCORE_INLINE void Endian::ConvertUnsignedInt16 ( uint16 *  value,
uint32  count = 1 
)
static

Swap the endian of one or more unsigned shorts.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertUnsignedInt16To()

MCORE_INLINE void Endian::ConvertUnsignedInt16To ( uint16 *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert an unsigned 16 bit short into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertUnsignedInt32() [1/3]

MCORE_INLINE void Endian::ConvertUnsignedInt32 ( uint32 *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a 32 bit uint32 into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertUnsignedInt32() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertUnsignedInt32 ( uint32 *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert one or more 32 bit unsigned integer values into the endian used by our current platform.

Parameters
valueThe value(s) to convert. The number of values to follow at the specified address must be at least the number that you pass to the count parameter.
sourceEndianTypeThe endian type where the int32 is currently stored in.
countThe number of integers to convert.

◆ ConvertUnsignedInt32() [3/3]

MCORE_INLINE void Endian::ConvertUnsignedInt32 ( uint32 *  value,
uint32  count = 1 
)
static

Swap the endian of one or more unsigned ints.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertUnsignedInt32To()

MCORE_INLINE void Endian::ConvertUnsignedInt32To ( uint32 *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a 32 bit uint32 into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector2() [1/3]

MCORE_INLINE void Endian::ConvertVector2 ( AZ::Vector2 *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a Vector2 object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector2() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertVector2 ( AZ::Vector2 *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert a Vector2 object into the endian used by our current platform.

Parameters
valueThe object to convert the endian for.
sourceEndianTypeThe endian type where the object is currently stored in.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector2() [3/3]

MCORE_INLINE void Endian::ConvertVector2 ( AZ::Vector2 *  value,
uint32  count = 1 
)
static

Swap the endian of one or more Vector2 objects.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertVector2To()

MCORE_INLINE void Endian::ConvertVector2To ( AZ::Vector2 *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a Vector2 object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector3() [1/3]

MCORE_INLINE void Endian::ConvertVector3 ( AZ::Vector3 *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a Vector3 object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector3() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertVector3 ( AZ::Vector3 *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert a PackedVector3f object into the endian used by our current platform.

Parameters
valueThe object to convert the endian for.
sourceEndianTypeThe endian type where the object is currently stored in.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector3() [3/3]

MCORE_INLINE void Endian::ConvertVector3 ( AZ::Vector3 *  value,
uint32  count = 1 
)
static

Swap the endian of one or more PackedVector3f objects.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertVector3To()

MCORE_INLINE void Endian::ConvertVector3To ( AZ::Vector3 *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a Vector3 object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector4() [1/3]

MCORE_INLINE void Endian::ConvertVector4 ( AZ::Vector4 *  value,
EEndianType  sourceEndianType,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a Vector4 object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
sourceEndianTypeThe endian type where the value is currently stored in, before conversion.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector4() [2/3]

static MCORE_INLINE void MCore::Endian::ConvertVector4 ( AZ::Vector4 *  value,
EEndianType  sourceEndianType,
uint32  count = 1 
)
static

Convert a Vector4 object into the endian used by our current platform.

Parameters
valueThe object to convert the endian for.
sourceEndianTypeThe endian type where the object is currently stored in.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ ConvertVector4() [3/3]

MCORE_INLINE void Endian::ConvertVector4 ( AZ::Vector4 *  value,
uint32  count = 1 
)
static

Swap the endian of one or more Vector4 objects.

Parameters
valueThe value to convert the endian for.
countThe number of items to convert. Please note that the array specified by value must be large enough!

◆ ConvertVector4To()

MCORE_INLINE void Endian::ConvertVector4To ( AZ::Vector4 *  value,
EEndianType  targetEndianType,
uint32  count = 1 
)
static

Convert a Vector4 object into another endian type.

Parameters
valueA pointer to the object to convert/modify.
targetEndianTypeThe endian type that the value should be converted into.
countThe number of objects to convert. This allows conversion of arrays at once.

◆ SwapBytes()

MCORE_INLINE void Endian::SwapBytes ( uint8 *  byteA,
uint8 *  byteB 
)
static

Swap two bytes values. This means that after executing this method, the memory address of byteA will contain the value of the byte stored at memory address byteB, and the other way around.

Parameters
byteAThe memory address of byte number one.
byteBThe memory address of byte number two.

The documentation for this class was generated from the following files: