equal
deleted
inserted
replaced
51 Float t10 = -q.d*q.d; |
51 Float t10 = -q.d*q.d; |
52 Float x,y,z; |
52 Float x,y,z; |
53 x = 2*( (t8 + t10)*p.x + (t6 - t4)*p.y + (t3 + t7)*p.z ) + p.x; |
53 x = 2*( (t8 + t10)*p.x + (t6 - t4)*p.y + (t3 + t7)*p.z ) + p.x; |
54 y = 2*( (t4 + t6)*p.x + (t5 + t10)*p.y + (t9 - t2)*p.z ) + p.y; |
54 y = 2*( (t4 + t6)*p.x + (t5 + t10)*p.y + (t9 - t2)*p.z ) + p.y; |
55 z = 2*( (t7 - t3)*p.x + (t2 + t9)*p.y + (t5 + t8)*p.z ) + p.z; |
55 z = 2*( (t7 - t3)*p.x + (t2 + t9)*p.y + (t5 + t8)*p.z ) + p.z; |
56 p = Vector3(x,y,z); |
56 p = Vector(x,y,z); |
57 x = 2*( (t8 + t10)*u.x + (t6 - t4)*u.y + (t3 + t7)*u.z ) + u.x; |
57 x = 2*( (t8 + t10)*u.x + (t6 - t4)*u.y + (t3 + t7)*u.z ) + u.x; |
58 y = 2*( (t4 + t6)*u.x + (t5 + t10)*u.y + (t9 - t2)*u.z ) + u.y; |
58 y = 2*( (t4 + t6)*u.x + (t5 + t10)*u.y + (t9 - t2)*u.z ) + u.y; |
59 z = 2*( (t7 - t3)*u.x + (t2 + t9)*u.y + (t5 + t8)*u.z ) + u.z; |
59 z = 2*( (t7 - t3)*u.x + (t2 + t9)*u.y + (t5 + t8)*u.z ) + u.z; |
60 u = Vector3(x,y,z); |
60 u = Vector(x,y,z); |
61 x = 2*( (t8 + t10)*v.x + (t6 - t4)*v.y + (t3 + t7)*v.z ) + v.x; |
61 x = 2*( (t8 + t10)*v.x + (t6 - t4)*v.y + (t3 + t7)*v.z ) + v.x; |
62 y = 2*( (t4 + t6)*v.x + (t5 + t10)*v.y + (t9 - t2)*v.z ) + v.y; |
62 y = 2*( (t4 + t6)*v.x + (t5 + t10)*v.y + (t9 - t2)*v.z ) + v.y; |
63 z = 2*( (t7 - t3)*v.x + (t2 + t9)*v.y + (t5 + t8)*v.z ) + v.z; |
63 z = 2*( (t7 - t3)*v.x + (t2 + t9)*v.y + (t5 + t8)*v.z ) + v.z; |
64 v = Vector3(x,y,z); |
64 v = Vector(x,y,z); |
65 p.normalize(); |
65 p.normalize(); |
66 u.normalize(); |
66 u.normalize(); |
67 v.normalize(); |
67 v.normalize(); |
68 } |
68 } |
69 |
69 |
106 a = tnear; |
106 a = tnear; |
107 b = tfar; |
107 b = tfar; |
108 return true; |
108 return true; |
109 } |
109 } |
110 |
110 |
|
111 #ifndef NO_SSE |
111 // rewrite of BBox::intersect for ray packets |
112 // rewrite of BBox::intersect for ray packets |
112 __m128 BBox::intersect_packet(const RayPacket &rays, __m128 &a, __m128 &b) |
113 __m128 BBox::intersect_packet(const RayPacket &rays, __m128 &a, __m128 &b) |
113 { |
114 { |
114 register __m128 tnear = mZero; |
115 register __m128 tnear = mZero; |
115 register __m128 tfar = mInf; |
116 register __m128 tfar = mInf; |
147 |
148 |
148 a = tnear; |
149 a = tnear; |
149 b = tfar; |
150 b = tfar; |
150 return mask; |
151 return mask; |
151 } |
152 } |
|
153 #endif |