SPAmatrix
List of: Classes
Subjects: Mathematics
Contents: Base

Purpose: Defines a 3x3 affine transformation acting on vectors and positions.

Derivation: SPAmatrix : -

Filename: base/baseutil/vector/matrix.hxx

Description: This class defines a 3x3 Euclidean affine transformation acting on vectors and positions. It is not a tensor.

References: by BASE SPAtransf

Constructor: public: SPAmatrix::SPAmatrix ();


C++ allocation constructor requests memory for this object but does not populate it.






public: SPAmatrix::SPAmatrix (


SPAvector const&, // first vector


SPAvector const&, // second vector


SPAvector const& // third vector


);


C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.






public: void* operator SPAmatrix::new (


size_t alloc_size // size of requested




// memory block


);


C++ constructor.






public: void* operator SPAmatrix::new (


size_t alloc_size, // size of requested




// memory block


AcisMemType alloc_type, // eDefault, or




// eSession, or




// eDocument, or




// eTemporary


const char* alloc_file, // name of file in




// which new occurred


int alloc_line, // line of file in




// which new occurred


int* alloc_file_index // must always be




// &alloc_file_index


);


New operator for single instances on older compilers where overloading of new and delete are not permitted, and the MMGR_FREELIST compiler flag is given.






public: void* operator new SPAmatrix::[] (


size_t alloc_size // size of requested




// memory block


);


New operator for arrays of instances on older compilers where overloading of new and delete are not permitted, and the MMGR_FREELIST compiler flag is given.




Destructor: public: void operator SPAmatrix::delete (


void* alloc_ptr // pointer to memory




// block to delete


);


Delete operator for single instances on older compilers where overloading of new and delete are not permitted, and the MMGR_FREELIST compiler flag is given.






public: void operator delete SPAmatrix::[] (


void* alloc_ptr // pointer to memory




// block to delete


);


Delete operator for arrays of instances.



Methods: public: SPAvector SPAmatrix::column (


int in_col // column number


) const;


Extract a column from a matrix.






public: void SPAmatrix::debug (


char const*, // title


FILE* // file name



= debug_file_ptr


) const;


Writes output about the matrix to the debug file or to the specified file.






public: void SPAposition::debug_str (


char* str // string


) const;


Gives the details of a position.






public: double SPAmatrix::determinant () const;


Returns the determinant of the matrix.






public: double SPAmatrix::element (


int row, // row value


int col // column value


) const;


Extracts an element of the matrix.






public: SPAmatrix SPAmatrix::inverse () const;


Returns the inverse of a matrix. The most common case is for the matrix to represent a rotation matrix for a transform. In this case, the matrix will be orthogonal, with unit determinant.






public: logical SPAmatrix::is_identity () const;


Returns TRUE if a matrix is the identity matrix.






public: void* operator SPAmatrix::new[] (


size_t alloc_size, // size of requested




// memory block


AcisMemType alloc_type, // eDefault, or




// eSession, or




// eDocument, or




// eTemporary


const char* alloc_file, // name of file in




// which new occurred


int alloc_line, // line of file in




// which new occurred


int* alloc_file_index // must always be




// &alloc_file_index


);


New operator for arrays of instances, with decorations to keep track of the file and line where the new was issued. This version is available only on newer compilers that permit overloading of new and delete, and when the MMGR_ENABLED compiler flag is given.






public: SPAmatrix const& SPAmatrix::operator*= (


double const& // double


);


Multiplies a matrix by a double.






public: SPAmatrix const& SPAmatrix::operator*= (


SPAmatrix const& // matrix.


);


Multiplies two matrices.






public: SPAmatrix const& SPAmatrix::operator*= (


SPAtransf const& // transformation


);


Transforms a matrix, i.e., by an affine transformation.






public: SPAvector SPAmatrix::row (


int in_row // row number


) const;


Extracts a row from the matrix.






public: void SPAmatrix::set_element (


int row, // row number


int col, // column number


double new_e // element value


);


Specifies the number of rows and columns should be used in the definition of a matrix.






public: SPAmatrix SPAmatrix::transpose () const;


Returns a transpose of the matrix.






friend: SPAmatrix operator* (


double const&, // # to multiply by


SPAmatrix const& // matrix


);


MAC, NT, and UNIX platforms only. Multiplies a matrix by a double.






friend: SPAmatrix operator* (


SPAmatrix const&, // first matrix


SPAmatrix const& // second matrix


);


MAC, NT, and UNIX platforms only. Multiplies two matrices.






friend: SPAmatrix operator* (


SPAmatrix const&, // matrix


SPAtransf const& // transform


);


MAC, NT, and UNIX platforms only. Transforms a matrix by an affine transformation.






friend: SPAmatrix operator* (


SPAmatrix const&, // matrix


SPAtransf const* // transform


);


MAC, NT, and UNIX platforms only. Transforms a matrix by an affine transformation.






friend: SPAposition operator* (


SPAmatrix const&, // matrix


SPAposition const& // position


);


MAC, NT, and UNIX platforms only. Transforms a position by a matrix.






friend: SPAposition operator* (


SPAposition const&, // position


SPAmatrix const& // matrix


);


MAC, NT, and UNIX platforms only. Transforms a position by a matrix.






friend: SPAvector operator* (


SPAmatrix const&, // matrix


SPAvector const& // vector


);


MAC, NT, and UNIX platforms only. Transforms a matrix by an affine transformation.






friend: SPAvector operator* (


SPAvector const&, // vector


SPAmatrix const& // matrix


);


MAC, NT, and UNIX platforms only. Transforms a vector by a matrix.




Related Fncs: same_matrix, scaling
PDF/BASE/03CL.PDF
HTM/DATA/BASE/BASE/03CL/0011.HTM