Mat4d.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Core
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeCore/Base.h"
16 #include "CeeCore/Vec3d.h"
17 
18 namespace cee {
19 
20 
21 //==================================================================================================
22 //
23 //
24 //
25 //==================================================================================================
26 class CEE_CORE_EXPORT Mat4d
27 {
28 public:
29  Mat4d();
30  Mat4d(const Mat4d& other);
31  Mat4d(double m00, double m01, double m02, double m03,
32  double m10, double m11, double m12, double m13,
33  double m20, double m21, double m22, double m23,
34  double m30, double m31, double m32, double m33);
35  ~Mat4d();
36 
37  Mat4d& operator=(const Mat4d& other);
38 
39  bool operator==(const Mat4d& rhs) const;
40  bool operator!=(const Mat4d& rhs) const;
41 
42  const Mat4d operator*(const Mat4d& rhs) const;
43 
44  bool isIdentity() const;
45  void setIdentity();
46 
47  bool isZero() const;
48  void setZero();
49 
50  bool invert();
51 
52  double rowCol(int row, int col) const;
53  void setRowCol(int row, int col, double value);
54  double& operator()(int row, int col);
55  double operator()(int row, int col) const;
56 
57  const double* rawPointer() const;
58 
59  static Mat4d fromTranslation(const Vec3d& trans);
60  static Mat4d fromScaling(const Vec3d& scale);
61  static Mat4d fromRotation(const Vec3d& axis, double angle);
62 
63 private:
64  CEE_PRIVATE_IMPL(Mat4d);
65 };
66 
67 
68 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppAssert.cpp:18
bool operator!=(const PtrRef< T1 > &a, const PtrRef< T2 > &b)
Returns true if the internal pointers of refs a and b are different.
Definition: PtrRef.h:58
bool operator==(const PtrRef< T1 > &a, const PtrRef< T2 > &b)
Returns true if the internal pointers of refs a and b are equal.
Definition: PtrRef.h:57
Vector class for a 3D double vector.
Definition: Vec3d.h:26
4 dimensional matrix.
Definition: Mat4d.h:26