source: trunk/packages/vizservers/nanovis/vrmath/vrPlane.cpp @ 2798

Last change on this file since 2798 was 2798, checked in by ldelgass, 12 years ago

Add emacs mode magic line in preparation for indentation cleanup

  • Property svn:eol-style set to native
File size: 477 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2#include <vrmath/vrPlane.h>
3
4void vrPlane::transform(vrMatrix4x4f& mat)
5{
6    vrVector4f v(normal.x, normal.y, normal.z, distance);
7    float* m = mat.get();
8
9    normal.set(m[0]*v.x + m[1]*v.y + m[2]*v.z + m[3]*v.w,
10                    m[4]*v.x + m[5]*v.y + m[6]*v.z + m[7]*v.w,
11                    m[8]*v.x + m[9]*v.y + m[10]*v.z + m[11]*v.w);
12
13    distance = m[12]*v.x + m[13]*v.y + m[14]*v.z + m[15]*v.w;
14}
Note: See TracBrowser for help on using the repository browser.