SmartEngine  1.6.0
Public Member Functions | List of all members
SmartEngine::IMatrix Class Referenceabstract

Wrapper around either a const or a mutable matrix. More...

#include <Matrix.h>

Inheritance diagram for SmartEngine::IMatrix:
SmartEngine::IObject

Public Member Functions

virtual bool IsReadOnly () const =0
 Returns true if this matrix is read only. More...
 
virtual MatrixIndex RowCount () const =0
 Returns the number of rows in the matrix More...
 
virtual MatrixIndex ColCount () const =0
 Returns the number of columns in the matrix More...
 
virtual float GetValue (MatrixIndex row, MatrixIndex col) const =0
 Returns the value at location [row, col] More...
 
virtual void GetRow (MatrixIndex row, float *buffer, MatrixIndex bufferCount) const =0
 Fills the buffer with a single row from the matrix. The buffer should have space for at least RowCount() elements. More...
 
virtual void GetBuffer (float *buffer, MatrixIndex bufferCount) const =0
 Fills the buffer with all elements from this matrix. The elements in the buffer will be laid out in row major order ( R0C0, R0C1, R1C0, R1C1, etc). The buffer should have space for at least RowCount() * ColCount() elements. More...
 
virtual void SetValue (MatrixIndex row, MatrixIndex col, float value)=0
 Sets a value in the matrix. This will error if the matrix is read only. More...
 
virtual void Resize (MatrixIndex rows, MatrixIndex cols)=0
 Resizes the matrix to the specified number of rows and columns. This will error if the matrix is read only. More...
 
virtual void Zero ()=0
 Assigns 0 to all values in the matrix. More...
 
virtual bool HasNaN ()=0
 Returns true if any value is NaN, false otherwise. More...
 
- Public Member Functions inherited from SmartEngine::IObject
virtual ObjectId GetId () const =0
 Returns the ID of this object. More...
 
virtual void AddRef () const =0
 Increments the internal reference count on this object. It is not common to use this method directly. More...
 
virtual void Release () const =0
 Decrements the internal reference count on this object. It is not common to use this method directly. More...
 
virtual int GetRefCount () const =0
 Returns the number of references to this object. More...
 
virtual void * QueryInterface (ObjectClassId id)=0
 Queries the object for an interface and returns a pointer to that interface if found. More...
 
void operator= (IObject const &x)=delete
 

Additional Inherited Members

- Public Attributes inherited from SmartEngine::IObject
 private
 
 __pad0__: IObject() {} IObject(IObject const&) = delete
 

Detailed Description

Wrapper around either a const or a mutable matrix.

Member Function Documentation

◆ ColCount()

virtual MatrixIndex SmartEngine::IMatrix::ColCount ( ) const
pure virtual

Returns the number of columns in the matrix

◆ GetBuffer()

virtual void SmartEngine::IMatrix::GetBuffer ( float *  buffer,
MatrixIndex  bufferCount 
) const
pure virtual

Fills the buffer with all elements from this matrix. The elements in the buffer will be laid out in row major order ( R0C0, R0C1, R1C0, R1C1, etc). The buffer should have space for at least RowCount() * ColCount() elements.

Parameters
bufferCountThe number of elements in the buffer. Not the byte size of the buffer

◆ GetRow()

virtual void SmartEngine::IMatrix::GetRow ( MatrixIndex  row,
float *  buffer,
MatrixIndex  bufferCount 
) const
pure virtual

Fills the buffer with a single row from the matrix. The buffer should have space for at least RowCount() elements.

Parameters
bufferCountThe number of elements in the buffer. Not the byte size of the buffer

◆ GetValue()

virtual float SmartEngine::IMatrix::GetValue ( MatrixIndex  row,
MatrixIndex  col 
) const
pure virtual

Returns the value at location [row, col]

◆ HasNaN()

virtual bool SmartEngine::IMatrix::HasNaN ( )
pure virtual

Returns true if any value is NaN, false otherwise.

◆ IsReadOnly()

virtual bool SmartEngine::IMatrix::IsReadOnly ( ) const
pure virtual

Returns true if this matrix is read only.

◆ Resize()

virtual void SmartEngine::IMatrix::Resize ( MatrixIndex  rows,
MatrixIndex  cols 
)
pure virtual

Resizes the matrix to the specified number of rows and columns. This will error if the matrix is read only.

◆ RowCount()

virtual MatrixIndex SmartEngine::IMatrix::RowCount ( ) const
pure virtual

Returns the number of rows in the matrix

◆ SetValue()

virtual void SmartEngine::IMatrix::SetValue ( MatrixIndex  row,
MatrixIndex  col,
float  value 
)
pure virtual

Sets a value in the matrix. This will error if the matrix is read only.

◆ Zero()

virtual void SmartEngine::IMatrix::Zero ( )
pure virtual

Assigns 0 to all values in the matrix.