};
-// compiler generated destructor, copy constructor and assignment operators are ok as this class is POD
+// Compiler generated destructor, copy constructor and assignment operators are ok as this class is POD
/**
* @brief Compare two angle axis for equality
* @SINCE_1_0.0
* @param lhs angle axis
* @param rhs angle axis
- * @return true if they are equal
+ * @return True if they are equal
*/
inline bool operator==( const Dali::AngleAxis& lhs, const Dali::AngleAxis& rhs )
{
/**
* @brief Compile time template to calculate base to the power of N.
*
- * Note! values need to be compile time constants
- * Usage: <code>Power< 10, 2 >::value; // value=100</code>
* @SINCE_1_0.0
- * @param mantissa to raise to exponent
- * @param N exponent to use for mantissa
+ * @tparam mantissa to raise to exponent
+ * @tparam exponent to use for mantissa
+ * @note values need to be compile time constants
+ * Usage: <code>Power< 10, 2 >::value; // value=100</code>
*/
template< size_t mantissa, size_t exponent >
struct Power
*
* Specialisation for power of 1
* @SINCE_1_0.0
- * @param mantissa to raise to exponent
+ * @tparam mantissa to raise to exponent
*/
template< size_t mantissa >
struct Power< mantissa, 1 >
*
* Specialisation for power of 0
* @SINCE_1_0.0
- * @param mantissa to raise to exponent
+ * @tparam mantissa to raise to exponent
*/
template< size_t mantissa >
struct Power< mantissa, 0 >
/**
* @brief Compile time template to calculate base logarithm of N.
*
- * Note! values need to be compile time constants
- * Usage: <code>Log< 100, 10 >::value; value equals 2</code>
* @SINCE_1_0.0
- * @param number for which to calculate the logarithm
- * @param base logarithm to calculate
+ * @tparam number for which to calculate the logarithm
+ * @tparam base logarithm to calculate
+ * @note values need to be compile time constants
+ * Usage: <code>Log< 100, 10 >::value; value equals 2</code>
*/
template< size_t number, size_t base = 2 >
struct Log
*
* Specialisation for logarithm of 1
* @SINCE_1_0.0
- * @param base logarithm to calculate
+ * @tparam base logarithm to calculate
*/
template< size_t base >
struct Log< 1, base >
*
* Specialisation for logarithm of 0
* @SINCE_1_0.0
- * @param base logarithm to calculate
+ * @tparam base logarithm to calculate
*/
template< size_t base >
struct Log< 0, base >
/**
* @brief Compile time template to calculate the machine epsilon for a given floating point number.
*
- * Note! value needs to be compile time constant
- * Usage: <code>Epsilon<1000>::value; value equals 0.000119209</code>
* @SINCE_1_0.0
- * @param N the number for which to calculate the machine epsilon
+ * @tparam N the number for which to calculate the machine epsilon
+ * @note value needs to be compile time constant
+ * Usage: <code>Epsilon<1000>::value; value equals 0.000119209</code>
*/
template< size_t N >
struct Epsilon
* @brief Returns the next power of two.
*
* In case of numbers which are already a power of two this function returns the original number.
- * If i is zero returns 1
+ * If i is zero returns 1.
* @SINCE_1_0.0
- * @param[in] i input number
- * @return next power of two or i itself in case it's a power of two
+ * @param[in] i Input number
+ * @return The next power of two or i itself in case it's a power of two
*/
inline unsigned int NextPowerOfTwo( unsigned int i )
{
* @brief Whether a number is power of two.
*
* @SINCE_1_0.0
- * @param[in] i input number
- * @return true if i is power of two
+ * @param[in] i Input number
+ * @return True if i is power of two.
*/
inline bool IsPowerOfTwo( unsigned int i )
{
*
* @SINCE_1_0.0
* @param[in] offset The offset through the range @p low to @p high.
- * This value is clamped between 0 and 1
+ * This value is clamped between 0 and 1.
* @param[in] low Lowest value in range
* @param[in] high Highest value in range
* @return A value between low and high.
* start: 2
* end: 8
*
+ * @code
* 2 8
* (\ / start) (\ / end)
* |----x |
+ * @endcode
*
* The value x will be confined to this domain.
* If x is below 2 e.g. 0, then it is wraped to 6.
* If x is above or equal to 8 e.g. 8.1 then it is
- * wrapped to 2.1
+ * wrapped to 2.1.
*
* Domain wrapping is useful for various problems from
* calculating positions in a space that repeats, to
* @param[in] end The end of the domain
*
* @return the wrapped value over the domain (start) (end)
- * @note if start = end (i.e. size of domain 0), then wrapping will not occur
+ * @note If start = end (i.e. size of domain 0), then wrapping will not occur
* and result will always be equal to start.
*
*/
* @brief Find the shortest distance (magnitude) and direction (sign)
* from (a) to (b) in domain (start) to (end).
*
- * (\ / start) (\ / end)
- * |-a b<----|
+ * @code
+ * (\ / start) (\ / end)
+ * |-a b<----|
+ * @endcode
*
* Knowing the shortest distance is useful with wrapped domains
* to solve problems such as determing the closest object to
* @param start the start of the domain
* @param end the end of the domain
* @return the shortest direction (the sign) and distance (the magnitude)
- * @note assumes both (a) and (b) are already within the domain
- * (start) to (end)
+ * @note Assumes both (a) and (b) are already within the domain
+ * (start) to (end).
*
*/
inline float ShortestDistanceInDomain( float a, float b, float start, float end )
/**
* @brief The Matrix class represents transformations and projections.
+ *
* It is agnostic w.r.t. row/column major notation - it operates on a flat array.
* Each axis is contiguous in memory, so the x axis corresponds to elements 0, 1, 2 and 3, the y axis dorresponds to elements 4, 5, 6, 7, etc.
* @SINCE_1_0.0
* @brief Constructor.
*
* @SINCE_1_0.0
- * @param initialize to zero or leave uninitialized
+ * @param[in] initialize True for initialization by zero or otherwise
*/
explicit Matrix( bool initialize );
* The matrix is initialised with the contents of 'array' which must contain 16 floats.
* The order of the values for a transform matrix is:
*
+ * @code
+ *
* xAxis.x xAxis.y xAxis.z 0.0f
* yAxis.x yAxis.y yAxis.z 0.0f
* zAxis.x zAxis.y zAxis.z 0.0f
* trans.x trans.y trans.z 1.0f
*
+ * @endcode
+ *
* @SINCE_1_0.0
- * @param [in] array 16 floats
+ * @param [in] array Pointer of 16 floats data
*/
explicit Matrix(const float* array);
* @brief Constructs a matrix from quaternion.
*
* @SINCE_1_0.0
- * @param rotation as quaternion
+ * @param rotation Rotation as quaternion
*/
explicit Matrix( const Quaternion& rotation );
* @brief Copy constructor.
*
* @SINCE_1_0.0
- * @param [in] matrix to copy values from
+ * @param [in] matrix A reference to the copied matrix
*/
Matrix( const Matrix& matrix );
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param [in] matrix to copy values from
- * @return a reference to this
+ * @param [in] matrix A reference to the copied matrix
+ * @return A reference to this
*/
Matrix& operator=( const Matrix& matrix );
* @brief Sets this matrix to be an identity matrix with scale.
*
* @SINCE_1_0.0
- * @param scale to set on top of identity matrix
+ * @param[in] scale Scale to set on top of identity matrix
*/
void SetIdentityAndScale( const Vector3& scale );
* Any Matrix representing only a rotation and/or translation
* can be inverted using this function. It is faster and more accurate then using Invert().
* @SINCE_1_0.0
- * @param [out] result returns the inverse of this matrix
+ * @param [out] result The inverse of this matrix
*/
void InvertTransform(Matrix& result) const;
*
* This assumes the matrix is a transform matrix.
* @SINCE_1_0.0
- * @param [in] axis the values to set the axis to
+ * @param[in] axis The values to set the axis to
*/
void SetXAxis(const Vector3& axis);
*
* This assumes the matrix is a transform matrix.
* @SINCE_1_0.0
- * @param [in] axis the values to set the axis to
+ * @param[in] axis The values to set the axis to
*/
void SetYAxis(const Vector3& axis);
*
* This assumes the matrix is a transform matrix.
* @SINCE_1_0.0
- * @param [in] axis the values to set the axis to
+ * @param[in] axis The values to set the axis to
*/
void SetZAxis(const Vector3& axis);
*
* This assumes the matrix is a transform matrix.
* @SINCE_1_0.0
- * @param [in] translation the translation
+ * @param[in] translation The translation
*/
void SetTranslation(const Vector4& translation);
*
* This assumes the matrix is a transform matrix.
* @SINCE_1_0.0
- * @param [in] translation the translation
+ * @param[in] translation The translation
*/
void SetTranslation(const Vector3& translation);
* @brief Returns the contents of the matrix as an array of 16 floats.
*
* The order of the values for a transform matrix is:
+ *
+ * @code
+ *
* xAxis.x xAxis.y xAxis.z 0.0f
* yAxis.x yAxis.y yAxis.z 0.0f
* zAxis.x zAxis.y zAxis.z 0.0f
* trans.x trans.y trans.z 1.0f
+ *
+ * @endcode
+ *
* @SINCE_1_0.0
* @return the matrix contents as an array of 16 floats.
* @note inlined for performance reasons (generates less code than a function call)
*
* The order of the values for a transform matrix is:
*
+ * @code
+ *
* xAxis.x xAxis.y xAxis.z 0.0f
* yAxis.x yAxis.y yAxis.z 0.0f
* zAxis.x zAxis.y zAxis.z 0.0f
* trans.x trans.y trans.z 1.0f
+ *
+ * @endcode
+ *
* @SINCE_1_0.0
* @return the matrix contents as an array of 16 floats.
* @note inlined for performance reasons (generates less code than a function call)
*
* Use this method in time critical path as it does not require temporaries
* @SINCE_1_0.0
- * @param result of the multiplication
- * @param lhs matrix, this can be same matrix as result
- * @param rhs matrix, this cannot be same matrix as result
+ * @param[out] result Result of the multiplication
+ * @param[in] lhs Matrix, this can be same matrix as result
+ * @param[in] rhs Matrix, this cannot be same matrix as result
*/
static void Multiply( Matrix& result, const Matrix& lhs, const Matrix& rhs );
*
* Use this method in time critical path as it does not require temporaries
* @SINCE_1_0.0
- * @param result of the multiplication
- * @param lhs matrix, this can be same matrix as result
- * @param rhs quaternion
+ * @param[out] result Result of the multiplication
+ * @param[in] lhs Matrix, this can be same matrix as result
+ * @param[in] rhs Quaternion
*/
static void Multiply( Matrix& result, const Matrix& lhs, const Quaternion& rhs );
* @brief The multiplication operator.
*
* @SINCE_1_0.0
- * @param [in] rhs the Matrix to multiply this by
+ * @param[in] rhs The Matrix to multiply this by
* @return A matrix containing the result
*/
Vector4 operator*(const Vector4& rhs) const;
* Utilises appropriate machine epsilon values.
*
* @SINCE_1_0.0
- * @param [in] rhs the Matrix to compare this to
+ * @param[in] rhs The Matrix to compare this to
* @return true if the matrices are equal
*/
bool operator==(const Matrix & rhs) const;
*
* Utilises appropriate machine epsilon values.
* @SINCE_1_0.0
- * @param [in] rhs the Matrix to compare this to
+ * @param[in] rhs The Matrix to compare this to
* @return true if the matrices are not equal.
*/
bool operator!=(const Matrix & rhs) const;
*
* Performs scale, rotation, then translation
* @SINCE_1_0.0
- * @param[in] scale to apply
- * @param[in] rotation to apply
- * @param[in] translation to apply
+ * @param[in] scale Scale to apply
+ * @param[in] rotation Rotation to apply
+ * @param[in] translation Translation to apply
*/
void SetTransformComponents(const Vector3& scale,
const Quaternion& rotation,
*
* Performs translation, then rotation, then scale.
* @SINCE_1_0.0
- * @param[in] scale to apply
- * @param[in] rotation to apply
- * @param[in] translation to apply
+ * @param[in] scale Scale to apply
+ * @param[in] rotation Rotation to apply
+ * @param[in] translation Translation to apply
*/
void SetInverseTransformComponents(const Vector3& scale,
const Quaternion& rotation,
* @param[in] xAxis The X axis of the basis
* @param[in] yAxis The Y axis of the basis
* @param[in] zAxis The Z axis of the basis
- * @param[in] translation to apply
+ * @param[in] translation Translation to apply
*/
void SetInverseTransformComponents(const Vector3& xAxis,
const Vector3& yAxis,
* @brief Gets the position, scale and rotation components from the given transform matrix.
*
* @SINCE_1_0.0
- * @param[out] position to set
- * @param[out] rotation to set - only valid if the transform matrix has not been skewed or sheared
- * @param[out] scale to set - only valid if the transform matrix has not been skewed or sheared
+ * @param[out] position Position to set
+ * @param[out] rotation Rotation to set - only valid if the transform matrix has not been skewed or sheared
+ * @param[out] scale Scale to set - only valid if the transform matrix has not been skewed or sheared
* @pre This matrix must not contain skews or shears.
*/
void GetTransformComponents(Vector3& position,
*
* It is printed in memory order, i.e. each printed row is contiguous in memory.
* @SINCE_1_0.0
- * @param [in] o The output stream operator.
- * @param [in] matrix The matrix to print.
+ * @param[in] o The output stream operator.
+ * @param[in] matrix The matrix to print.
* @return The output stream operator.
*/
DALI_IMPORT_API std::ostream& operator<< (std::ostream& o, const Matrix& matrix);
* @brief Copy Constructor.
*
* @SINCE_1_0.0
- * @param[in] m Another 3x3 matrix
+ * @param[in] m A reference to the copied 3x3 matrix
*/
Matrix3(const Matrix3& m);
/**
* @brief Assignment Operator
* @SINCE_1_0.0
- * @param matrix from which to copy values
+ * @param[in] matrix from which to copy values
* @return reference to this object
*/
Matrix3& operator=( const Matrix3& matrix );
/**
* @brief Assignment Operator
* @SINCE_1_0.0
- * @param matrix from which to copy values
- * @return reference to this object
+ * @param[in] matrix A reference to the copied matrix
+ * @return A reference to this
*/
Matrix3& operator=( const Matrix& matrix );
* Utilises appropriate machine epsilon values.
*
* @SINCE_1_0.0
- * @param [in] rhs the Matrix to compare this to
+ * @param[in] rhs The Matrix to compare this to
* @return true if the matrices are equal
*/
bool operator==(const Matrix3 & rhs) const;
* Utilises appropriate machine epsilon values.
*
* @SINCE_1_0.0
- * @param [in] rhs the Matrix to compare this to
+ * @param[in] rhs The Matrix to compare this to
* @return true if the matrices are equal
*/
bool operator!=(const Matrix3 & rhs) const;
* @brief Returns the contents of the matrix as an array of 9 floats.
*
* The order of the values for a matrix is:
+ *
+ * @code
+ *
* xAxis.x yAxis.x zAxis.x
* xAxis.y yAxis.y zAxis.y
* xAxis.z yAxis.z zAxis.z
+ *
+ * @endcode
+ *
* @SINCE_1_0.0
* @return the matrix contents as an array of 9 floats.
*/
/**
* @brief Returns the contents of the matrix as an array of 9 floats.
*
+ * @code
+ *
* The order of the values for a matrix is:
* xAxis.x yAxis.x zAxis.x
* xAxis.y yAxis.y zAxis.y
* xAxis.z yAxis.z zAxis.z
+ *
+ * @endcode
+ *
* @SINCE_1_0.0
* @return the matrix contents as an array of 9 floats.
*/
/**
* @brief Swaps the rows to columns
* @SINCE_1_0.0
- * @return true
+ * @return true if successful
*/
bool Transpose();
* @brief Multiplies all elements of the matrix by the scale value.
*
* @SINCE_1_0.0
- * @param scale - the value by which to scale the whole matrix.
+ * @param[in] scale The value by which to scale the whole matrix.
*
*/
void Scale(float scale);
*
* Use this method in time critical path as it does not require temporaries
* @SINCE_1_0.0
- * @param result of the multiplication
- * @param lhs matrix, this can be same matrix as result
- * @param rhs matrix, this cannot be same matrix as result
+ * @param[out] result Result of the multiplication
+ * @param[in] lhs Matrix, this can be same matrix as result
+ * @param[in] rhs Matrix, this cannot be same matrix as result
*/
static void Multiply( Matrix3& result, const Matrix3& lhs, const Matrix3& rhs );
* @brief Print a 3x3 matrix.
*
* @SINCE_1_0.0
- * @param [in] o The output stream operator.
- * @param [in] matrix The matrix to print.
+ * @param[in] o The output stream operator.
+ * @param[in] matrix The matrix to print.
* @return The output stream operator.
*/
DALI_IMPORT_API std::ostream& operator<< (std::ostream& o, const Matrix3& matrix);
* @brief Construct from a quaternion represented by a vector.
*
* @SINCE_1_0.0
- * @param[in] vector - x,y,z fields represent i,j,k coefficients, w represents cos(theta/2)
+ * @param[in] vector x,y,z fields represent i,j,k coefficients, w represents cos(theta/2)
*/
explicit Quaternion( const Vector4& vector );
* @brief Constructor from an axis and angle.
*
* @SINCE_1_0.0
- * @param[in] angle - the angle around the axis
- * @param[in] axis - the vector of the axis
+ * @param[in] angle The angle around the axis
+ * @param[in] axis The vector of the axis
*/
Quaternion( Radian angle, const Vector3& axis );
*
* @SINCE_1_0.0
* @param[out] axis
- * @param[out] angle in radians
+ * @param[out] angle Angle in radians
* @return true if converted correctly
*/
bool ToAxisAngle( Vector3& axis, Radian& angle ) const;
* @brief Division operator.
*
* @SINCE_1_0.0
- * @param[in] other a quaternion to divide by
+ * @param[in] other A quaternion to divide by
* @return A quaternion containing the result
*/
const Quaternion operator/( const Quaternion& other ) const;
*
* @SINCE_1_0.0
* @param[in] other The quaternion to add
- * @return itself
+ * @return A reference to this
*/
const Quaternion& operator+=( const Quaternion& other );
*
* @SINCE_1_0.0
* @param[in] other The quaternion to subtract
- * @return itself
+ * @return A reference to this
*/
const Quaternion& operator-=( const Quaternion& other );
*
* @SINCE_1_0.0
* @param[in] other The quaternion to multiply
- * @return itself
+ * @return A reference to this
*/
const Quaternion& operator*=( const Quaternion& other );
*
* @SINCE_1_0.0
* @param[in] scale the value to scale by
- * @return itself
+ * @return A reference to this
*/
const Quaternion& operator*=( float scale );
* @brief Scale with Assignment operator.
*
* @SINCE_1_0.0
- * @param[in] scale the value to scale by
- * @return itself
+ * @param[in] scale The value to scale by
+ * @return A reference to this
*/
const Quaternion& operator/=( float scale );
* @brief Return the dot product of two quaternions.
*
* @SINCE_1_0.0
- * @param[in] q1 - the first quaternion
- * @param[in] q2 - the second quaternion
+ * @param[in] q1 The first quaternion
+ * @param[in] q2 The second quaternion
* @return the dot product of the two quaternions
*/
static float Dot( const Quaternion &q1, const Quaternion &q2 );
* @brief Linear Interpolation (using a straight line between the two quaternions).
*
* @SINCE_1_0.0
- * @param[in] q1 - the start quaternion
- * @param[in] q2 - the end quaternion
- * @param[in] t - a progress value between 0 and 1
+ * @param[in] q1 The start quaternion
+ * @param[in] q2 The end quaternion
+ * @param[in] t A progress value between 0 and 1
* @return the interpolated quaternion
*/
static Quaternion Lerp( const Quaternion &q1, const Quaternion &q2, float t );
* the two quaternions).
*
* @SINCE_1_0.0
- * @param[in] q1 - the start quaternion
- * @param[in] q2 - the end quaternion
- * @param[in] progress - a progress value between 0 and 1
+ * @param[in] q1 The start quaternion
+ * @param[in] q2 The end quaternion
+ * @param[in] progress A progress value between 0 and 1
* @return the interpolated quaternion
*/
static Quaternion Slerp( const Quaternion &q1, const Quaternion &q2, float progress );
* @brief This version of Slerp, used by Squad, does not check for theta > 90.
*
* @SINCE_1_0.0
- * @param[in] q1 - the start quaternion
- * @param[in] q2 - the end quaternion
- * @param[in] t - a progress value between 0 and 1
+ * @param[in] q1 The start quaternion
+ * @param[in] q2 The end quaternion
+ * @param[in] t A progress value between 0 and 1
* @return the interpolated quaternion
*/
static Quaternion SlerpNoInvert( const Quaternion &q1, const Quaternion &q2, float t );
* @brief Spherical Cubic Interpolation.
*
* @SINCE_1_0.0
- * @param[in] start - the start quaternion
- * @param[in] end - the end quaternion
- * @param[in] ctrl1 - the control quaternion for q1
- * @param[in] ctrl2 - the control quaternion for q2
- * @param[in] t - a progress value between 0 and 1
+ * @param[in] start The start quaternion
+ * @param[in] end The end quaternion
+ * @param[in] ctrl1 The control quaternion for q1
+ * @param[in] ctrl2 The control quaternion for q2
+ * @param[in] t A progress value between 0 and 1
* @return the interpolated quaternion
*/
static Quaternion Squad( const Quaternion& start, const Quaternion& end, const Quaternion& ctrl1, const Quaternion& ctrl2, float t );
* @brief Returns the shortest angle between two quaternions in Radians.
*
* @SINCE_1_0.0
- * @param[in] q1 - the first quaternion
- * @param[in] q2 - the second quaternion
- * @return the angle between the two quaternions.
+ * @param[in] q1 The first quaternion
+ * @param[in] q2 The second quaternion
+ * @return The angle between the two quaternions.
*/
static float AngleBetween( const Quaternion& q1, const Quaternion& q2 );
* @brief Rotate v by this Quaternion (Quaternion must be unit).
*
* @SINCE_1_0.0
- * @param[in] vector a vector to rotate
+ * @param[in] vector A vector to rotate
* @return the rotated vector
*/
Vector4 Rotate( const Vector4& vector ) const;
* @brief Rotate v by this Quaternion (Quaternion must be unit).
*
* @SINCE_1_0.0
- * @param[in] vector a vector to rotate
+ * @param[in] vector A vector to rotate
* @return the rotated vector
*/
Vector3 Rotate( const Vector3& vector ) const;
*
* @SINCE_1_0.0
* @param[in] value Float value in radians
- * @return a reference to this object
+ * @return A reference to this
*/
Radian& operator=( float value )
{
*
* @SINCE_1_0.0
* @param[in] degree The value in degrees.
- * @return a reference to this object
+ * @return A reference to this
*/
Radian& operator=( Degree degree )
{
*
* Note, uses a limited number of values.
* @SINCE_1_0.0
- * @param[in] f0 the lower bound
- * @param[in] f1 the upper bound
+ * @param[in] f0 The lower bound
+ * @param[in] f1 The upper bound
* @return a random value between the lower and upper bound
*/
inline float Range(float f0, float f1)
/**
* @brief Copy constructor.
* @SINCE_1_0.0
- * @param rhs to copy from
+ * @param[in] rhs A reference to assign
*/
Uint16Pair( const Uint16Pair& rhs )
{
}
/**
- * @brief @returns the y dimension stored in this 2-tuple.
+ * @brief Returns the y dimension stored in this 2-tuple.
* @SINCE_1_0.0
+ * @return Height
*/
uint16_t GetHeight() const
{
}
/**
- * @brief @returns the x dimension stored in this 2-tuple.
+ * @brief Returns the x dimension stored in this 2-tuple.
* @SINCE_1_0.0
+ * @return X
*/
uint16_t GetX() const
{
}
/**
- * @brief @returns the y dimension stored in this 2-tuple.
+ * @brief Returns the y dimension stored in this 2-tuple.
* @SINCE_1_0.0
+ * @return Y
*/
uint16_t GetY() const
{
/**
* @brief Equality operator.
* @SINCE_1_0.0
+ * @param[in] rhs A reference for comparison
+ * @return True if same
*/
bool operator==( const Uint16Pair& rhs ) const
{
/**
* @brief Inequality operator.
* @SINCE_1_0.0
+ * @param[in] rhs A reference for comparison
+ * @return True if different
*/
bool operator!=( const Uint16Pair& rhs ) const
{
* @brief Less than comparison operator for storing in collections (not geometrically
* meaningful).
* @SINCE_1_0.0
+ * @param[in] rhs A reference for comparison
+ * @return True if less
*/
bool operator<( const Uint16Pair& rhs ) const
{
* @brief Greater than comparison operator for storing in collections (not
* geometrically meaningful).
* @SINCE_1_0.0
+ * @param[in] rhs A reference for comparison
+ * @return True if greater
*/
bool operator>( const Uint16Pair& rhs ) const
{
* Uses a template for loose coupling, to save a header include, and allow any
* vector type with .x and .y members to be converted.
* @SINCE_1_0.0
+ * @param[in] from Floating point vector2
+ * @return Closest integer value.
*/
template<typename FLOAT_VECTOR_N_TYPE>
static Uint16Pair FromFloatVec2( const FLOAT_VECTOR_N_TYPE& from )
* Uses a template to allow any vector type with operator [] to be converted
* in addition to plain arrays.
* @SINCE_1_0.0
+ * @param[in] from Floating point array
+ * @return Closest integer value.
*/
template<typename FLOAT_ARRAY>
static Uint16Pair FromFloatArray( const FLOAT_ARRAY& from )
* @brief Conversion constructor from an array of two floats.
*
* @SINCE_1_0.0
- * @param [in] array of xy
+ * @param [in] array Array of xy
*/
explicit Vector2(const float* array)
: x(array[0]),
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param[in] array of floats
+ * @param[in] array Array of floats
* @return itself
*/
Vector2& operator=(const float* array)
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to assign.
+ * @param[in] rhs Vector to assign.
* @return itself
*/
Vector2& operator=(const Vector3& rhs);
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to assign.
+ * @param[in] rhs Vector to assign.
* @return itself
*/
Vector2& operator=(const Vector4& rhs);
* @brief Addition operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to add.
+ * @param[in] rhs Vector to add.
* @return A vector containing the result of the addition
*/
Vector2 operator+(const Vector2& rhs) const
* @brief Addition assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to add.
+ * @param[in] rhs Vector to add.
* @return itself
*/
Vector2& operator+=(const Vector2& rhs)
* @brief Subtraction operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to subtract
+ * @param[in] rhs The vector to subtract
* @return A vector containing the result of the subtraction
*/
Vector2 operator-(const Vector2& rhs) const
* @brief Subtraction assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to subtract
+ * @param[in] rhs The vector to subtract
* @return itself
*/
Vector2& operator-=(const Vector2& rhs)
* @brief Multiplication operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to multiply
+ * @param[in] rhs The vector to multiply
* @return A vector containing the result of the multiplication
*/
Vector2 operator*(const Vector2& rhs) const
* @brief Multiplication operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector
+ * @param[in] rhs The float value to scale the vector
* @return A vector containing the result of the scaling
*/
Vector2 operator*(float rhs) const
* @brief Multiplication assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to multiply
+ * @param[in] rhs The vector to multiply
* @return itself
*/
Vector2& operator*=(const Vector2& rhs)
* @brief Multiplication assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector
+ * @param[in] rhs The float value to scale the vector
* @return itself
*/
Vector2& operator*=(float rhs)
* @brief Division operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to divide
+ * @param[in] rhs The vector to divide
* @return A vector containing the result of the division
*/
Vector2 operator/(const Vector2& rhs) const
* @brief Division assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to divide
+ * @param[in] rhs The vector to divide
* @return itself
*/
Vector2& operator/=(const Vector2& rhs)
* @brief Division assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector by
+ * @param[in] rhs The float value to scale the vector by
* @return itself
*/
Vector2& operator/=(float rhs)
*
* Asserts if index is out of range. Should be 0 or 1
* @SINCE_1_0.0
- * @param[in] index Subscript
+ * @param[in] index Subscript index
* @return The float at the given index
*/
const float& operator[](const unsigned int index) const
* @brief Clamps the vector between minimum and maximum vectors.
*
* @SINCE_1_0.0
- * @param [in] min the minimum vector
- * @param [in] max the maximum vector
+ * @param [in] min The minimum vector
+ * @param [in] max The maximum vector
*/
void Clamp( const Vector2& min, const Vector2& max );
* @brief Clamps each of vector v's components between minimum and maximum values.
*
* @SINCE_1_0.0
- * @param [in] v a vector
- * @param [in] min the minimum value
- * @param [in] max the maximum value
+ * @param [in] v A vector
+ * @param [in] min The minimum value
+ * @param [in] max The maximum value
* @return a vector containing the clamped components of v
*/
DALI_IMPORT_API Vector2 Clamp( const Vector2& v, const float& min, const float& max );
* @brief Conversion constructor from an array of three floats.
*
* @SINCE_1_0.0
- * @param [in] array of xyz
+ * @param [in] array Array of xyz
*/
explicit Vector3(const float* array)
: x(array[0]),
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param[in] array of floats
+ * @param[in] array Array of floats
* @return itself
*/
Vector3& operator=(const float* array)
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to assign.
+ * @param[in] rhs Vector to assign.
* @return itself
*/
Vector3& operator=(const Vector2& rhs);
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to assign.
+ * @param[in] rhs Vector to assign.
* @return itself
*/
Vector3& operator=(const Vector4& rhs);
* @brief Addition operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to add.
+ * @param[in] rhs Vector to add.
* @return A vector containing the result of the addition
*/
Vector3 operator+(const Vector3& rhs) const
* @brief Addition assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to add.
+ * @param[in] rhs Vector to add.
* @return itself
*/
Vector3& operator+=(const Vector3& rhs)
* @brief Subtraction operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to subtract
+ * @param[in] rhs The vector to subtract
* @return A vector containing the result of the subtraction
*/
Vector3 operator-(const Vector3& rhs) const
* @brief Subtraction assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to subtract
+ * @param[in] rhs The vector to subtract
* @return itself
*/
Vector3& operator-=(const Vector3& rhs)
* @brief Multiplication operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to multiply
+ * @param[in] rhs The vector to multiply
* @return A vector containing the result of the multiplication
*/
Vector3 operator*(const Vector3& rhs) const
* @brief Multiplication operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector
+ * @param[in] rhs The float value to scale the vector
* @return A vector containing the result of the scaling
*/
Vector3 operator*(float rhs) const
* @brief Multiplication assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to multiply
+ * @param[in] rhs The vector to multiply
* @return itself
*/
Vector3& operator*=(const Vector3& rhs)
* @brief Multiplication assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector
+ * @param[in] rhs The float value to scale the vector
* @return itself
*/
Vector3& operator*=(float rhs)
* @brief Multiplication assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the Quaternion value to multiply the vector by
+ * @param[in] rhs The Quaternion value to multiply the vector by
* @return itself
*/
Vector3& operator*=(const Quaternion& rhs);
* @brief Division operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to divide
+ * @param[in] rhs The vector to divide
* @return A vector containing the result of the division
*/
Vector3 operator/(const Vector3& rhs) const
* @brief Division assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to divide
+ * @param[in] rhs The vector to divide
* @return itself
*/
Vector3& operator/=(const Vector3& rhs)
* @brief Division assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector by
+ * @param[in] rhs The float value to scale the vector by
* @return itself
*/
Vector3& operator/=(float rhs)
*
* Asserts if index is out of range. Should be 0, 1 or 2
* @SINCE_1_0.0
- * @param[in] index Subscript
+ * @param[in] index Subscript index
* @return The float at the given index.
*/
const float& operator[](const unsigned int index) const
* This is great for lighting, threshold testing the angle between two unit vectors,
* calculating the distance between two points in a particular direction.
* @SINCE_1_0.0
- * @param [in] other the other vector
- * @return the dot product
+ * @param [in] other The other vector
+ * @return The dot product
*/
float Dot(const Vector3& other) const;
* two vectors. This is great for calculating normals and making matrices orthogonal.
*
* @SINCE_1_0.0
- * @param [in] other the other vector
- * @return the cross product
+ * @param [in] other The other vector
+ * @return The cross product
*/
Vector3 Cross(const Vector3& other) const;
* @brief Clamps the vector between minimum and maximum vectors.
*
* @SINCE_1_0.0
- * @param [in] min the minimum vector
- * @param [in] max the maximum vector
+ * @param [in] min The minimum vector
+ * @param [in] max The maximum vector
*/
void Clamp( const Vector3& min, const Vector3& max );
*
* If a=0,1,2 and b=2,1,0 returns a vector of 2,1,2.
* @SINCE_1_0.0
- * @param [in] a a vector
- * @param [in] b a vector
+ * @param [in] a A vector
+ * @param [in] b A vector
* @return a vector containing the minimum of each component from a and b
*/
inline Vector3 Min( const Vector3& a, const Vector3& b )
*
* If a=0,1 and b=1,0 returns a vector of 1,1
* @SINCE_1_0.0
- * @param [in] a a vector
- * @param [in] b a vector
+ * @param [in] a A vector
+ * @param [in] b A vector
* @return a vector containing the maximum of each component from a and b
*/
inline Vector3 Max( const Vector3& a, const Vector3& b )
* @brief Clamps each of vector v's components between minimum and maximum values.
*
* @SINCE_1_0.0
- * @param [in] v a vector
- * @param [in] min the minimum value
- * @param [in] max the maximum value
+ * @param [in] v A vector
+ * @param [in] min The minimum value
+ * @param [in] max The maximum value
* @return a vector containing the clamped components of v
*/
DALI_IMPORT_API Vector3 Clamp( const Vector3& v, const float& min, const float& max );
* @brief Conversion constructor from an array of four floats.
*
* @SINCE_1_0.0
- * @param [in] array of either xyzw/rgba/stpq
+ * @param [in] array Array of either xyzw/rgba/stpq
*/
explicit Vector4(const float* array)
: x(array[0]),
* @brief Conversion constructor from Vector2.
*
* @SINCE_1_0.0
- * @param [in] vec2 to copy from, z and w are initialized to 0
+ * @param [in] vec2 Vector2 to copy from, z and w are initialized to 0
*/
explicit Vector4( const Vector2& vec2 );
* @brief Conversion constructor from Vector3.
*
* @SINCE_1_0.0
- * @param [in] vec3 to copy from, w is initialized to 0
+ * @param [in] vec3 Vector3 to copy from, w is initialized to 0
*/
explicit Vector4( const Vector3& vec3 );
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param [in] array of floats
+ * @param [in] array Array of floats
* @return itself
*/
Vector4& operator=(const float* array)
*
* Only sets x and y. z and w are left as they were
* @SINCE_1_0.0
- * @param [in] vec2 to assign from.
+ * @param [in] vec2 A reference to assign from.
* @return itself
*/
Vector4& operator=(const Vector2& vec2 );
*
* Only sets x and y and z. w is left as it was
* @SINCE_1_0.0
- * @param [in] vec3 to assign from
+ * @param [in] vec3 A reference to assign from
* @return itself
*/
Vector4& operator=(const Vector3& vec3 );
* @brief Addition operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to add.
+ * @param[in] rhs Vector to add.
* @return A vector containing the result of the addition
*/
Vector4 operator+(const Vector4 & rhs) const
* @brief Addition assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs vector to add.
+ * @param[in] rhs Vector to add.
* @return itself
*/
Vector4& operator+=(const Vector4& rhs)
* @brief Subtraction operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to subtract
+ * @param[in] rhs The vector to subtract
* @return A vector containing the result of the subtraction
*/
Vector4 operator-(const Vector4& rhs) const
* @brief Subtraction assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to subtract
+ * @param[in] rhs The vector to subtract
* @return itself
*/
Vector4& operator-=(const Vector4& rhs)
* @brief Multiplication operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to multiply
+ * @param[in] rhs The vector to multiply
* @return A vector containing the result of the multiplication
*/
Vector4 operator*(const Vector4& rhs) const
* @brief Multiplication operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector
+ * @param[in] rhs The float value to scale the vector
* @return A vector containing the result of the scaling
*/
Vector4 operator*(float rhs) const
* @brief Multiplication assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to multiply
+ * @param[in] rhs The vector to multiply
* @return itself
*/
Vector4& operator*=(const Vector4& rhs)
* @brief Multiplication assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector
+ * @param[in] rhs The float value to scale the vector
* @return itself
*/
Vector4& operator*=(float rhs)
* @brief Division operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to divide
+ * @param[in] rhs The vector to divide
* @return A vector containing the result of the division
*/
Vector4 operator/(const Vector4 & rhs) const
* @brief Division assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the vector to divide
+ * @param[in] rhs The vector to divide
* @return itself
*/
Vector4& operator/=(const Vector4& rhs)
* @brief Division assignment operator.
*
* @SINCE_1_0.0
- * @param[in] rhs the float value to scale the vector by
+ * @param[in] rhs The float value to scale the vector by
* @return itself
*/
Vector4& operator/=(float rhs)
*
* Asserts if index is out of range. Should be 0, 1, 2 or 3
* @SINCE_1_0.0
- * @param[in] index Subscript
+ * @param[in] index Subscript index
* @return The float at the given index
*/
const float& operator[](const unsigned int index) const
* This is great for lighting, threshold testing the angle between two unit vectors,
* calculating the distance between two points in a particular direction.
* @SINCE_1_0.0
- * @param [in] other the other vector
+ * @param [in] other The other vector
* @return the dot product
*/
float Dot(const Vector3& other) const;
* This is great for lighting, threshold testing the angle between two unit vectors,
* calculating the distance between two points in a particular direction.
* @SINCE_1_0.0
- * @param [in] other the other vector
+ * @param [in] other The other vector
* @return the dot product
*/
float Dot(const Vector4& other) const;
* @brief Returns the 4d dot product of this vector and another vector.
*
* @SINCE_1_0.0
- * @param [in] other the other vector
+ * @param [in] other The other vector
* @return the dot product
*/
float Dot4(const Vector4& other) const;
* two vectors. This is great for calculating normals and making matrices orthogonal.
*
* @SINCE_1_0.0
- * @param [in] other the other vector
+ * @param [in] other The other vector
* @return A vector containing the cross product
*/
Vector4 Cross(const Vector4& other) const;
* @brief Clamps the vector between minimum and maximum vectors.
*
* @SINCE_1_0.0
- * @param [in] min the minimum vector
- * @param [in] max the maximum vector
+ * @param [in] min The minimum vector
+ * @param [in] max The maximum vector
*/
void Clamp( const Vector4& min, const Vector4& max );
/**
* @brief Returns the contents of the vector as an array of 4 floats.
*
+ * @code
+ *
* The order of the values in this array are as follows:
* 0: x (or r, or s)
* 1: y (or g, or t)
* 2: z (or b, or p)
* 3: w (or a, or q)
+ *
+ * @endcode
+ *
* @SINCE_1_0.0
* @return the vector contents as an array of 4 floats.
* @note inlined for performance reasons (generates less code than a function call)
/**
* @brief Returns the contents of the vector as an array of 4 floats.
*
+ * @code
+ *
* The order of the values in this array are as follows:
* 0: x (or r, or s)
* 1: y (or g, or t)
* 2: z (or b, or p)
* 3: w (or a, or q)
+ *
+ * @endcode
+ *
* @SINCE_1_0.0
* @return the vector contents as an array of 4 floats.
* @note inlined for performance reasons (generates less code than a function call)
*
* If a=0,1,2,3 and b=4,0,1,2 returns a vector of 0,0,1,2
* @SINCE_1_0.0
- * @param [in] a a vector
- * @param [in] b a vector
+ * @param [in] a A vector
+ * @param [in] b A vector
* @return a vector containing the minimum of each component from a and b
*/
inline Vector4 Min( const Vector4& a, const Vector4& b )
*
* If a=0,1,2,3 and b=4,0,1,2 returns a vector of 4,1,2,3
* @SINCE_1_0.0
- * @param [in] a a vector
- * @param [in] b a vector
+ * @param [in] a A vector
+ * @param [in] b A vector
* @return a vector containing the maximum of each component from a and b
*/
inline Vector4 Max( const Vector4& a, const Vector4& b )
* @brief Clamps each of vector v's components between minimum and maximum values.
*
* @SINCE_1_0.0
- * @param [in] v a vector
- * @param [in] min the minimum value
- * @param [in] max the maximum value
+ * @param [in] v A vector
+ * @param [in] min The minimum value
+ * @param [in] max The maximum value
* @return a vector containing the clamped components of v
*/
DALI_IMPORT_API Vector4 Clamp( const Vector4& v, const float& min, const float& max );