Set the correct default values for MatrixProperties

This commit is contained in:
Alexander Bock
2014-12-17 18:18:12 +01:00
parent 5a7a518bad
commit 72adb770f7
2 changed files with 481 additions and 55 deletions

View File

@@ -68,128 +68,554 @@ namespace properties {
}
REGISTER_NUMERICALPROPERTY_SOURCE(Mat2Property, glm::mat2x2, glm::mat2x2(0),
glm::mat2x2(numeric_limits<float>::lowest()),
glm::mat2x2(numeric_limits<float>::max()),
glm::mat2x2(0.01f),
glm::mat2x2(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat2x2(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat2x2(
0.01f,
0.01f,
0.01f,
0.01f,
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat2x2),
DEFAULT_TO_LUA_LAMBDA(glm::mat2x2), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(Mat2x3Property, glm::mat2x3, glm::mat2x3(0),
glm::mat2x3(numeric_limits<float>::lowest()),
glm::mat2x3(numeric_limits<float>::max()),
glm::mat2x3(0.01f),
glm::mat2x3(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat2x3(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat2x3(
0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat2x3),
DEFAULT_TO_LUA_LAMBDA(glm::mat2x3), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(Mat2x4Property, glm::mat2x4, glm::mat2x4(0),
glm::mat2x4(numeric_limits<float>::lowest()),
glm::mat2x4(numeric_limits<float>::max()),
glm::mat2x4(0.01f),
glm::mat2x4(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat2x4(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat2x4(
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat2x4),
DEFAULT_TO_LUA_LAMBDA(glm::mat2x4), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(Mat3x2Property, glm::mat3x2, glm::mat3x2(0),
glm::mat3x2(numeric_limits<float>::lowest()),
glm::mat3x2(numeric_limits<float>::max()),
glm::mat3x2(0.01f),
glm::mat3x2(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat3x2(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat3x2(
0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat3x2),
DEFAULT_TO_LUA_LAMBDA(glm::mat3x2), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(Mat3Property, glm::mat3x3, glm::mat3x3(0),
glm::mat3x3(numeric_limits<float>::lowest()),
glm::mat3x3(numeric_limits<float>::max()),
glm::mat3x3(0.01f),
glm::mat3x3(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat3x3(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat3x3(
0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat3x3),
DEFAULT_TO_LUA_LAMBDA(glm::mat3x3), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(Mat3x4Property, glm::mat3x4, glm::mat3x4(0),
glm::mat3x4(numeric_limits<float>::lowest()),
glm::mat3x4(numeric_limits<float>::max()),
glm::mat3x4(0.01f),
glm::mat3x4(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat3x4(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat3x4(
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat3x4),
DEFAULT_TO_LUA_LAMBDA(glm::mat3x4), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(Mat4x2Property, glm::mat4x2, glm::mat4x2(0),
glm::mat4x2(numeric_limits<float>::lowest()),
glm::mat4x2(numeric_limits<float>::max()),
glm::mat4x2(0.01f),
glm::mat4x2(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat4x2(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat4x2(
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat4x2),
DEFAULT_TO_LUA_LAMBDA(glm::mat4x2), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(Mat4x3Property, glm::mat4x3, glm::mat4x3(0),
glm::mat4x3(numeric_limits<float>::lowest()),
glm::mat4x3(numeric_limits<float>::max()),
glm::mat4x3(0.01f),
glm::mat4x3(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat4x3(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat4x3(
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat4x3),
DEFAULT_TO_LUA_LAMBDA(glm::mat4x3), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(Mat4Property, glm::mat4x4, glm::mat4x4(0),
glm::mat4x4(numeric_limits<float>::lowest()),
glm::mat4x4(numeric_limits<float>::max()),
glm::mat4x4(0.01f),
glm::mat4x4(
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest(),
numeric_limits<float>::lowest()
),
glm::mat4x4(
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max(),
numeric_limits<float>::max()
),
glm::mat4x4(
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f,
0.01f, 0.01f, 0.01f, 0.01f
),
DEFAULT_FROM_LUA_LAMBDA(glm::mat4x4),
DEFAULT_TO_LUA_LAMBDA(glm::mat4x4), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat2Property, glm::dmat2x2, glm::dmat2x2(0),
glm::dmat2x2(numeric_limits<double>::lowest()),
glm::dmat2x2(numeric_limits<double>::max()),
glm::dmat2x2(0.01),
glm::dmat2x2(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat2x2(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat2x2(
0.01, 0.01,
0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat2x2),
DEFAULT_TO_LUA_LAMBDA(glm::dmat2x2), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat2x3Property, glm::dmat2x3, glm::dmat2x3(0),
glm::dmat2x3(numeric_limits<double>::lowest()),
glm::dmat2x3(numeric_limits<double>::max()),
glm::dmat2x3(0.01),
glm::dmat2x3(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat2x3(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat2x3(
0.01, 0.01, 0.01,
0.01, 0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat2x3),
DEFAULT_TO_LUA_LAMBDA(glm::dmat2x3), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat2x4Property, glm::dmat2x4, glm::dmat2x4(0),
glm::dmat2x4(numeric_limits<double>::lowest()),
glm::dmat2x4(numeric_limits<double>::max()),
glm::dmat2x4(0.01),
glm::dmat2x4(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat2x4(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat2x4(
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat2x4),
DEFAULT_TO_LUA_LAMBDA(glm::dmat2x4), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat3x2Property, glm::dmat3x2, glm::dmat3x2(0),
glm::dmat3x2(numeric_limits<double>::lowest()),
glm::dmat3x2(numeric_limits<double>::max()),
glm::dmat3x2(0.01),
glm::dmat3x2(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat3x2(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat3x2(
0.01, 0.01, 0.01,
0.01, 0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat3x2),
DEFAULT_TO_LUA_LAMBDA(glm::dmat3x2), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat3Property, glm::dmat3x3, glm::dmat3x3(0),
glm::dmat3x3(numeric_limits<double>::lowest()),
glm::dmat3x3(numeric_limits<double>::max()),
glm::dmat3x3(0.01),
glm::dmat3x3(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat3x3(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat3x3(
0.01, 0.01, 0.01,
0.01, 0.01, 0.01,
0.01, 0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat3x3),
DEFAULT_TO_LUA_LAMBDA(glm::dmat3x3), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat3x4Property, glm::dmat3x4, glm::dmat3x4(0),
glm::dmat3x4(numeric_limits<double>::lowest()),
glm::dmat3x4(numeric_limits<double>::max()),
glm::dmat3x4(0.01),
glm::dmat3x4(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat3x4(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat3x4(
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat3x4),
DEFAULT_TO_LUA_LAMBDA(glm::dmat3x4), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat4x2Property, glm::dmat4x2, glm::dmat4x2(0),
glm::dmat4x2(numeric_limits<double>::lowest()),
glm::dmat4x2(numeric_limits<double>::max()),
glm::dmat4x2(0.01),
glm::dmat4x2(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat4x2(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat4x2(
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat4x2),
DEFAULT_TO_LUA_LAMBDA(glm::dmat4x2), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat4x3Property, glm::dmat4x3, glm::dmat4x3(0),
glm::dmat4x3(numeric_limits<double>::lowest()),
glm::dmat4x3(numeric_limits<double>::max()),
glm::dmat4x3(0.01),
glm::dmat4x3(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat4x3(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat4x3(
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat4x3),
DEFAULT_TO_LUA_LAMBDA(glm::dmat4x3), LUA_TTABLE);
REGISTER_NUMERICALPROPERTY_SOURCE(DMat4Property, glm::dmat4x4, glm::dmat4x4(0),
glm::dmat4x4(numeric_limits<double>::lowest()),
glm::dmat4x4(numeric_limits<double>::max()),
glm::dmat4x4(0.01),
glm::dmat4x4(
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest(),
numeric_limits<double>::lowest()
),
glm::dmat4x4(
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max(),
numeric_limits<double>::max()
),
glm::dmat4x4(
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01
),
DEFAULT_FROM_LUA_LAMBDA(glm::dmat4x4),
DEFAULT_TO_LUA_LAMBDA(glm::dmat4x4), LUA_TTABLE);