void transform(fwPlane& _plane, const fwMatrix4x4& _matrix)
{
    SLM_TRACE_FUNC();
    fwVec3d normalVec = getNormal(_plane);
    fwVec3d beg = normalVec * getDistance(_plane);
    fwVec3d end = beg + normalVec;
    multVecMatrix(_matrix,beg,beg);
    multVecMatrix(_matrix,end,end);
    normalVec = end - beg;
    normalize(normalVec);
    setNormal(_plane, normalVec);
    setDistance(_plane, dot(normalVec, beg));

}
Exemple #2
0
void
SbMatrix::multLineMatrix(const SbLine &src, SbLine &dst) const
{
	SbVec3f pos, dir;
	multVecMatrix(src.getPosition(), pos);
	multDirMatrix(src.getDirection(), dir);
	dst.setValue(pos, pos+dir);
}
FloatPoint TransformationMatrix::mapPoint(const FloatPoint& p) const
{
    if (isIdentityOrTranslation())
        return FloatPoint(p.x() + static_cast<float>(m_matrix[3][0]), p.y() + static_cast<float>(m_matrix[3][1]));

    double x, y;
    multVecMatrix(p.x(), p.y(), x, y);
    return FloatPoint(static_cast<float>(x), static_cast<float>(y));
}