Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
hrplib
hrpCollision
Opcode
Ice
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;
47
HPoint
HPoint::operator*
(
const
Matrix4x4
& mat)
const
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
59
HPoint
&
HPoint::operator*=
(
const
Matrix4x4
& mat)
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
IceMaths::HPoint::operator*=
inline_ HPoint & operator*=(const HPoint &p)
Operator for HPoint *= HPoint;.
Definition:
OPC_IceHook.h:121
IceMaths::Matrix3x3::m
float m[3][3]
Definition:
OPC_IceHook.h:493
IceMaths::Matrix4x4::m
float m[4][4]
Definition:
OPC_IceHook.h:434
IceMaths::Point::x
float x
Definition:
OPC_IceHook.h:525
IceMaths::Point
Definition:
OPC_IceHook.h:26
IceMaths::HPoint::operator*
inline_ HPoint operator*(const HPoint &p) const
Operator for HPoint Mul = HPoint * HPoint;.
Definition:
OPC_IceHook.h:93
IceMaths::Point::z
float z
Definition:
OPC_IceHook.h:525
Stdafx.h
IceMaths::Point::y
float y
Definition:
OPC_IceHook.h:525
IceMaths::HPoint
Definition:
OPC_IceHook.h:16
IceMaths::Matrix3x3
Definition:
OPC_IceHook.h:21
IceMaths::Point::Point
inline_ Point()
Empty constructor.
Definition:
OPC_IceHook.h:31
IceMaths::HPoint::w
float w
Cast a HPoint to a Point. w is discarded.
Definition:
OPC_IceHook.h:157
IceMaths
Definition:
ColdetModel.h:24
IceMaths::HPoint::HPoint
inline_ HPoint()
Empty constructor.
Definition:
OPC_IceHook.h:21
IceMaths::Matrix4x4
Definition:
OPC_IceHook.h:22
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:22