sanyaade-g2g-repos / quimeraengine

Automatically exported from code.google.com/p/quimeraengine
0 stars 1 forks source link

Unit Tests: QBaseQuaternion, QBaseDualQuaternion, QQuaternion #237

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Implementar los unit tests de las clases:

-QBaseQuaternion
-QBaseDualQuaternion
-QQuaternion
-QDualQuaternion

Original issue reported on code.google.com by Lince3D@gmail.com on 1 Feb 2012 at 6:32

GoogleCodeExporter commented 8 years ago

Original comment by Lince3D@gmail.com on 26 Feb 2012 at 9:11

GoogleCodeExporter commented 8 years ago
Ahora sólo incluye QBaseQuaternion y QQuaternion.

Original comment by Lince3D@gmail.com on 10 Mar 2012 at 12:52

GoogleCodeExporter commented 8 years ago
Y QBaseDualQuaternion.

Original comment by Lince3D@gmail.com on 10 Mar 2012 at 1:16

GoogleCodeExporter commented 8 years ago

Original comment by Lince3D@gmail.com on 10 Mar 2012 at 1:27

GoogleCodeExporter commented 8 years ago
Revisión:

QQuaternion_test

- constructor9 debería ser constructor8, supongo que las demás numeraciones 
deberás corregirlas también.

Tienes puesto "corerctly" en vez de "correctly" en varios sitios.

- Esta frase aparece varias veces:
"Checks that an identity quaternion is obtained when a transformation matrix 
the identity."
Supongo que querías poner algo como:
"Checks that an identity quaternion is obtained when the transformation matrix 
IS the identity."

- If that the quaternion -> if the quaternion
/// <summary>
/// Checks if that the quaternion is correctly added and assigned to itself 
(same instance for both operands).
/// </summary>
QTEST_CASE ( OperatorAdditionAssignation_AddedToItself_Test )

- No entiendo muy bien por qué normalizas antes de algunas operaciones 
(multiplicación, division, producto escalar). Teóricamente,
el resultado de las operaciones (+, -, *, /) es independiente de que el 
cuaternion
esté o no normalizado (osea que no es necesario normalizar para que la 
operación esté correcta),
salvo en las operaciones en las que se busca precisamente ver si el resultado 
sale normalizado o no, claro.
De hecho, creo que eso te ha inducido a error en este caso:
/// <summary>
/// Checks that the dot product equals one when both operands are the same.
/// </summary>
QTEST_CASE ( DotProduct_DotProductEqualsOneWhenRotationAxisIsTheSame_Test )

claro, si el cuaternion se normaliza, debe dar 1, puesto qeu el producto 
escalar es
en ese caso el modulo al cuadrado.

Lo suyo igual hubiera sido comprobar qeu el producto escalar era igual al 
squaredLength

- Creo que sobraría el "2"

/// Checks that the result of interpolating just in the middle between 2 a 
quaternion and its conjugated is an identity quaternion.
QTEST_CASE ( 
Lerp_InterpolatingInTheMiddleOfQuaternionsAndItsConjugatedGivesIdentityQuaternio
n_Test )

- "the" por "eh"

// <summary>
/// Checks that obtained angle is always positive, even when eh angle used to 
build the quaternion was negative.
/// </summary>
QTEST_CASE ( ToAxisAngle1_AngleIsAlwaysPositive_Test )

/// <summary>
/// Checks that obtained angle is always positive, even when eh angle used to 
build the quaternion was negative.
/// </summary>
QTEST_CASE ( ToAxisAngle2_AngleIsAlwaysPositive_Test )

[TODO]: Excepciones; algunos test fallan por problemas en 
QTransformationMatrix; algún caso especial que hay que testear.

Original comment by jwl...@gmail.com on 26 Mar 2012 at 11:08

GoogleCodeExporter commented 8 years ago
Corregido. Subido.

Original comment by Lince3D@gmail.com on 26 Mar 2012 at 8:27