#include <Mat.h>


Public Types | |
| enum | { N = L*C } |
| typedef real | Real |
| typedef Vec< C, real > | Line |
| typedef Vec< L, real > | Col |
Public Member Functions | |
| Mat () | |
| Mat (NoInit) | |
| Mat (Line r1, Line r2) | |
| Specific constructor with 2 lines. | |
| Mat (Line r1, Line r2, Line r3) | |
| Specific constructor with 3 lines. | |
| Mat (Line r1, Line r2, Line r3, Line r4) | |
| Specific constructor with 4 lines. | |
| Mat (const real &v) | |
| Constructor from an element. | |
| template<typename real2 > | |
| Mat (const Mat< L, C, real2 > &m) | |
| Constructor from another matrix. | |
| template<typename real2 > | |
| Mat (const real2 *p) | |
| Constructor from an array of elements (stored per line). | |
| real | getNbLines () const |
| number of lines | |
| real | getNbCols () const |
| number of colums | |
| void | operator= (const real *p) |
| Assignment from an array of elements (stored per line). | |
| template<typename real2 > | |
| void | operator= (const Mat< L, C, real2 > &m) |
| Assignment from another matrix. | |
| template<int L2, int C2> | |
| void | operator= (const Mat< L2, C2, real > &m) |
| Assignment from a matrix of different size. | |
| template<int L2, int C2> | |
| void | getsub (int L0, int C0, Mat< L2, C2, real > &m) const |
| template<int L2, int C2> | |
| void | setsub (int L0, int C0, const Mat< L2, C2, real > &m) |
| void | clear () |
| Sets each element to 0. | |
| void | fill (real r) |
| Sets each element to r. | |
| const Line & | line (int i) const |
| Read-only access to line i. | |
| Col | col (int j) const |
| Copy of column j. | |
| Line & | operator[] (int i) |
| Write acess to line i. | |
| const Line & | operator[] (int i) const |
| Read-only access to line i. | |
| Line & | operator() (int i) |
| Write acess to line i. | |
| const Line & | operator() (int i) const |
| Read-only access to line i. | |
| real & | operator() (int i, int j) |
| Write access to element (i,j). | |
| const real & | operator() (int i, int j) const |
| Read-only access to element (i,j). | |
| const Line * | lptr () const |
| Cast into a standard C array of lines (read-only). | |
| Line * | lptr () |
| Cast into a standard C array of lines. | |
| const real * | ptr () const |
| Cast into a standard C array of elements (stored per line) (read-only). | |
| real * | ptr () |
| Cast into a standard C array of elements (stored per line). | |
| Line & | x () |
| Special access to first line. | |
| Line & | y () |
| Special access to second line. | |
| Line & | z () |
| Special access to third line. | |
| Line & | w () |
| Special access to fourth line. | |
| const Line & | x () const |
| Special access to first line (read-only). | |
| const Line & | y () const |
| Special access to second line (read-only). | |
| const Line & | z () const |
| Special access to thrid line (read-only). | |
| const Line & | w () const |
| Special access to fourth line (read-only). | |
| void | identity () |
| Set matrix to identity. | |
| void | transpose (const Mat< C, L, real > &m) |
| Set matrix as the transpose of m. | |
| Mat< C, L, real > | transposed () const |
| Return the transpose of m. | |
| void | transpose () |
| Transpose current matrix. | |
| template<int P> | |
| Mat< L, P, real > | operator* (const Mat< C, P, real > &m) const |
| Matrix multiplication operator. | |
| Mat< L, C, real > | operator+ (const Mat< L, C, real > &m) const |
| Matrix addition operator. | |
| Mat< L, C, real > | operator- (const Mat< L, C, real > &m) const |
| Matrix subtraction operator. | |
| Col | operator* (const Line &v) const |
| Multiplication operator Matrix * Line. | |
| Line | multTranspose (const Col &v) const |
| Multiplication of the transposed Matrix * Column. | |
| template<int P> | |
| Mat< C, P, real > | multTranspose (const Mat< L, P, real > &m) const |
| Transposed Matrix multiplication operator. | |
| Mat< L, C, real > | operator* (real f) const |
| Scalar multiplication operator. | |
| Mat< L, C, real > | operator/ (real f) const |
| Scalar division operator. | |
| void | operator*= (real r) |
| Scalar multiplication assignment operator. | |
| void | operator/= (real r) |
| Scalar division assignment operator. | |
| void | operator+= (const Mat< L, C, real > &m) |
| Addition assignment operator. | |
| void | addTransposed (const Mat< L, C, real > &m) |
| Addition of the transposed of m (possible for square matrices only). | |
| void | subTransposed (const Mat< L, C, real > &m) |
| Substraction of the transposed of m (possible for square matrices only). | |
| void | operator-= (const Mat< L, C, real > &m) |
| Substraction assignment operator. | |
| bool | invert (const Mat< L, C, real > &m) |
| Invert matrix m. | |
Tests operators | |
| bool | operator== (const Mat< L, C, real > &b) const |
| bool | operator!= (const Mat< L, C, real > &b) const |
| bool | isSymetric () const |
Definition at line 41 of file Mat.h.
| typedef Vec<L,real> sofa::defaulttype::Mat< L, C, real >::Col |
| typedef Vec<C,real> sofa::defaulttype::Mat< L, C, real >::Line |
| typedef real sofa::defaulttype::Mat< L, C, real >::Real |
| anonymous enum |
| sofa::defaulttype::Mat< L, C, real >::Mat | ( | ) | [inline] |
| sofa::defaulttype::Mat< L, C, real >::Mat | ( | NoInit | ) | [inline, explicit] |
| sofa::defaulttype::Mat< L, C, real >::Mat | ( | Line | r1, | |
| Line | r2 | |||
| ) | [inline] |
| sofa::defaulttype::Mat< L, C, real >::Mat | ( | Line | r1, | |
| Line | r2, | |||
| Line | r3 | |||
| ) | [inline] |
| sofa::defaulttype::Mat< L, C, real >::Mat | ( | const real & | v | ) | [inline, explicit] |
| sofa::defaulttype::Mat< L, C, real >::Mat | ( | const Mat< L, C, real2 > & | m | ) | [inline] |
| sofa::defaulttype::Mat< L, C, real >::Mat | ( | const real2 * | p | ) | [inline, explicit] |
| void sofa::defaulttype::Mat< L, C, real >::addTransposed | ( | const Mat< L, C, real > & | m | ) | [inline] |
| void sofa::defaulttype::Mat< L, C, real >::clear | ( | ) | [inline] |
Sets each element to 0.
Reimplemented in sofa::component::linearsolver::TNewMatMatrix< Mat >.
Definition at line 165 of file Mat.h.
Referenced by sofa::defaulttype::Mat< 6, 6, Coord::value_type >::clear(), sofa::component::forcefield::TetrahedronFEMForceField< DataTypes >::computeStiffnessMatrix(), sofa::component::forcefield::TetrahedralCorotationalFEMForceField< DataTypes >::computeStiffnessMatrix(), sofa::defaulttype::Mat< 6, 6, Coord::value_type >::identity(), and sofa::defaulttype::Mat< 6, 6, Coord::value_type >::Mat().
| Col sofa::defaulttype::Mat< L, C, real >::col | ( | int | j | ) | const [inline] |
Copy of column j.
Definition at line 185 of file Mat.h.
Referenced by sofa::component::collision::DiscreteIntersection::computeIntersection(), sofa::component::mass::UniformMass< DataTypes, MassType >::draw(), and SofaFlowVR::FlowVRInputDistanceGrid< DistanceGridModel, DistanceGrid >::flowvrBeginIteration().
| void sofa::defaulttype::Mat< L, C, real >::fill | ( | real | r | ) | [inline] |
Sets each element to r.
Definition at line 172 of file Mat.h.
Referenced by sofa::component::forcefield::HexahedronFEMForceField< DataTypes >::computeElementStiffness(), and sofa::defaulttype::Mat< 6, 6, Coord::value_type >::fill().
| real sofa::defaulttype::Mat< L, C, real >::getNbCols | ( | ) | const [inline] |
| real sofa::defaulttype::Mat< L, C, real >::getNbLines | ( | ) | const [inline] |
| void sofa::defaulttype::Mat< L, C, real >::getsub | ( | int | L0, | |
| int | C0, | |||
| Mat< L2, C2, real > & | m | |||
| ) | const [inline] |
| void sofa::defaulttype::Mat< L, C, real >::identity | ( | ) | [inline] |
Set matrix to identity.
Definition at line 272 of file Mat.h.
Referenced by sofa::helper::do_rank1(), sofa::gpu::cuda::CudaRigidDistanceGridCollisionModel::draw(), sofa::component::mass::UniformMass< DataTypes, MassType >::draw(), sofa::component::collision::RigidDistanceGridCollisionModel::draw(), sofa::gpu::cuda::CudaRigidDistanceGridCollisionModel::ElementData::ElementData(), sofa::component::collision::RigidDistanceGridCollisionModel::ElementData::ElementData(), SofaFlowVR::FlowVRInputDistanceGrid< DistanceGridModel, DistanceGrid >::flowvrBeginIteration(), SofaFlowVR::FlowVRInputDistanceGrid< DistanceGridModel, DistanceGrid >::FlowVRInputDistanceGrid(), SofaFlowVR::FlowVRInputMesh::FlowVRInputMesh(), sofa::defaulttype::invertMatrix(), sofa::gui::glut::SimpleGUI::mouseEvent(), sofa::gui::qt::viewer::qtogre::QtOgreViewer::moveRayPickInteractor(), sofa::gui::qt::viewer::qt::QtViewer::moveRayPickInteractor(), sofa::gui::qt::viewer::qgl::QtGLViewer::moveRayPickInteractor(), sofa::component::collision::RayPickInteractor::RayPickInteractor(), SofaFlowVR::FlowVRRenderMesh::renderUpdate(), sofa::component::forcefield::PenalityContactForceField< CudaVec3fTypes >::setContacts(), sofa::gpu::cuda::CudaRigidDistanceGridCollisionModel::setNewState(), sofa::component::collision::RigidDistanceGridCollisionModel::setNewState(), sofa::defaulttype::RigidCoord< 2, real >::toMatrix(), and sofa::defaulttype::RigidCoord< 3, real >::toMatrix().
| bool sofa::defaulttype::Mat< L, C, real >::invert | ( | const Mat< L, C, real > & | m | ) | [inline] |
Invert matrix m.
Definition at line 484 of file Mat.h.
Referenced by sofa::component::collision::TetrahedronModel::computeBoundingTree(), sofa::component::collision::DiscreteIntersection::computeIntersection(), sofa::component::forcefield::TriangularAnisotropicFEMForceField< DataTypes >::computeMaterialStiffness(), sofa::component::mapping::BarycentricMapperMeshTopology< gpu::cuda::CudaVectorTypes< VecIn, VecIn, float >, gpu::cuda::CudaVectorTypes< VecOut, VecOut, float > >::createPointInQuad(), sofa::component::mapping::BarycentricMapperQuadSetTopology< In, Out >::createPointInQuad(), sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::createPointInQuad(), sofa::component::mapping::BarycentricMapperHexahedronSetTopology< In, Out >::handleTopologyChange(), and sofa::component::collision::FFDDistanceGridCollisionModel::DeformedCube::undeformDir().
| bool sofa::defaulttype::Mat< L, C, real >::isSymetric | ( | ) | const [inline] |
| const Line& sofa::defaulttype::Mat< L, C, real >::line | ( | int | i | ) | const [inline] |
| Line* sofa::defaulttype::Mat< L, C, real >::lptr | ( | ) | [inline] |
| const Line* sofa::defaulttype::Mat< L, C, real >::lptr | ( | ) | const [inline] |
| Mat<C,P,real> sofa::defaulttype::Mat< L, C, real >::multTranspose | ( | const Mat< L, P, real > & | m | ) | const [inline] |
| Line sofa::defaulttype::Mat< L, C, real >::multTranspose | ( | const Col & | v | ) | const [inline] |
Multiplication of the transposed Matrix * Column.
Definition at line 388 of file Mat.h.
Referenced by sofa::component::collision::DiscreteIntersection::computeIntersection(), sofa::gpu::cuda::CudaCollisionDetection::PointRigidTest::fillInfo(), sofa::gpu::cuda::CudaCollisionDetection::RigidRigidTest::fillInfo(), SensAble::reinit(), and SensAble::SensAble().
| bool sofa::defaulttype::Mat< L, C, real >::operator!= | ( | const Mat< L, C, real > & | b | ) | const [inline] |
| const real& sofa::defaulttype::Mat< L, C, real >::operator() | ( | int | i, | |
| int | j | |||
| ) | const [inline] |
| real& sofa::defaulttype::Mat< L, C, real >::operator() | ( | int | i, | |
| int | j | |||
| ) | [inline] |
| const Line& sofa::defaulttype::Mat< L, C, real >::operator() | ( | int | i | ) | const [inline] |
| Line& sofa::defaulttype::Mat< L, C, real >::operator() | ( | int | i | ) | [inline] |
| Mat<L,C,real> sofa::defaulttype::Mat< L, C, real >::operator* | ( | real | f | ) | const [inline] |
| Col sofa::defaulttype::Mat< L, C, real >::operator* | ( | const Line & | v | ) | const [inline] |
| Mat<L,P,real> sofa::defaulttype::Mat< L, C, real >::operator* | ( | const Mat< C, P, real > & | m | ) | const [inline] |
| void sofa::defaulttype::Mat< L, C, real >::operator*= | ( | real | r | ) | [inline] |
| Mat<L,C,real> sofa::defaulttype::Mat< L, C, real >::operator+ | ( | const Mat< L, C, real > & | m | ) | const [inline] |
| void sofa::defaulttype::Mat< L, C, real >::operator+= | ( | const Mat< L, C, real > & | m | ) | [inline] |
| Mat<L,C,real> sofa::defaulttype::Mat< L, C, real >::operator- | ( | const Mat< L, C, real > & | m | ) | const [inline] |
| void sofa::defaulttype::Mat< L, C, real >::operator-= | ( | const Mat< L, C, real > & | m | ) | [inline] |
| Mat<L,C,real> sofa::defaulttype::Mat< L, C, real >::operator/ | ( | real | f | ) | const [inline] |
| void sofa::defaulttype::Mat< L, C, real >::operator/= | ( | real | r | ) | [inline] |
| void sofa::defaulttype::Mat< L, C, real >::operator= | ( | const Mat< L2, C2, real > & | m | ) | [inline] |
| void sofa::defaulttype::Mat< L, C, real >::operator= | ( | const Mat< L, C, real2 > & | m | ) | [inline] |
| void sofa::defaulttype::Mat< L, C, real >::operator= | ( | const real * | p | ) | [inline] |
Assignment from an array of elements (stored per line).
Reimplemented in sofa::defaulttype::MatNoInit< L, C, real >, and sofa::defaulttype::MatNoInit< 3, 3, Coord::value_type >.
Definition at line 133 of file Mat.h.
Referenced by sofa::component::linearsolver::TNewMatMatrix< Mat >::operator=().
| bool sofa::defaulttype::Mat< L, C, real >::operator== | ( | const Mat< L, C, real > & | b | ) | const [inline] |
| const Line& sofa::defaulttype::Mat< L, C, real >::operator[] | ( | int | i | ) | const [inline] |
| Line& sofa::defaulttype::Mat< L, C, real >::operator[] | ( | int | i | ) | [inline] |
| real* sofa::defaulttype::Mat< L, C, real >::ptr | ( | ) | [inline] |
| const real* sofa::defaulttype::Mat< L, C, real >::ptr | ( | ) | const [inline] |
Cast into a standard C array of elements (stored per line) (read-only).
Definition at line 242 of file Mat.h.
Referenced by sofa::gpu::cuda::CudaRigidDistanceGridCollisionModel::draw(), sofa::component::collision::RigidDistanceGridCollisionModel::draw(), and SofaFlowVR::FlowVRRenderMesh::renderUpdate().
| void sofa::defaulttype::Mat< L, C, real >::setsub | ( | int | L0, | |
| int | C0, | |||
| const Mat< L2, C2, real > & | m | |||
| ) | [inline] |
Definition at line 157 of file Mat.h.
Referenced by sofa::component::forcefield::BeamFEMForceField< DataTypes >::addKToMatrix().
| void sofa::defaulttype::Mat< L, C, real >::subTransposed | ( | const Mat< L, C, real > & | m | ) | [inline] |
| void sofa::defaulttype::Mat< L, C, real >::transpose | ( | ) | [inline] |
| void sofa::defaulttype::Mat< L, C, real >::transpose | ( | const Mat< C, L, real > & | m | ) | [inline] |
Set matrix as the transpose of m.
Definition at line 281 of file Mat.h.
Referenced by sofa::component::collision::TetrahedronModel::computeBoundingTree(), sofa::component::forcefield::TriangularFEMForceField< DataTypes >::computeEigenStrain(), sofa::component::forcefield::TriangularFEMForceField< DataTypes >::computeForce(), sofa::component::forcefield::TriangleFEMForceField< DataTypes >::computeForce(), sofa::component::collision::DiscreteIntersection::computeIntersection(), sofa::component::forcefield::TriangularAnisotropicFEMForceField< DataTypes >::computeMaterialStiffness(), sofa::component::forcefield::TetrahedronFEMForceField< DataTypes >::computeStiffnessMatrix(), sofa::component::forcefield::TetrahedralCorotationalFEMForceField< DataTypes >::computeStiffnessMatrix(), sofa::component::mapping::BarycentricMapperMeshTopology< gpu::cuda::CudaVectorTypes< VecIn, VecIn, float >, gpu::cuda::CudaVectorTypes< VecOut, VecOut, float > >::createPointInQuad(), sofa::component::mapping::BarycentricMapperQuadSetTopology< In, Out >::createPointInQuad(), sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::createPointInQuad(), sofa::gpu::cuda::CudaRigidDistanceGridCollisionModel::draw(), sofa::component::collision::RigidDistanceGridCollisionModel::draw(), sofa::component::mapping::BarycentricMapperMeshTopology< gpu::cuda::CudaVectorTypes< VecIn, VecIn, float >, gpu::cuda::CudaVectorTypes< VecOut, VecOut, float > >::init(), sofa::component::mapping::BarycentricMapperHexahedronSetTopology< In, Out >::init(), sofa::component::mapping::BarycentricMapperTetrahedronSetTopology< In, Out >::init(), sofa::component::mapping::BarycentricMapperQuadSetTopology< In, Out >::init(), sofa::component::mapping::BarycentricMapperTriangleSetTopology< In, Out >::init(), sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::init(), sofa::component::constraint::ParabolicConstraint< DataTypes >::init(), and sofa::helper::polar_decomp().
| Mat<C,L,real> sofa::defaulttype::Mat< L, C, real >::transposed | ( | ) | const [inline] |
Return the transpose of m.
Definition at line 289 of file Mat.h.
Referenced by sofa::defaulttype::SolidTypes< R >::RigidInertia::operator*().
| const Line& sofa::defaulttype::Mat< L, C, real >::w | ( | ) | const [inline] |
| Line& sofa::defaulttype::Mat< L, C, real >::w | ( | ) | [inline] |
| const Line& sofa::defaulttype::Mat< L, C, real >::x | ( | ) | const [inline] |
| Line& sofa::defaulttype::Mat< L, C, real >::x | ( | ) | [inline] |
Special access to first line.
Definition at line 254 of file Mat.h.
Referenced by sofa::helper::Quater< Real >::fromMatrix().
| const Line& sofa::defaulttype::Mat< L, C, real >::y | ( | ) | const [inline] |
| Line& sofa::defaulttype::Mat< L, C, real >::y | ( | ) | [inline] |
Special access to second line.
Definition at line 256 of file Mat.h.
Referenced by sofa::helper::Quater< Real >::fromMatrix().
| const Line& sofa::defaulttype::Mat< L, C, real >::z | ( | ) | const [inline] |
| Line& sofa::defaulttype::Mat< L, C, real >::z | ( | ) | [inline] |
Special access to third line.
Definition at line 258 of file Mat.h.
Referenced by sofa::helper::Quater< Real >::fromMatrix().
1.5.7.1