Exemplo n.º 1
0
/**
 * \brief Transform from current triangle to the target triangle
 */
Transform	Triangle::to(const Triangle& target) const {
	double	rotation = rotate_to(target);
	double	scale = scale_to(target);
	Transform	result(rotation, Point(), scale);
	Point	translation = target.basepoint() - result(basepoint());
	result = result + translation;
	return result;
}
Exemplo n.º 2
0
Vec3 unit(const Vec3 & nhs) {
	return scale_to(nhs, 1);
}
Exemplo n.º 3
0
Vec4 unit(const Vec4 & nhs) {
	return scale_to(nhs, 1);
}