Datatypes: add missing unions for vector + color types.
parent
aaec1656f3
commit
59ece7b9fa
|
@ -86,7 +86,12 @@ public:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Red, green, blue and alpha color values
|
// Red, green, blue and alpha color values
|
||||||
TReal r, g, b, a;
|
union {
|
||||||
|
struct {
|
||||||
|
TReal r, g, b, a;
|
||||||
|
};
|
||||||
|
TReal c[ 4 ];
|
||||||
|
};
|
||||||
} PACK_STRUCT; // !struct aiColor4D
|
} PACK_STRUCT; // !struct aiColor4D
|
||||||
|
|
||||||
typedef aiColor4t<float> aiColor4D;
|
typedef aiColor4t<float> aiColor4D;
|
||||||
|
@ -94,7 +99,12 @@ typedef aiColor4t<float> aiColor4D;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
struct aiColor4D {
|
struct aiColor4D {
|
||||||
float r, g, b, a;
|
union {
|
||||||
|
struct {
|
||||||
|
float r, g, b, a;
|
||||||
|
};
|
||||||
|
float c[ 4 ];
|
||||||
|
};
|
||||||
} PACK_STRUCT;
|
} PACK_STRUCT;
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
|
@ -95,7 +95,13 @@ public:
|
||||||
template <typename TOther>
|
template <typename TOther>
|
||||||
operator aiVector2t<TOther> () const;
|
operator aiVector2t<TOther> () const;
|
||||||
|
|
||||||
TReal x, y;
|
union {
|
||||||
|
struct {
|
||||||
|
TReal x, y;
|
||||||
|
};
|
||||||
|
TReal v[ 2 ];
|
||||||
|
};
|
||||||
|
|
||||||
} PACK_STRUCT;
|
} PACK_STRUCT;
|
||||||
|
|
||||||
typedef aiVector2t<float> aiVector2D;
|
typedef aiVector2t<float> aiVector2D;
|
||||||
|
@ -103,7 +109,12 @@ typedef aiVector2t<float> aiVector2D;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
struct aiVector2D {
|
struct aiVector2D {
|
||||||
float x,y;
|
union {
|
||||||
|
struct {
|
||||||
|
float x, y;
|
||||||
|
};
|
||||||
|
float v[ 2 ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
|
@ -125,7 +125,12 @@ public:
|
||||||
* @param o Second factor */
|
* @param o Second factor */
|
||||||
const aiVector3t SymMul(const aiVector3t& o);
|
const aiVector3t SymMul(const aiVector3t& o);
|
||||||
|
|
||||||
TReal x, y, z;
|
union {
|
||||||
|
struct {
|
||||||
|
TReal x, y, z;
|
||||||
|
};
|
||||||
|
TReal v[ 3 ];
|
||||||
|
};
|
||||||
} PACK_STRUCT;
|
} PACK_STRUCT;
|
||||||
|
|
||||||
|
|
||||||
|
@ -134,8 +139,12 @@ typedef aiVector3t<float> aiVector3D;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
struct aiVector3D {
|
struct aiVector3D {
|
||||||
|
union {
|
||||||
float x,y,z;
|
struct {
|
||||||
|
float x, y, z;
|
||||||
|
};
|
||||||
|
float v[ 3 ];
|
||||||
|
};
|
||||||
} PACK_STRUCT;
|
} PACK_STRUCT;
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue