HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
matrix3d.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 // This file is generated by a script. Do not edit directly. Edit the
26 // matrix3.template.h file to make changes.
27 
28 #ifndef PXR_BASE_GF_MATRIX3D_H
29 #define PXR_BASE_GF_MATRIX3D_H
30 
31 /// \file gf/matrix3d.h
32 /// \ingroup group_gf_LinearAlgebra
33 
34 #include "pxr/pxr.h"
35 #include "pxr/base/gf/api.h"
36 #include "pxr/base/gf/declare.h"
37 #include "pxr/base/gf/matrixData.h"
38 #include "pxr/base/gf/vec3d.h"
39 #include "pxr/base/gf/traits.h"
40 #include "pxr/base/tf/hash.h"
41 
42 #include <iosfwd>
43 #include <vector>
44 
46 
47 template <>
48 struct GfIsGfMatrix<class GfMatrix3d> { static const bool value = true; };
49 
50 class GfMatrix3d;
51 class GfMatrix3f;
52 class GfRotation;
53 class GfQuaternion;
54 class GfQuatd;
55 
56 /// \class GfMatrix3d
57 /// \ingroup group_gf_LinearAlgebra
58 ///
59 /// Stores a 3x3 matrix of \c double elements. A basic type.
60 ///
61 /// Matrices are defined to be in row-major order, so <c>matrix[i][j]</c>
62 /// indexes the element in the \e i th row and the \e j th column.
63 ///
64 /// <h3>3D Transformations</h3>
65 ///
66 /// Three methods, SetRotate(), SetScale(), and ExtractRotation(), interpret
67 /// a GfMatrix3d as a 3D transformation. By convention, vectors are treated
68 /// primarily as row vectors, implying the following:
69 ///
70 /// \li Transformation matrices are organized to deal with row
71 /// vectors, not column vectors.
72 /// \li Each of the Set() methods in this class completely rewrites the
73 /// matrix; for example, SetRotate() yields a matrix
74 /// which does nothing but rotate.
75 /// \li When multiplying two transformation matrices, the matrix
76 /// on the left applies a more local transformation to a row
77 /// vector. For example, if R represents a rotation
78 /// matrix and S represents a scale matrix, the
79 /// product R*S will rotate a row vector, then scale
80 /// it.
82 {
83 public:
84  typedef double ScalarType;
85 
86  static const size_t numRows = 3;
87  static const size_t numColumns = 3;
88 
89  /// Default constructor. Leaves the matrix component values undefined.
90  GfMatrix3d() = default;
91 
92  /// Constructor. Initializes the matrix from 9 independent
93  /// \c double values, specified in row-major order. For example,
94  /// parameter \e m10 specifies the value in row 1 and column 0.
95  GfMatrix3d(double m00, double m01, double m02,
96  double m10, double m11, double m12,
97  double m20, double m21, double m22) {
98  Set(m00, m01, m02,
99  m10, m11, m12,
100  m20, m21, m22);
101  }
102 
103  /// Constructor. Initializes the matrix from a 3x3 array
104  /// of \c double values, specified in row-major order.
105  GfMatrix3d(const double m[3][3]) {
106  Set(m);
107  }
108 
109  /// Constructor. Explicitly initializes the matrix to \e s times the
110  /// identity matrix.
111  explicit GfMatrix3d(double s) {
112  SetDiagonal(s);
113  }
114 
115  /// This explicit constructor initializes the matrix to \p s times
116  /// the identity matrix.
117  explicit GfMatrix3d(int s) {
118  SetDiagonal(s);
119  }
120 
121  /// Constructor. Explicitly initializes the matrix to diagonal form,
122  /// with the \e i th element on the diagonal set to <c>v[i]</c>.
123  explicit GfMatrix3d(const GfVec3d& v) {
124  SetDiagonal(v);
125  }
126 
127  /// Constructor. Initialize the matrix from a vector of vectors of
128  /// double. The vector is expected to be 3x3. If it is
129  /// too big, only the first 3 rows and/or columns will be used.
130  /// If it is too small, uninitialized elements will be filled in with
131  /// the corresponding elements from an identity matrix.
132  ///
133  GF_API
134  explicit GfMatrix3d(const std::vector< std::vector<double> >& v);
135 
136  /// Constructor. Initialize the matrix from a vector of vectors of
137  /// float. The vector is expected to be 3x3. If it is
138  /// too big, only the first 3 rows and/or columns will be used.
139  /// If it is too small, uninitialized elements will be filled in with
140  /// the corresponding elements from an identity matrix.
141  ///
142  GF_API
143  explicit GfMatrix3d(const std::vector< std::vector<float> >& v);
144 
145  /// Constructor. Initialize matrix from rotation.
146  GF_API
147  GfMatrix3d(const GfRotation& rot);
148 
149  /// Constructor. Initialize matrix from a quaternion.
150  GF_API
151  explicit GfMatrix3d(const GfQuatd& rot);
152 
153  /// This explicit constructor converts a "float" matrix to a "double" matrix.
154  GF_API
155  explicit GfMatrix3d(const class GfMatrix3f& m);
156 
157  /// Sets a row of the matrix from a Vec3.
158  void SetRow(int i, const GfVec3d & v) {
159  _mtx[i][0] = v[0];
160  _mtx[i][1] = v[1];
161  _mtx[i][2] = v[2];
162  }
163 
164  /// Sets a column of the matrix from a Vec3.
165  void SetColumn(int i, const GfVec3d & v) {
166  _mtx[0][i] = v[0];
167  _mtx[1][i] = v[1];
168  _mtx[2][i] = v[2];
169  }
170 
171  /// Gets a row of the matrix as a Vec3.
172  GfVec3d GetRow(int i) const {
173  return GfVec3d(_mtx[i][0], _mtx[i][1], _mtx[i][2]);
174  }
175 
176  /// Gets a column of the matrix as a Vec3.
177  GfVec3d GetColumn(int i) const {
178  return GfVec3d(_mtx[0][i], _mtx[1][i], _mtx[2][i]);
179  }
180 
181  /// Sets the matrix from 9 independent \c double values,
182  /// specified in row-major order. For example, parameter \e m10 specifies
183  /// the value in row 1 and column 0.
184  GfMatrix3d& Set(double m00, double m01, double m02,
185  double m10, double m11, double m12,
186  double m20, double m21, double m22) {
187  _mtx[0][0] = m00; _mtx[0][1] = m01; _mtx[0][2] = m02;
188  _mtx[1][0] = m10; _mtx[1][1] = m11; _mtx[1][2] = m12;
189  _mtx[2][0] = m20; _mtx[2][1] = m21; _mtx[2][2] = m22;
190  return *this;
191  }
192 
193  /// Sets the matrix from a 3x3 array of \c double
194  /// values, specified in row-major order.
195  GfMatrix3d& Set(const double m[3][3]) {
196  _mtx[0][0] = m[0][0];
197  _mtx[0][1] = m[0][1];
198  _mtx[0][2] = m[0][2];
199  _mtx[1][0] = m[1][0];
200  _mtx[1][1] = m[1][1];
201  _mtx[1][2] = m[1][2];
202  _mtx[2][0] = m[2][0];
203  _mtx[2][1] = m[2][1];
204  _mtx[2][2] = m[2][2];
205  return *this;
206  }
207 
208  /// Sets the matrix to the identity matrix.
210  return SetDiagonal(1);
211  }
212 
213  /// Sets the matrix to zero.
215  return SetDiagonal(0);
216  }
217 
218  /// Sets the matrix to \e s times the identity matrix.
219  GF_API
220  GfMatrix3d& SetDiagonal(double s);
221 
222  /// Sets the matrix to have diagonal (<c>v[0], v[1], v[2]</c>).
223  GF_API
224  GfMatrix3d& SetDiagonal(const GfVec3d&);
225 
226  /// Fills a 3x3 array of \c double values with the values in
227  /// the matrix, specified in row-major order.
228  GF_API
229  double* Get(double m[3][3]) const;
230 
231  /// Returns raw access to components of matrix as an array of
232  /// \c double values. Components are in row-major order.
233  double* data() {
234  return _mtx.GetData();
235  }
236 
237  /// Returns const raw access to components of matrix as an array of
238  /// \c double values. Components are in row-major order.
239  const double* data() const {
240  return _mtx.GetData();
241  }
242 
243  /// Returns vector components as an array of \c double values.
244  double* GetArray() {
245  return _mtx.GetData();
246  }
247 
248  /// Returns vector components as a const array of \c double values.
249  const double* GetArray() const {
250  return _mtx.GetData();
251  }
252 
253  /// Accesses an indexed row \e i of the matrix as an array of 3 \c
254  /// double values so that standard indexing (such as <c>m[0][1]</c>)
255  /// works correctly.
256  double* operator [](int i) { return _mtx[i]; }
257 
258  /// Accesses an indexed row \e i of the matrix as an array of 3 \c
259  /// double values so that standard indexing (such as <c>m[0][1]</c>)
260  /// works correctly.
261  const double* operator [](int i) const { return _mtx[i]; }
262 
263  /// Hash.
264  friend inline size_t hash_value(GfMatrix3d const &m) {
265  return TfHash::Combine(
266  m._mtx[0][0],
267  m._mtx[0][1],
268  m._mtx[0][2],
269  m._mtx[1][0],
270  m._mtx[1][1],
271  m._mtx[1][2],
272  m._mtx[2][0],
273  m._mtx[2][1],
274  m._mtx[2][2]
275  );
276  }
277 
278  /// Tests for element-wise matrix equality. All elements must match
279  /// exactly for matrices to be considered equal.
280  GF_API
281  bool operator ==(const GfMatrix3d& m) const;
282 
283  /// Tests for element-wise matrix equality. All elements must match
284  /// exactly for matrices to be considered equal.
285  GF_API
286  bool operator ==(const GfMatrix3f& m) const;
287 
288  /// Tests for element-wise matrix inequality. All elements must match
289  /// exactly for matrices to be considered equal.
290  bool operator !=(const GfMatrix3d& m) const {
291  return !(*this == m);
292  }
293 
294  /// Tests for element-wise matrix inequality. All elements must match
295  /// exactly for matrices to be considered equal.
296  bool operator !=(const GfMatrix3f& m) const {
297  return !(*this == m);
298  }
299 
300  /// Returns the transpose of the matrix.
301  GF_API
302  GfMatrix3d GetTranspose() const;
303 
304  /// Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the
305  /// matrix is singular. (FLT_MAX is the largest value a \c float can have,
306  /// as defined by the system.) The matrix is considered singular if the
307  /// determinant is less than or equal to the optional parameter \e eps. If
308  /// \e det is non-null, <c>*det</c> is set to the determinant.
309  GF_API
310  GfMatrix3d GetInverse(double* det = NULL, double eps = 0) const;
311 
312  /// Returns the determinant of the matrix.
313  GF_API
314  double GetDeterminant() const;
315 
316  /// Makes the matrix orthonormal in place. This is an iterative method that
317  /// is much more stable than the previous cross/cross method. If the
318  /// iterative method does not converge, a warning is issued.
319  ///
320  /// Returns true if the iteration converged, false otherwise. Leaves any
321  /// translation part of the matrix unchanged. If \a issueWarning is true,
322  /// this method will issue a warning if the iteration does not converge,
323  /// otherwise it will be silent.
324  GF_API
325  bool Orthonormalize(bool issueWarning=true);
326 
327  /// Returns an orthonormalized copy of the matrix.
328  GF_API
329  GfMatrix3d GetOrthonormalized(bool issueWarning=true) const;
330 
331  /// Returns the sign of the determinant of the matrix, i.e. 1 for a
332  /// right-handed matrix, -1 for a left-handed matrix, and 0 for a
333  /// singular matrix.
334  GF_API
335  double GetHandedness() const;
336 
337  /// Returns true if the vectors in the matrix form a right-handed
338  /// coordinate system.
339  bool IsRightHanded() const {
340  return GetHandedness() == 1.0;
341  }
342 
343  /// Returns true if the vectors in matrix form a left-handed
344  /// coordinate system.
345  bool IsLeftHanded() const {
346  return GetHandedness() == -1.0;
347  }
348 
349  /// Post-multiplies matrix \e m into this matrix.
350  GF_API
351  GfMatrix3d& operator *=(const GfMatrix3d& m);
352 
353  /// Multiplies the matrix by a double.
354  GF_API
355  GfMatrix3d& operator *=(double);
356 
357  /// Returns the product of a matrix and a double.
358  friend GfMatrix3d operator *(const GfMatrix3d& m1, double d)
359  {
360  GfMatrix3d m = m1;
361  return m *= d;
362  }
363 
364  ///
365  // Returns the product of a matrix and a double.
366  friend GfMatrix3d operator *(double d, const GfMatrix3d& m)
367  {
368  return m * d;
369  }
370 
371  /// Adds matrix \e m to this matrix.
372  GF_API
373  GfMatrix3d& operator +=(const GfMatrix3d& m);
374 
375  /// Subtracts matrix \e m from this matrix.
376  GF_API
377  GfMatrix3d& operator -=(const GfMatrix3d& m);
378 
379  /// Returns the unary negation of matrix \e m.
380  GF_API
381  friend GfMatrix3d operator -(const GfMatrix3d& m);
382 
383  /// Adds matrix \e m2 to \e m1
384  friend GfMatrix3d operator +(const GfMatrix3d& m1, const GfMatrix3d& m2)
385  {
386  GfMatrix3d tmp(m1);
387  tmp += m2;
388  return tmp;
389  }
390 
391  /// Subtracts matrix \e m2 from \e m1.
392  friend GfMatrix3d operator -(const GfMatrix3d& m1, const GfMatrix3d& m2)
393  {
394  GfMatrix3d tmp(m1);
395  tmp -= m2;
396  return tmp;
397  }
398 
399  /// Multiplies matrix \e m1 by \e m2.
400  friend GfMatrix3d operator *(const GfMatrix3d& m1, const GfMatrix3d& m2)
401  {
402  GfMatrix3d tmp(m1);
403  tmp *= m2;
404  return tmp;
405  }
406 
407  /// Divides matrix \e m1 by \e m2 (that is, <c>m1 * inv(m2)</c>).
408  friend GfMatrix3d operator /(const GfMatrix3d& m1, const GfMatrix3d& m2)
409  {
410  return(m1 * m2.GetInverse());
411  }
412 
413  /// Returns the product of a matrix \e m and a column vector \e vec.
414  friend inline GfVec3d operator *(const GfMatrix3d& m, const GfVec3d& vec) {
415  return GfVec3d(vec[0] * m._mtx[0][0] + vec[1] * m._mtx[0][1] + vec[2] * m._mtx[0][2],
416  vec[0] * m._mtx[1][0] + vec[1] * m._mtx[1][1] + vec[2] * m._mtx[1][2],
417  vec[0] * m._mtx[2][0] + vec[1] * m._mtx[2][1] + vec[2] * m._mtx[2][2]);
418  }
419 
420  /// Returns the product of row vector \e vec and a matrix \e m.
421  friend inline GfVec3d operator *(const GfVec3d &vec, const GfMatrix3d& m) {
422  return GfVec3d(vec[0] * m._mtx[0][0] + vec[1] * m._mtx[1][0] + vec[2] * m._mtx[2][0],
423  vec[0] * m._mtx[0][1] + vec[1] * m._mtx[1][1] + vec[2] * m._mtx[2][1],
424  vec[0] * m._mtx[0][2] + vec[1] * m._mtx[1][2] + vec[2] * m._mtx[2][2]);
425  }
426 
427  /// Returns the product of a matrix \e m and a column vector \e vec.
428  /// Note that the return type is a \c GfVec3f.
429  GF_API
430  friend GfVec3f operator *(const GfMatrix3d& m, const GfVec3f& vec);
431 
432  /// Returns the product of row vector \e vec and a matrix \e m.
433  /// Note that the return type is a \c GfVec3f.
434  GF_API
435  friend GfVec3f operator *(const GfVec3f &vec, const GfMatrix3d& m);
436 
437  /// Sets matrix to specify a uniform scaling by \e scaleFactor.
438  GF_API
439  GfMatrix3d& SetScale(double scaleFactor);
440 
441  /// \name 3D Transformation Utilities
442  /// @{
443 
444  /// Sets the matrix to specify a rotation equivalent to \e rot.
445  GF_API
446  GfMatrix3d& SetRotate(const GfQuatd &rot);
447 
448  /// Sets the matrix to specify a rotation equivalent to \e rot.
449  GF_API
451 
452  /// Sets the matrix to specify a nonuniform scaling in x, y, and z by
453  /// the factors in vector \e scaleFactors.
454  GF_API
455  GfMatrix3d& SetScale(const GfVec3d &scaleFactors);
456 
457  /// Returns the rotation corresponding to this matrix. This works
458  /// well only if the matrix represents a rotation.
459  ///
460  /// For good results, consider calling Orthonormalize() before calling
461  /// this method.
462  GF_API
463  GfRotation ExtractRotation() const;
464 
465  /// Decompose the rotation corresponding to this matrix about 3
466  /// orthogonal axes. If the axes are not orthogonal, warnings
467  /// will be spewed.
468  ///
469  /// This is a convenience method that is equivalent to calling
470  /// ExtractRotation().Decompose().
471  GF_API
472  GfVec3d DecomposeRotation(const GfVec3d &axis0,
473  const GfVec3d &axis1,
474  const GfVec3d &axis2 ) const;
475 
476  /// Returns the quaternion corresponding to this matrix. This works
477  /// well only if the matrix represents a rotation.
478  ///
479  /// For good results, consider calling Orthonormalize() before calling
480  /// this method.
481  GF_API
483 
484  /// @}
485 
486 private:
487  /// Set the matrix to the rotation given by a quaternion,
488  /// defined by the real component \p r and imaginary components \p i.
489  void _SetRotateFromQuat(double r, const GfVec3d& i);
490 
491 
492 private:
493  /// Matrix storage, in row-major order.
495 
496  // Friend declarations
497  friend class GfMatrix3f;
498 };
499 
500 
501 /// Tests for equality within a given tolerance, returning \c true if the
502 /// difference between each component of the matrix is less than or equal
503 /// to \p tolerance, or false otherwise.
504 GF_API
505 bool GfIsClose(GfMatrix3d const &m1, GfMatrix3d const &m2, double tolerance);
506 
507 /// Output a GfMatrix3d
508 /// \ingroup group_gf_DebuggingOutput
509 GF_API std::ostream& operator<<(std::ostream &, GfMatrix3d const &);
510 
512 
513 #endif // PXR_BASE_GF_MATRIX3D_H
GF_API bool Orthonormalize(bool issueWarning=true)
bool IsLeftHanded() const
Definition: matrix3d.h:345
GfMatrix3d(const GfVec3d &v)
Definition: matrix3d.h:123
GF_API GfMatrix3d & operator-=(const GfMatrix3d &m)
Subtracts matrix m from this matrix.
GF_API GfMatrix3d & operator+=(const GfMatrix3d &m)
Adds matrix m to this matrix.
GF_API GfMatrix3d GetOrthonormalized(bool issueWarning=true) const
Returns an orthonormalized copy of the matrix.
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
Definition: thread.h:623
bool operator!=(const GfMatrix3d &m) const
Definition: matrix3d.h:290
GF_API double GetHandedness() const
GfMatrix3d(double s)
Definition: matrix3d.h:111
const GLdouble * v
Definition: glcorearb.h:837
double * GetArray()
Returns vector components as an array of double values.
Definition: matrix3d.h:244
GfMatrix3d(int s)
Definition: matrix3d.h:117
GA_API const UT_StringHolder rot
Definition: vec3f.h:62
GLdouble s
Definition: glad.h:3009
GfMatrix3d()=default
Default constructor. Leaves the matrix component values undefined.
GF_API GfMatrix3d & SetDiagonal(double s)
Sets the matrix to s times the identity matrix.
GF_API GfMatrix3d & SetRotate(const GfQuatd &rot)
Sets the matrix to specify a rotation equivalent to rot.
GfVec3d GetRow(int i) const
Gets a row of the matrix as a Vec3.
Definition: matrix3d.h:172
static const size_t numColumns
Definition: matrix3d.h:87
bool IsRightHanded() const
Definition: matrix3d.h:339
GF_API GfRotation ExtractRotation() const
friend GfMatrix3d operator*(const GfMatrix3d &m1, double d)
Returns the product of a matrix and a double.
Definition: matrix3d.h:358
GfMatrix3d(const double m[3][3])
Definition: matrix3d.h:105
T * GetData()
Return a pointer to the start of all the data.
Definition: matrixData.h:50
GF_API GfVec3d DecomposeRotation(const GfVec3d &axis0, const GfVec3d &axis1, const GfVec3d &axis2) const
const double * data() const
Definition: matrix3d.h:239
GfMatrix3d & SetZero()
Sets the matrix to zero.
Definition: matrix3d.h:214
GF_API GfQuaternion ExtractRotationQuaternion() const
GF_API double GetDeterminant() const
Returns the determinant of the matrix.
GF_API GfMatrix3d & operator*=(const GfMatrix3d &m)
Post-multiplies matrix m into this matrix.
friend GfMatrix3d operator+(const GfMatrix3d &m1, const GfMatrix3d &m2)
Adds matrix m2 to m1.
Definition: matrix3d.h:384
GF_API friend GfMatrix3d operator-(const GfMatrix3d &m)
Returns the unary negation of matrix m.
GF_API GfMatrix3d GetInverse(double *det=NULL, double eps=0) const
double * operator[](int i)
Definition: matrix3d.h:256
static size_t Combine(Args &&...args)
Produce a hash code by combining the hash codes of several objects.
Definition: hash.h:492
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
void SetColumn(int i, const GfVec3d &v)
Sets a column of the matrix from a Vec3.
Definition: matrix3d.h:165
double ScalarType
Definition: matrix3d.h:84
GF_API double * Get(double m[3][3]) const
GfVec3d GetColumn(int i) const
Gets a column of the matrix as a Vec3.
Definition: matrix3d.h:177
Definition: vec3d.h:62
GfMatrix3d & Set(const double m[3][3])
Definition: matrix3d.h:195
GfMatrix3d(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
Definition: matrix3d.h:95
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
GfMatrix3d & Set(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
Definition: matrix3d.h:184
GF_API bool GfIsClose(GfMatrix3d const &m1, GfMatrix3d const &m2, double tolerance)
Definition: core.h:1131
GF_API bool operator==(const GfMatrix3d &m) const
const double * GetArray() const
Returns vector components as a const array of double values.
Definition: matrix3d.h:249
GLboolean r
Definition: glcorearb.h:1222
GF_API GfMatrix3d GetTranspose() const
Returns the transpose of the matrix.
Definition: quatd.h:59
GF_API std::ostream & operator<<(std::ostream &, GfMatrix3d const &)
GF_API GfMatrix3d & SetScale(double scaleFactor)
Sets matrix to specify a uniform scaling by scaleFactor.
static const size_t numRows
Definition: matrix3d.h:86
double * data()
Definition: matrix3d.h:233
#define GF_API
Definition: api.h:40
friend GfMatrix3d operator/(const GfMatrix3d &m1, const GfMatrix3d &m2)
Divides matrix m1 by m2 (that is, m1 * inv(m2)).
Definition: matrix3d.h:408
GfMatrix3d & SetIdentity()
Sets the matrix to the identity matrix.
Definition: matrix3d.h:209
friend size_t hash_value(GfMatrix3d const &m)
Hash.
Definition: matrix3d.h:264
void SetRow(int i, const GfVec3d &v)
Sets a row of the matrix from a Vec3.
Definition: matrix3d.h:158