API Search || Global Search

#include <hps.h>

Inheritance diagram for HPS::MatrixKit:
HPS::Kit HPS::Object

Public Member Functions

MatrixKitAdjoint ()
 
MatrixKitConcatenate (MatrixKit const &in_kit)
 
bool Empty () const
 
bool Equals (MatrixKit const &in_kit) const
 
MatrixKitInvert ()
 
 MatrixKit ()
 
 MatrixKit (MatrixKit const &in_kit)
 
 MatrixKit (MatrixKit &&in_that)
 
 MatrixKit (FloatArray const &in_matrix_source)
 
 MatrixKit (float const in_matrix_source[])
 
 MatrixKit (Quaternion const &in_quaternion)
 
MatrixKit Multiply (MatrixKit const &in_right) const
 
MatrixKit Multiply (float in_scalar) const
 
MatrixKit const & MultiplyAndAssign (MatrixKit const &in_right)
 
MatrixKit const & MultiplyAndAssign (float in_scalar)
 
MatrixKitNormalize ()
 
HPS::Type ObjectType () const
 
bool operator!= (MatrixKit const &in_kit) const
 
MatrixKit operator* (MatrixKit const &in_right) const
 
MatrixKit operator* (float in_scalar) const
 
MatrixKit const & operator*= (MatrixKit const &in_right)
 
MatrixKit const & operator*= (float in_scalar)
 
MatrixKitoperator= (MatrixKit &&in_that)
 
MatrixKitoperator= (MatrixKit const &in_kit)
 
bool operator== (MatrixKit const &in_kit) const
 
MatrixKitRotate (float in_x, float in_y, float in_z)
 
MatrixKitRotateOffAxis (Vector const &in_vector, float in_theta)
 
MatrixKitScale (float in_x, float in_y, float in_z)
 
void Set (MatrixKit const &in_kit)
 
MatrixKitSetElement (size_t in_row, size_t in_column, float in_value)
 
MatrixKitSetElement (size_t in_ordinal_zero_to_fifteen, float in_value)
 
MatrixKitSetElements (FloatArray const &in_values)
 
MatrixKitSetElements (size_t in_value_count, float const in_values[])
 
void Show (MatrixKit &out_kit) const
 
bool ShowAdjoint (MatrixKit &out_matrix) const
 
bool ShowDeterminant (float &out_determinant) const
 
bool ShowElement (size_t in_row, size_t in_column, float &out_value) const
 
bool ShowElement (size_t in_ordinal_zero_to_fifteen, float &out_value) const
 
bool ShowElements (FloatArray &out_matrix) const
 
bool ShowElements (float out_matrix[]) const
 
bool ShowInverse (MatrixKit &out_matrix) const
 
Point Transform (Point const &in_source) const
 
PointArray Transform (PointArray const &in_source) const
 
PointArray Transform (size_t in_count, Point const in_source[]) const
 
Vector Transform (Vector const &in_source) const
 
VectorArray Transform (VectorArray const &in_source) const
 
VectorArray Transform (size_t in_count, Vector const in_source[]) const
 
Plane Transform (Plane const &in_source) const
 
PlaneArray Transform (PlaneArray const &in_source) const
 
PlaneArray Transform (size_t in_count, Plane const in_source[]) const
 
SimpleCuboid Transform (SimpleCuboid const &in_source) const
 
SimpleSphere Transform (SimpleSphere const &in_source) const
 
MatrixKitTranslate (float in_x, float in_y, float in_z)
 
MatrixKitTranslate (Vector const &in_translation)
 
MatrixKitUnsetEverything ()
 
virtual ~MatrixKit ()
 
- Public Member Functions inherited from HPS::Kit
virtual HPS::Type Type () const
 
- Public Member Functions inherited from HPS::Object
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
 Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 

Static Public Member Functions

static MatrixKit GetDefault ()
 
- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::MatrixKit
 
- Static Public Attributes inherited from HPS::Kit
static const HPS::Type staticType = HPS::Type::Kit
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Protected Member Functions inherited from HPS::Kit
 Kit (Kit &&in_that)
 
Kitoperator= (Kit &&in_that)
 

Detailed Description

The MatrixKit class is a user space object, useful for carrying a group attribute settings.

Constructor & Destructor Documentation

HPS::MatrixKit::MatrixKit ( )

Initializes an identity matrix.

HPS::MatrixKit::MatrixKit ( MatrixKit const &  in_kit)

The copy constructor creates a new MatrixKit object that contains the same settings as the source object.

Parameters
in_kitThe source object to copy.
HPS::MatrixKit::MatrixKit ( MatrixKit &&  in_that)

The move constructor creates a MatrixKit by transferring the underlying impl of the rvalue reference to this MatrixKit thereby avoiding a copy and allocation.

