IceHPoint.cpp
Go to the documentation of this file.
1 
8 
11 
25 
28 // Precompiled Header
29 #include "Stdafx.h"
30 
31 using namespace IceMaths;
32 
34 // Point Mul = HPoint * Matrix3x3;
36 Point HPoint::operator*(const Matrix3x3& mat) const
37 {
38  return Point(
39  x * mat.m[0][0] + y * mat.m[1][0] + z * mat.m[2][0],
40  x * mat.m[0][1] + y * mat.m[1][1] + z * mat.m[2][1],
41  x * mat.m[0][2] + y * mat.m[1][2] + z * mat.m[2][2] );
42 }
43 
45 // HPoint Mul = HPoint * Matrix4x4;
48 {
49  return HPoint(
50  x * mat.m[0][0] + y * mat.m[1][0] + z * mat.m[2][0] + w * mat.m[3][0],
51  x * mat.m[0][1] + y * mat.m[1][1] + z * mat.m[2][1] + w * mat.m[3][1],
52  x * mat.m[0][2] + y * mat.m[1][2] + z * mat.m[2][2] + w * mat.m[3][2],
53  x * mat.m[0][3] + y * mat.m[1][3] + z * mat.m[2][3] + w * mat.m[3][3]);
54 }
55 
57 // HPoint *= Matrix4x4
60 {
61  float xp = x * mat.m[0][0] + y * mat.m[1][0] + z * mat.m[2][0] + w * mat.m[3][0];
62  float yp = x * mat.m[0][1] + y * mat.m[1][1] + z * mat.m[2][1] + w * mat.m[3][1];
63  float zp = x * mat.m[0][2] + y * mat.m[1][2] + z * mat.m[2][2] + w * mat.m[3][2];
64  float wp = x * mat.m[0][3] + y * mat.m[1][3] + z * mat.m[2][3] + w * mat.m[3][3];
65 
66  x = xp; y = yp; z = zp; w = wp;
67 
68  return *this;
69 }
70 
Matrix4x4
Definition: IceMatrix4x4.h:21
Matrix4x4::m
float m[4][4]
Definition: IceMatrix4x4.h:433
Stdafx.h
Matrix3x3::m
float m[3][3]
Definition: IceMatrix3x3.h:492
HPoint
Definition: IceHPoint.h:15
HPoint::operator*=
inline_ HPoint & operator*=(const HPoint &p)
Operator for HPoint *= HPoint;.
Definition: IceHPoint.h:120
HPoint::operator*
inline_ HPoint operator*(const HPoint &p) const
Operator for HPoint Mul = HPoint * HPoint;.
Definition: IceHPoint.h:92
Matrix3x3
Definition: IceMatrix3x3.h:20
IceMaths
Definition: ColdetModel.h:24


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:03