FPLBase
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
FlatBuffer Utils

Helper functions to load structs in common.fbs from FlatBuffer files. More...

Detailed Description

Helper functions to load structs in common.fbs from FlatBuffer files.

Functions

mathfu::vec2 fplbase::LoadVec2 (const Vec2 *v)
 Converts a Vec2. More...
 
mathfu::vec3 fplbase::LoadVec3 (const Vec3 *v)
 Converts a Vec3. More...
 
mathfu::vec4 fplbase::LoadVec4 (const Vec4 *v)
 Converts a Vec4. More...
 
mathfu::vec2i fplbase::LoadVec2i (const Vec2i *v)
 Converts a Vec2i. More...
 
mathfu::vec3i fplbase::LoadVec3i (const Vec3i *v)
 Converts a Vec3i. More...
 
mathfu::vec4i fplbase::LoadVec4i (const Vec4i *v)
 Converts a Vec4i. More...
 
mathfu::vec3 fplbase::LoadAxis (Axis axis)
 Converts a Axis to the corresponding vec3. More...
 
mathfu::vec4 fplbase::LoadColorRGBA (const ColorRGBA *c)
 Converts a ColorRGBA to a vec4. More...
 
ColorRGBA fplbase::Vec4ToColorRGBA (const mathfu::vec4 &v)
 Converts a vec4 to a ColorRGBA. More...
 
mathfu::AffineTransform fplbase::LoadAffine (const Mat3x4 *m)
 Converts a Mat3x4 to a mat4. More...
 

Function Documentation

mathfu::AffineTransform fplbase::LoadAffine ( const Mat3x4 *  m)
inline

Converts a Mat3x4 to a mat4.

Affine transform can be serialized as a 3x4 matrix (three rows of four elements). The fourth row is (0,0,0,1). We load the rows into the columns of a 4x4 matrix, transpose it, and return it as a mathfu::AffineTransform.

Parameters
mThe Flatbuffer Mat3x4 to convert.
Returns
Returns a converted mathfu mat4.
mathfu::vec3 fplbase::LoadAxis ( Axis  axis)
inline

Converts a Axis to the corresponding vec3.

Parameters
axisThe Flatbuffer Axis to convert.
Returns
Returns the corresponding unit length mathfu vec3.
mathfu::vec4 fplbase::LoadColorRGBA ( const ColorRGBA *  c)
inline

Converts a ColorRGBA to a vec4.

Parameters
cThe Flatbuffer ColorRGBA to convert.
Returns
Returns a converted mathfu vec4.
mathfu::vec2 fplbase::LoadVec2 ( const Vec2 *  v)
inline

Converts a Vec2.

Parameters
vThe Flatbuffer Vec2 to convert.
Returns
Returns a converted mathfu vec2.
mathfu::vec2i fplbase::LoadVec2i ( const Vec2i *  v)
inline

Converts a Vec2i.

Parameters
vThe Flatbuffer Vec2i to convert.
Returns
Returns a converted mathfu vec2i.
mathfu::vec3 fplbase::LoadVec3 ( const Vec3 *  v)
inline

Converts a Vec3.

Parameters
vThe Flatbuffer Vec3 to convert.
Returns
Returns a converted mathfu vec3.
mathfu::vec3i fplbase::LoadVec3i ( const Vec3i *  v)
inline

Converts a Vec3i.

Parameters
vThe Flatbuffer Vec3i to convert.
Returns
Returns a converted mathfu vec3i.
mathfu::vec4 fplbase::LoadVec4 ( const Vec4 *  v)
inline

Converts a Vec4.

Parameters
vThe Flatbuffer Vec4 to convert.
Returns
Returns a converted mathfu vec4.
mathfu::vec4i fplbase::LoadVec4i ( const Vec4i *  v)
inline

Converts a Vec4i.

Parameters
vThe Flatbuffer Vec4i to convert.
Returns
Returns a converted mathfu vec4i.
ColorRGBA fplbase::Vec4ToColorRGBA ( const mathfu::vec4 &  v)
inline

Converts a vec4 to a ColorRGBA.

Parameters
vThe mathfu vec4 to convert.
Returns
Returns a converted ColorRGBA.