mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Corrects the documentation.
This commit is contained in:
parent
1407f3953c
commit
0fde97f254
1 changed files with 33 additions and 41 deletions
|
|
@ -325,7 +325,7 @@ TEST(Maths, RotationF_Calculations)
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, Add, RotationF, (RotationF a, RotationF b), ,
|
DefineConsoleFunction(AddRotation, RotationF, (RotationF a, RotationF b), ,
|
||||||
"Adds two rotations together.\n"
|
"Adds two rotations together.\n"
|
||||||
"@param a Rotation one."
|
"@param a Rotation one."
|
||||||
"@param b Rotation two."
|
"@param b Rotation two."
|
||||||
|
|
@ -335,7 +335,7 @@ DefineConsoleStaticMethod(rotation, Add, RotationF, (RotationF a, RotationF b),
|
||||||
return a + b;
|
return a + b;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, Subtract, RotationF, (RotationF a, RotationF b), ,
|
DefineConsoleFunction(SubtractRotation, RotationF, (RotationF a, RotationF b), ,
|
||||||
"Subtracts two rotations.\n"
|
"Subtracts two rotations.\n"
|
||||||
"@param a Rotation one."
|
"@param a Rotation one."
|
||||||
"@param b Rotation two."
|
"@param b Rotation two."
|
||||||
|
|
@ -345,7 +345,7 @@ DefineConsoleStaticMethod(rotation, Subtract, RotationF, (RotationF a, RotationF
|
||||||
return a - b;
|
return a - b;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, Interpolate, RotationF, (RotationF a, RotationF b, F32 factor), ,
|
DefineConsoleFunction(InterpolateRotation, RotationF, (RotationF a, RotationF b, F32 factor), ,
|
||||||
"Interpolates between two rotations.\n"
|
"Interpolates between two rotations.\n"
|
||||||
"@param a Rotation one."
|
"@param a Rotation one."
|
||||||
"@param b Rotation two."
|
"@param b Rotation two."
|
||||||
|
|
@ -358,7 +358,7 @@ DefineConsoleStaticMethod(rotation, Interpolate, RotationF, (RotationF a, Rotati
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, LookAt, RotationF, (Point3F origin, Point3F target, Point3F up),
|
DefineConsoleFunction(RotationLookAt, RotationF, (Point3F origin, Point3F target, Point3F up),
|
||||||
(Point3F(0, 0, 0), Point3F(0, 0, 0), Point3F(0, 0, 1)),
|
(Point3F(0, 0, 0), Point3F(0, 0, 0), Point3F(0, 0, 1)),
|
||||||
"Provides a rotation orientation to look at a target from a given position.\n"
|
"Provides a rotation orientation to look at a target from a given position.\n"
|
||||||
"@param origin Position of the object doing the looking."
|
"@param origin Position of the object doing the looking."
|
||||||
|
|
@ -372,63 +372,55 @@ DefineConsoleStaticMethod(rotation, LookAt, RotationF, (Point3F origin, Point3F
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, setRightVector, RotationF, (RotationF a, VectorF rightVec), ,
|
DefineConsoleFunction(setRotationRightVector, RotationF, (RotationF rot, VectorF rightVec), ,
|
||||||
"Subtracts two rotations.\n"
|
"Sets the right vector of the rotation.\n"
|
||||||
"@param a Rotation one."
|
"@param Starting rotation."
|
||||||
"@param b Rotation two."
|
"@param New up vector."
|
||||||
"@returns v difference of both rotations."
|
"@returns New rotation with the set right vector."
|
||||||
"@ingroup Math")
|
"@ingroup Math")
|
||||||
{
|
{
|
||||||
a.asMatrixF().setColumn(0, rightVec);
|
rot.asMatrixF().setColumn(0, rightVec);
|
||||||
return a;
|
return rot;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, setUpVector, RotationF, (RotationF a, VectorF upVec), ,
|
DefineConsoleFunction(setRotationUpVector, RotationF, (RotationF rot, VectorF upVec), ,
|
||||||
"Subtracts two rotations.\n"
|
"Sets the up vector of the rotation.\n"
|
||||||
"@param a Rotation one."
|
"@param Starting rotation."
|
||||||
"@param b Rotation two."
|
"@param New up vector."
|
||||||
"@returns v difference of both rotations."
|
"@returns New rotation with the set up vector."
|
||||||
"@ingroup Math")
|
"@ingroup Math")
|
||||||
{
|
{
|
||||||
a.asMatrixF().setColumn(2, upVec);
|
rot.asMatrixF().setColumn(2, upVec);
|
||||||
return a;
|
return rot;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, getForwardVector, VectorF, (RotationF a), ,
|
DefineConsoleFunction(getRotationForwardVector, VectorF, (RotationF rot), ,
|
||||||
"Subtracts two rotations.\n"
|
"Get the forward vector of a rotation.\n"
|
||||||
"@param a Rotation one."
|
|
||||||
"@param b Rotation two."
|
|
||||||
"@returns v difference of both rotations."
|
|
||||||
"@ingroup Math")
|
"@ingroup Math")
|
||||||
{
|
{
|
||||||
return a.asMatrixF().getForwardVector();
|
return rot.asMatrixF().getForwardVector();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, getRightVector, VectorF, (RotationF a), ,
|
DefineConsoleFunction(getRotationRightVector, VectorF, (RotationF rot), ,
|
||||||
"Subtracts two rotations.\n"
|
"Gets the right vector of a rotation.\n"
|
||||||
"@param a Rotation one."
|
"@param Our rotation."
|
||||||
"@param b Rotation two."
|
|
||||||
"@returns v difference of both rotations."
|
|
||||||
"@ingroup Math")
|
"@ingroup Math")
|
||||||
{
|
{
|
||||||
return a.asMatrixF().getRightVector();
|
return rot.asMatrixF().getRightVector();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, getUpVector, VectorF, (RotationF a), ,
|
DefineConsoleFunction(getRotationUpVector, VectorF, (RotationF rot), ,
|
||||||
"Subtracts two rotations.\n"
|
"Gets the up vector of a rotation.\n"
|
||||||
"@param a Rotation one."
|
"@param Our rotation."
|
||||||
"@param b Rotation two."
|
|
||||||
"@returns v difference of both rotations."
|
|
||||||
"@ingroup Math")
|
"@ingroup Math")
|
||||||
{
|
{
|
||||||
return a.asMatrixF().getUpVector();
|
return rot.asMatrixF().getUpVector();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleStaticMethod(rotation, getDirection, Point3F, (RotationF rot),,
|
DefineConsoleFunction(getRotationDirection, Point3F, (RotationF rot),,
|
||||||
"Takes the angles of the provided rotation and returns a direction vector.\n"
|
"Gets the direction from the rotation's angles.\n"
|
||||||
"@param rot Our rotation."
|
"@param Our rotation."
|
||||||
"@returns v Direction vector result."
|
"@ingroup Math")
|
||||||
"@ingroup Math")
|
|
||||||
{
|
{
|
||||||
return rot.getDirection();
|
return rot.getDirection();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue