示例#1
0
文件: Vect2D.cpp 项目: jonneva/mb
/**
    Adds the specified transform to this vector. This vector
    is first rotated, then translated.
*/
void Vect2D::add(Transform2D& xform) {

    // rotate
    addRotation(xform);

    // translate
    *this += xform.getLocation();
}
示例#2
0
文件: Vect2D.cpp 项目: jonneva/mb
/**
    Subtracts the specified transform to this vector. This
    vector translated, then rotated.
*/
void Vect2D::subtract(Transform2D& xform) {

    // translate
    *this -= xform.getLocation();

    // rotate
    subtractRotation(xform);
}