Parameters
in_thatAn rvalue reference to a MatrixKit to take the impl from.
HPS::MatrixKit::MatrixKit ( FloatArray const &  in_matrix_source)

This constructor allows implicit construction from an array of floats.

Parameters
in_matrix_sourceAn array of floats that will be used to construct a new matrix. If this array is not at least 16 elements in length, only the valid members will be used, leaving the remainder initialized as the identity matrix.
HPS::MatrixKit::MatrixKit ( float const  in_matrix_source[])

This constructor allows implicit construction from an array of floats.

Parameters
in_matrix_sourceAn array of floats that will be used to construct a new matrix. This array is assumed to be at least 16 elements in length. If it is not, the behavior is undefined.
HPS::MatrixKit::MatrixKit ( Quaternion const &  in_quaternion)

This constructor allows implicit construction from a quaternion.

Parameters
in_quaternionA quaternion used to construct a new matrix.
virtual HPS::MatrixKit::~MatrixKit ( )
virtual

Destroy this kit.

Member Function Documentation

MatrixKit& HPS::MatrixKit::Adjoint ( )

Replaces this matrix with it's matrix adjoint. The adjoint is similar to the inverse but is always guaranteed to exist, even for singular matrices.

Returns
A reference to this object.
MatrixKit& HPS::MatrixKit::Concatenate ( MatrixKit const &  in_kit)

Replaces this matrix with the matrix product of itself multiplied by another matrix.

Parameters
in_kitthe right side operand of the matrix multiplication.
Returns
A reference to this object.
bool HPS::MatrixKit::Empty ( ) const
virtual

Indicates whether this object has any values set on it.

Returns
true if no values are set on this object, false otherwise.

Reimplemented from HPS::Object.

bool HPS::MatrixKit::Equals ( MatrixKit const &  in_kit) const

Check if the source MatrixKit is equivalent to this object.

Parameters
in_kitThe source MatrixKit to compare to this object.
Returns
true if the objects are equivalent, false otherwise.
static MatrixKit HPS::MatrixKit::GetDefault ( )
static

Creates a MatrixKit representing the identity matrix.

Returns
An identity MatrixKit.
MatrixKit& HPS::MatrixKit::Invert ( )

Replaces this matrix with it's matrix inverse. If this matrix is singular (determinant = 0), it will be unchanged.

Returns
A reference to this object.
MatrixKit HPS::MatrixKit::Multiply ( MatrixKit const &  in_right) const

Performs a matrix multiplication with this object as the left operand.

Parameters
in_rightA matrix used as the right operand of a matrix multiplication.
Returns
A new MatrixKit representing the product.
MatrixKit HPS::MatrixKit::Multiply ( float  in_scalar) const

Performs a scalar multiplication of this matrix.

Parameters
in_scalarA scalar to multiply this object by.
Returns
A new MatrixKit representing the product.
MatrixKit const& HPS::MatrixKit::MultiplyAndAssign ( MatrixKit const &  in_right)

Performs a matrix multiplication with this object as the left operand and then assigns it to this object.

Parameters
in_rightA matrix used as the right operand of a matrix multiplication.
Returns
A reference to this object after the multiplication.
MatrixKit const& HPS::MatrixKit::MultiplyAndAssign ( float  in_scalar)

Performs a scalar multiplication of this matrix and then assigns it to this object.

Parameters
in_scalarA scalar to multiply this object by.
Returns
A reference to this object after the multiplication.
MatrixKit& HPS::MatrixKit::Normalize ( )

Divides this matrix by its determinant. If this matrix is singular (determinant = 0), it will be unchanged.

Returns
A reference to this object.
bool HPS::MatrixKit::operator!= ( MatrixKit const &  in_kit) const

Check if the source MatrixKit is not equivalent to this object.

Parameters
in_kitThe source MatrixKit to compare to this object.
Returns
true if the objects are not equivalent, false otherwise.
MatrixKit HPS::MatrixKit::operator* ( MatrixKit const &  in_right) const

Performs a matrix multiplication with this object as the left operand.

Parameters
in_rightA matrix used as the right operand of a matrix multiplication.
Returns
A new MatrixKit representing the product.
MatrixKit HPS::MatrixKit::operator* ( float  in_scalar) const

Performs a scalar multiplication of this matrix.

Parameters
in_scalarA scalar to multiply this object by.
Returns
A new MatrixKit representing the product.
MatrixKit const& HPS::MatrixKit::operator*= ( MatrixKit const &  in_right)

Performs a matrix multiplication with this object as the left operand and then assigns it to this object.

Parameters
in_rightA matrix used as the right operand of a matrix multiplication.
Returns
A reference to this object after the multiplication.
MatrixKit const& HPS::MatrixKit::operator*= ( float  in_scalar)

