Пример #1
0
void AABB::Enclose(const Sphere &sphere)
{
	Enclose(sphere.pos - float3(sphere.r,sphere.r,sphere.r));
	Enclose(sphere.pos + float3(sphere.r,sphere.r,sphere.r));
}
Пример #2
0
void AABB::Enclose(const Triangle &triangle)
{
	Enclose(triangle.a);
	Enclose(triangle.b);
	Enclose(triangle.c);
}
Пример #3
0
void AABB::Enclose(const AABB &aabb)
{
	Enclose(aabb.minPoint);
	Enclose(aabb.maxPoint);
}
Пример #4
0
void AABB::Enclose(const OBB &obb)
{
	for(int i = 0; i < 8; ++i)
		Enclose(obb.CornerPoint(i));
}
Пример #5
0
void AABB::Enclose(const Polyhedron &polyhedron)
{
	for(int i = 0; i < polyhedron.NumVertices(); ++i)
		Enclose(polyhedron.Vertex(i));
}
Пример #6
0
void AABB::Enclose(const LineSegment &lineSegment)
{
	Enclose(lineSegment.a);
	Enclose(lineSegment.b);
}
Пример #7
0
void AABB::Enclose(const Frustum &frustum)
{
	for(int i = 0; i < 8; ++i)
		Enclose(frustum.CornerPoint(i));
}
Пример #8
0
void Sphere::Enclose(const LineSegment &lineSegment)
{
	///@todo This might not be very optimal at all. Perhaps better to enclose the farthest point first.
	Enclose(lineSegment.a);
	Enclose(lineSegment.b);
}
Пример #9
0
void Sphere::Enclose(const OBB &obb)
{
	///@todo This might not be very optimal at all. Perhaps better to enclose the farthest point first.
	for(int i = 0; i < 8; ++i)
		Enclose(obb.CornerPoint(i));
}
Пример #10
0
void Sphere::Enclose(const Polyhedron &polyhedron)
{
	Enclose(polyhedron.VertexArrayPtr(), polyhedron.NumVertices());
}
Пример #11
0
void AABB::Enclose(const Sphere &sphere)
{
	vec d = POINT_VEC_SCALAR(sphere.r);
	Enclose(sphere.pos - d);
	Enclose(sphere.pos + d);
}