Skip to content

Commit

Permalink
SWIG: enable Matrix4 / Affine3 multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed May 31, 2024
1 parent 3c633f7 commit b67ca48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions OgreMain/include/Ogre.i
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ ADD_REPR(Matrix4)
Ogre::Vector4 operator*(const Ogre::Vector4& v) { return *$self * v; }
Ogre::Vector3 operator*(const Ogre::Vector3& v) { return *$self * v; }
Ogre::Matrix4 operator*(const Ogre::Matrix4& m) { return *$self * m; }
Ogre::Matrix4 operator*(const Ogre::Affine3& m) { return *$self * m; }
Ogre::Matrix4 operator+(const Ogre::Matrix4& m) { return *$self + m; }
Ogre::Matrix4 operator-(const Ogre::Matrix4& m) { return *$self - m; }
Ogre::Real __getitem__(int row, int column) { return (*$self)[row][column]; }
Expand All @@ -458,6 +459,7 @@ ADD_REPR(Affine3)
Ogre::Vector4 operator*(const Ogre::Vector4& v) { return *$self * v; }
Ogre::Vector3 operator*(const Ogre::Vector3& v) { return *$self * v; }
Ogre::Affine3 operator*(const Ogre::Affine3& m) { return *$self * m; }
Ogre::Matrix4 operator*(const Ogre::Matrix4& m) { return *$self * m; }
}
%include "OgreQuaternion.h"
ADD_REPR(Quaternion)
Expand Down

0 comments on commit b67ca48

Please sign in to comment.