Реферат: Трехмерная графика Теория
{
return Vector ( u.x + v.x, u.y + v.y, u.z + v.z );
}
inline Vector operator - ( const Vector& u, const Vector& v )
{
return Vector ( u.x - v.x, u.y - v.y, u.z - v.z );
}
inline Vector operator * ( const Vector& u, const Vector& v )
{
return Vector ( u.x * v.x, u.y * v.y, u.z * v.z );
}
inline Vector operator * ( const Vector& u, double f )
{
return Vector ( u.x * f, u.y * f, u.z * f );
}
inline Vector operator * ( double f, const Vector& v )
{
return Vector ( f * v.x, f * v.y, f * v.z );
}
inline Vector operator / ( const Vector& u, const Vector& v )
{
return Vector ( u.x / v.x, u.y / v.y, u.z / v.z );
}
inline Vector operator / ( const Vector& u, double f )
{
return Vector ( u.x / f, u.y / f, u.z / f );
}
inline Vector& Vector :: operator += ( const Vector& v )
{