]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/SGLineSegment.hxx
Merge branch 'timoore/effects'
[simgear.git] / simgear / math / SGLineSegment.hxx
index 0e509621856a2c238373aada3b6f59ca26be9523..c3121c62bba979c796910840dd86f9665447c63f 100644 (file)
@@ -48,6 +48,14 @@ public:
   SGVec3<T> getCenter() const
   { return _start + T(0.5)*_direction; }
 
+  SGLineSegment<T> transform(const SGMatrix<T>& matrix) const
+  {
+    SGLineSegment<T> lineSegment;
+    lineSegment._start = matrix.xformPt(_start);
+    lineSegment._direction = matrix.xformVec(_direction);
+    return lineSegment;
+  }
+
 private:
   SGVec3<T> _start;
   SGVec3<T> _direction;