示例#1
0
文件: AABB.cpp 项目: katik/naali
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
文件: AABB.cpp 项目: katik/naali
void AABB::Enclose(const Triangle &triangle)
{
	Enclose(triangle.a);
	Enclose(triangle.b);
	Enclose(triangle.c);
}
示例#3
0
文件: AABB.cpp 项目: katik/naali
void AABB::Enclose(const AABB &aabb)
{
	Enclose(aabb.minPoint);
	Enclose(aabb.maxPoint);
}
示例#4
0
文件: AABB.cpp 项目: katik/naali
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
文件: AABB.cpp 项目: katik/naali
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);
}