source: trunk/packages/vizservers/nanovis/vrmath/vrLineSegment.cpp @ 2096

Last change on this file since 2096 was 2096, checked in by ldelgass, 13 years ago

Normalize line endings, set eol-style to native on *.cpp, *.h files

  • Property svn:eol-style set to native
File size: 384 bytes
Line 
1#include <vrmath/vrLineSegment.h>
2
3
4vrLineSegment::vrLineSegment()
5: pos(0.0f, 0.0f, 0.0f), dir(0.0f, 0.0f, -1.0f), length(0.0f)
6{
7       
8}
9
10void vrLineSegment::transform(const vrMatrix4x4f &mat, const vrLineSegment &seg)
11{
12        pos.transform(mat, seg.pos);
13       
14        dir.x *= length;
15        dir.y *= length;
16        dir.z *= length;
17
18        dir.transformVec(mat, seg.dir);
19        length = dir.length();
20        dir.normalize();
21}
Note: See TracBrowser for help on using the repository browser.