ZStTransform ZStTransform::getInverseTransform() const { ZStTransform transform; transform.setOffset( -getTx() / getSx(), -getTy() / getSy(), -getTz() / getSz()); transform.setScale(1.0 / getSx(), 1.0 / getSy(), 1.0 / getSz()); return transform; }
double ZStTransform::getOffset(NeuTube::EAxis axis) const { switch (axis) { case NeuTube::X_AXIS: return getTx(); case NeuTube::Y_AXIS: return getTy(); case NeuTube::Z_AXIS: return getTz(); } return 0.0; }
/* Return the Y (Z) coordinate of the point in global terms. */ double SceneryItem::getZ() { return getTz() + TILE_SIZE_METRES * getRz(); }
bool ZStTransform::hasOffset() const { return (getTx() != 0.0) || (getTy() != 0.0) || (getTz() != 0.0); }
bool ZStTransform::isIntOffset() const { return (std::ceil(getTx()) == getTx()) && (std::ceil(getTy()) == getTy()) && (std::ceil(getTz()) == getTz()); }
ZPoint ZStTransform::getOffset() const { return ZPoint(getTx(), getTy(), getTz()); }