예제 #1
0
IMatrix3 IMatrix3::operator * (const IMatrix3& m) const
{
    const IVector3& mc0 = m.getColumn(0);
    const IVector3& mc1 = m.getColumn(1);
    const IVector3& mc2 = m.getColumn(2);

    return IMatrix3(IVector3(v_[0].dot(mc0), v_[0].dot(mc1), v_[0].dot(mc2)),
                    IVector3(v_[1].dot(mc0), v_[1].dot(mc1), v_[1].dot(mc2)),
                    IVector3(v_[2].dot(mc0), v_[2].dot(mc1), v_[2].dot(mc2)));
}
예제 #2
0
IVector3 IVector3::cross(const IVector3& other) const
{
  return IVector3(i_[1] * other.i_[2] - i_[2] * other.i_[1], 
                  i_[2] * other.i_[0] - i_[0] * other.i_[2],
                  i_[0] * other.i_[1] - i_[1] * other.i_[0]);
}
예제 #3
0
IVector3 IVector3::operator - (const IVector3& other) const
{
  return IVector3(i_[0] - other.i_[0], i_[1] - other.i_[1], i_[2] - other.i_[2]);
}
예제 #4
0
IVector3 IVector3::operator + (const IVector3& other) const
{
  return IVector3(i_[0] + other.i_[0], i_[1] + other.i_[1], i_[2] + other.i_[2]);
}
예제 #5
0
IVector3 IVector3::cross(const Vec3f& other) const
{
  return IVector3(i_[1] * other[2] - i_[2] * other[1], 
                  i_[2] * other[0] - i_[0] * other[2],
                  i_[0] * other[1] - i_[1] * other[0]);
}
예제 #6
0
IVector3 TVector3::getTightBound(FCL_REAL l, FCL_REAL r) const
{
  return IVector3(i_[0].getTightBound(l, r), i_[1].getTightBound(l, r), i_[2].getTightBound(l, r));
}
예제 #7
0
IVector3 TVector3::getTightBound() const
{
  return IVector3(i_[0].getTightBound(), i_[1].getTightBound(), i_[2].getTightBound());
}
예제 #8
0
IVector3 TVector3::getBound(FCL_REAL t) const
{
  return IVector3(i_[0].getBound(t), i_[1].getBound(t), i_[2].getBound(t));
}
예제 #9
0
IVector3 IMatrix3::getColumn(size_t i) const
{
    return IVector3(v_[0][i], v_[1][i], v_[2][i]);
}
예제 #10
0
IVector3 IMatrix3::operator * (const IVector3& v) const
{
    return IVector3(v_[0].dot(v), v_[1].dot(v), v_[2].dot(v));
}