|
Revision 2828, 2.2 kB
(checked in by patrickh, 8 years ago)
|
Updated the copyright to what ISU's lawyers decided they want now.
The vast majority of this was done using Kevin's auto-copyright.pl script
which definitely made this easier. All the copyright blocks now have
begin and end tags so that if and when we have to update the copyright
information again, it will be even simpler.
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
#include <vjConfig.h> |
|---|
| 35 |
#include <Math/vjVec4.h> |
|---|
| 36 |
|
|---|
| 37 |
void vjVec4::xform(const vjMatrix& _m, vjVec4 _v) |
|---|
| 38 |
{ |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
vec[0] = vec[1] = vec[2] = vec[3] = 0.0f; |
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
for(int j=0;j<4;j++) |
|---|
| 47 |
for(int k=0;k<4;k++) |
|---|
| 48 |
vec[j] += (_v[k] * _m[k][j]); |
|---|
| 49 |
} |
|---|
| 50 |
|
|---|
| 51 |
inline vjVec4 operator *(float _s, const vjVec4& _v) { |
|---|
| 52 |
return vjVec4(_v[0]*_s, _v[1]*_s, _v[2]*_s, _v[3]*_s); |
|---|
| 53 |
} |
|---|
| 54 |
|
|---|
| 55 |
inline vjVec4 operator *(const vjVec4& _v, float _s) { |
|---|
| 56 |
return vjVec4(_v[0]*_s, _v[1]*_s, _v[2]*_s, _v[3]*_s); |
|---|
| 57 |
} |
|---|
| 58 |
|
|---|
| 59 |
inline vjVec4 operator /(const vjVec4& _v, float _s) { |
|---|
| 60 |
_s = 1.0f/_s; |
|---|
| 61 |
return vjVec4(_v[0]*_s, _v[1]*_s, _v[2]*_s, _v[3]*_s); |
|---|
| 62 |
} |
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
std::ostream& operator<<(std::ostream& out, vjVec4& _v) |
|---|
| 66 |
{ |
|---|
| 67 |
for(int j=0;j<4;j++) |
|---|
| 68 |
{ |
|---|
| 69 |
out << _v.vec[j] << (j < 3 ? ", " : ""); |
|---|
| 70 |
} |
|---|
| 71 |
|
|---|
| 72 |
return out; |
|---|
| 73 |
} |
|---|