118 { |
118 { |
119 if (x() != other.x()) return x() < other.x(); |
119 if (x() != other.x()) return x() < other.x(); |
120 if (y() != other.y()) return y() < other.y(); |
120 if (y() != other.y()) return y() < other.y(); |
121 if (z() != other.z()) return z() < other.z(); |
121 if (z() != other.z()) return z() < other.z(); |
122 return false; |
122 return false; |
|
123 } |
|
124 |
|
125 /* |
|
126 * Transforms this vertex with a tranformation matrix and returns the result. |
|
127 */ |
|
128 Vertex Vertex::transformed(const GLRotationMatrix& matrix) const |
|
129 { |
|
130 return { |
|
131 matrix(0, 0) * x() + matrix(0, 1) * y() + matrix(0, 2) * z(), |
|
132 matrix(1, 0) * x() + matrix(1, 1) * y() + matrix(1, 2) * z(), |
|
133 matrix(2, 0) * x() + matrix(2, 1) * y() + matrix(2, 2) * z(), |
|
134 }; |
123 } |
135 } |
124 |
136 |
125 // ============================================================================= |
137 // ============================================================================= |
126 // |
138 // |
127 BoundingBox::BoundingBox() |
139 BoundingBox::BoundingBox() |