Performs a scalar multiplication of this matrix and then assigns it to this object.

Parameters
in_scalarA scalar to multiply this object by.
Returns
A reference to this object after the multiplication.
MatrixKit& HPS::MatrixKit::operator= ( MatrixKit &&  in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this MatrixKit thereby avoiding a copy.

Parameters
in_thatAn rvalue reference to a MatrixKit to take the impl from.
Returns
A reference to this MatrixKit.
MatrixKit& HPS::MatrixKit::operator= ( MatrixKit const &  in_kit)

Copies the source MatrixKit into this object.

Parameters
in_kitThe source MatrixKit to copy.
Returns
A reference to this object.
bool HPS::MatrixKit::operator== ( MatrixKit const &  in_kit) const

Check if the source MatrixKit is equivalent to this object.

Parameters
in_kitThe source MatrixKit to compare to this object.
Returns
true if the objects are equivalent, false otherwise.
MatrixKit& HPS::MatrixKit::Rotate ( float  in_x,
float  in_y,
float  in_z 
)

Concatenates a rotation matrix to this matrix with rotation around the primary axes.

Parameters
in_xThe number of degrees to rotate around the x-axis.
in_yThe number of degrees to rotate around the y-axis.
in_zThe number of degrees to rotate around the z-axis.
Returns
A reference to this object.
MatrixKit& HPS::MatrixKit::RotateOffAxis ( Vector const &  in_vector,
float  in_theta 
)

Concatenates a rotation matrix to this matrix with rotation around an arbitrary vector.

Parameters
in_vectorThe vector to rotate around.
in_thetathe number of degrees to rotate around the specified vector
Returns
A reference to this object.
MatrixKit& HPS::MatrixKit::Scale ( float  in_x,
float  in_y,
float  in_z 
)

Concatenates a scale matrix to this matrix that represents a uniform scaling of the scene.

Parameters
in_xThe scale multiplier along the x-axis.
in_yThe scale multiplier along the y-axis.
in_zThe scale multiplier along the z-axis.
Returns
A reference to this object.
void HPS::MatrixKit::Set ( MatrixKit const &  in_kit)

Copies all settings from the source MatrixKit into this object.

Parameters
in_kitThe source MatrixKit to copy.
MatrixKit& HPS::MatrixKit::SetElement ( size_t  in_row,
size_t  in_column,
float  in_value 
)

Sets a single matrix element.

Parameters
in_rowThe row index. Valid range is [0, 3].
in_columnThe column index. Valid range is [0, 3].
in_valueThe matrix element.
Returns
A reference to this object.
MatrixKit& HPS::MatrixKit::SetElement ( size_t  in_ordinal_zero_to_fifteen,
float  in_value 
)

Sets a single matrix element, indexed as a linear array in row-major order.

Parameters
in_ordinal_zero_to_fifteenThe offset into the matrix. Valid range is [0, 15].
in_valueThe matrix element.
Returns
A reference to this object.
MatrixKit& HPS::MatrixKit::SetElements ( FloatArray const &  in_values)

Sets some or all elements in the matrix from an array, starting with the first element.

Parameters
in_valuesAn array of float values in row-major order that should replace the values in the matrix.
Returns
A reference to this object.
MatrixKit& HPS::MatrixKit::SetElements ( size_t  in_value_count,
float const  in_values[] 
)

Sets some or all elements in the matrix from an array, starting with the first element.

Parameters
in_value_countthe number of elements in the input array. Valid range is [0, 16].
in_valuesAn array of float values in row-major order that should replace the values in the matrix.
Returns
A reference to this object.
void HPS::MatrixKit::Show ( MatrixKit out_kit) const

Copies all settings from this MatrixKit into the given MatrixKit.

Parameters
out_kitThe MatrixKit to populate with the contents of this object.
bool HPS::MatrixKit::ShowAdjoint ( MatrixKit out_matrix) const

Computes the matrix adjoint of this matrix. The adjoint is similar to the inverse but is always guaranteed to exist, even for singular matrices.

Parameters
out_matrixThe matrix adjoint of this matrix.
Returns
true if the setting is valid, false otherwise.
bool HPS::MatrixKit::ShowDeterminant ( float &  out_determinant) const

Computes the matrix determinant of this matrix.

Parameters
out_determinantThe matrix determinant.
Returns
true if the setting is valid, false otherwise.
bool HPS::MatrixKit::ShowElement ( size_t  in_row,
size_t  in_column,
float &  out_value 
) const

Shows a single matrix element.

Parameters
in_rowThe row index. Valid range is [0, 3].
in_columnThe column index. Valid range is [0, 3].
out_valueThe matrix element.
Returns
true if the setting is valid, false otherwise.
bool HPS::MatrixKit::ShowElement ( size_t  in_ordinal_zero_to_fifteen,
float &  out_value 
) const

Shows a single matrix element, indexed as a linear array in row-major order.

Parameters
in_ordinal_zero_to_fifteenThe offset into the matrix. Valid range is [0, 15].
out_valueThe matrix element.
Returns
true if the setting is valid, false otherwise.
bool HPS::MatrixKit::ShowElements ( FloatArray out_matrix) const

Shows all elements of this matrix as an array.

Parameters
out_matrixThe contents of the matrix arranged as a linear array in row-major order.
Returns
true if the setting is valid, false otherwise.
bool HPS::MatrixKit::ShowElements ( float  out_matrix[]) const

Shows all elements of this matrix as an array.

Parameters
out_matrixThe contents of the matrix arranged as a linear array in row-major order.
Returns
true if the setting is valid, false otherwise.
bool HPS::MatrixKit::ShowInverse ( MatrixKit out_matrix) const

Computes the matrix inverse of this matrix. Fails if this matrix is singular (determinant = 0).

Parameters
out_matrixThe matrix inverse of this matrix.
Returns
true if the setting is valid, false otherwise.
Point HPS::MatrixKit::Transform ( Point const &  in_source) const

Transform a point through this matrix.

Parameters
in_sourceThe point to apply a transformation to.
Returns
A new point representing the transformed point.
PointArray HPS::MatrixKit::Transform ( PointArray const &  in_source) const

Transform an array of points through this matrix.

Parameters
in_sourceAn array of points to apply a transformation to.
Returns
A new point array representing the transformed points.
PointArray HPS::MatrixKit::Transform ( size_t  in_count,
Point const  in_source[] 
) const

Transform an array of points through this matrix.

Parameters
in_countThe number of elements in the source array.
in_sourceAn array of points to apply a transformation to.
Returns
A new point array representing the transformed points.
Vector HPS::MatrixKit::Transform ( Vector const &  in_source) const

Transform a vector through this matrix.

Parameters
in_sourceThe vector to apply a transformation to.
Returns
A new vector representing the transformed vector.
VectorArray HPS::MatrixKit::Transform ( VectorArray const &  in_source) const

Transform an array of vectors through this matrix.

Parameters
in_sourceAn array of vectors to apply a transformation to.
Returns
A new vector array representing the transformed vectors.
VectorArray HPS::MatrixKit::Transform ( size_t  in_count,
Vector const  in_source[] 
) const

Transform an array of vectors through this matrix.

Parameters
in_countThe number of elements in the source array.
in_sourceAn array of vectors to apply a transformation to.
Returns
A new vector array representing the transformed vectors.
Plane HPS::MatrixKit::Transform ( Plane const &  in_source) const

Transform a plane through this matrix.

Parameters
in_sourceThe plane to apply a transformation to.
Returns
A new plane representing the transformed plane.
PlaneArray HPS::MatrixKit::Transform ( PlaneArray const &  in_source) const

Transform an array of planes through this matrix.

Parameters
in_sourceAn array of planes to apply a transformation to.
Returns
A new plane array representing the transformed planes.
PlaneArray HPS::MatrixKit::Transform ( size_t  in_count,
Plane const  in_source[] 
) const

Transform an array of planes through this matrix.

Parameters
in_countThe number of elements in the source array.
in_sourceAn array of planes to apply a transformation to.
Returns
A new plane array representing the transformed planes.
SimpleCuboid HPS::MatrixKit::Transform ( SimpleCuboid const &  in_source) const

Transform a SimpleCuboid through this matrix.

Parameters
in_sourceThe cuboid to apply a transformation to.
Returns
A new SimpleCuboid representing the transformed cuboid.
SimpleSphere HPS::MatrixKit::Transform ( SimpleSphere const &  in_source) const

Transform a SimpleSphere through this matrix.

Parameters
in_sourceThe sphere to apply a transformation to.
Returns
A new SimpleSphere representing the transformed sphere.
MatrixKit& HPS::MatrixKit::Translate ( float  in_x,
float  in_y,
float  in_z 
)

Concatenates a translation matrix to this matrix that moves geometry.

Parameters
in_xThe number of units to translate along the x-axis.
in_yThe number of units to translate along the y-axis.
in_zThe number of units to translate along the z-axis.
Returns
A reference to this object.
MatrixKit& HPS::MatrixKit::Translate ( Vector const &  in_translation)

Concatenates a translation matrix to this matrix that moves geometry.

Parameters
in_translationA vector distance to translate by.
Returns
A reference to this object.
MatrixKit& HPS::MatrixKit::UnsetEverything ( )

Sets this kit to an identity matrix.

Returns
A reference to this kit.

The documentation for this class was generated from the following file: