Skip to content
Snippets Groups Projects
Commit dbe067d7 authored by Matthew Woehlke's avatar Matthew Woehlke
Browse files

Allow GetData from const vtkMatrix

Add overloads of GetData to vtkMatrix3x3, vtkMatrix4x4 to allow
accessing the (immutable) underlying data of a const-qualified instance.
parent 5dd27eb8
No related branches found
No related tags found
No related merge requests found
......@@ -154,6 +154,11 @@ public:
*/
double * GetData() { return *this->Element; }
/**
* Return a pointer to the first element of the matrix (double[9]).
*/
const double * GetData() const { return *this->Element; }
protected:
vtkMatrix3x3();
~vtkMatrix3x3() override;
......
......@@ -170,6 +170,11 @@ public:
*/
double *GetData() { return *this->Element; }
/**
* Returns the raw double array holding the matrix.
*/
const double *GetData() const { return *this->Element; }
protected:
vtkMatrix4x4() { vtkMatrix4x4::Identity(*this->Element); };
~vtkMatrix4x4() override {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment