Lines Matching refs:box
88 clip (const T &p, const Box<T> &box) in clip() argument
97 for (int i = 0; i < int (box.min.dimensions()); i++) in clip()
99 if (p[i] < box.min[i]) in clip()
100 q[i] = box.min[i]; in clip()
101 else if (p[i] > box.max[i]) in clip()
102 q[i] = box.max[i]; in clip()
113 closestPointInBox (const T &p, const Box<T> &box) in closestPointInBox() argument
115 return clip (p, box); in closestPointInBox()
121 closestPointOnBox (const Vec3<T> &p, const Box< Vec3<T> > &box) in closestPointOnBox() argument
130 if (box.isEmpty()) in closestPointOnBox()
133 Vec3<T> q = closestPointInBox (p, box); in closestPointOnBox()
137 Vec3<T> d1 = p - box.min; in closestPointOnBox()
138 Vec3<T> d2 = box.max - p; in closestPointOnBox()
146 q.x = (d1.x < d2.x)? box.min.x: box.max.x; in closestPointOnBox()
150 q.y = (d1.y < d2.y)? box.min.y: box.max.y; in closestPointOnBox()
154 q.z = (d1.z < d2.z)? box.min.z: box.max.z; in closestPointOnBox()
164 transform (const Box< Vec3<S> > &box, const Matrix44<T> &m) in transform() argument
180 if (box.isEmpty() || box.isInfinite()) in transform()
181 return box; in transform()
200 a = (S) m[j][i] * box.min[j]; in transform()
201 b = (S) m[j][i] * box.max[j]; in transform()
227 points[0][0] = points[1][0] = points[2][0] = points[3][0] = box.min[0]; in transform()
228 points[4][0] = points[5][0] = points[6][0] = points[7][0] = box.max[0]; in transform()
230 points[0][1] = points[1][1] = points[4][1] = points[5][1] = box.min[1]; in transform()
231 points[2][1] = points[3][1] = points[6][1] = points[7][1] = box.max[1]; in transform()
233 points[0][2] = points[2][2] = points[4][2] = points[6][2] = box.min[2]; in transform()
234 points[1][2] = points[3][2] = points[5][2] = points[7][2] = box.max[2]; in transform()
246 transform (const Box< Vec3<S> > &box, in transform() argument
264 if (box.isEmpty() || box.isInfinite()) in transform()
284 a = (S) m[j][i] * box.min[j]; in transform()
285 b = (S) m[j][i] * box.max[j]; in transform()
311 points[0][0] = points[1][0] = points[2][0] = points[3][0] = box.min[0]; in transform()
312 points[4][0] = points[5][0] = points[6][0] = points[7][0] = box.max[0]; in transform()
314 points[0][1] = points[1][1] = points[4][1] = points[5][1] = box.min[1]; in transform()
315 points[2][1] = points[3][1] = points[6][1] = points[7][1] = box.max[1]; in transform()
317 points[0][2] = points[2][2] = points[4][2] = points[6][2] = box.min[2]; in transform()
318 points[1][2] = points[3][2] = points[5][2] = points[7][2] = box.max[2]; in transform()
327 affineTransform (const Box< Vec3<S> > &box, const Matrix44<T> &m) in affineTransform() argument
338 if (box.isEmpty() || box.isInfinite()) in affineTransform()
344 return box; in affineTransform()
357 a = (S) m[j][i] * box.min[j]; in affineTransform()
358 b = (S) m[j][i] * box.max[j]; in affineTransform()
378 affineTransform (const Box< Vec3<S> > &box, in affineTransform() argument
391 if (box.isEmpty()) in affineTransform()
400 if (box.isInfinite()) in affineTransform()
417 a = (S) m[j][i] * box.min[j]; in affineTransform()
418 b = (S) m[j][i] * box.max[j]; in affineTransform()
1006 intersects (const Box< Vec3<T> > &box, const Line3<T> &ray) in intersects() argument
1009 return intersects (box, ray, ignored); in intersects()