Ejemplo n.º 1
0
Archivo: AABB.cpp Proyecto: 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));
}
Ejemplo n.º 2
0
Archivo: AABB.cpp Proyecto: katik/naali
void AABB::Enclose(const Triangle &triangle)
{
	Enclose(triangle.a);
	Enclose(triangle.b);
	Enclose(triangle.c);
}
Ejemplo n.º 3
0
Archivo: AABB.cpp Proyecto: katik/naali
void AABB::Enclose(const AABB &aabb)
{
	Enclose(aabb.minPoint);
	Enclose(aabb.maxPoint);
}
Ejemplo n.º 4
0
Archivo: AABB.cpp Proyecto: katik/naali
void AABB::Enclose(const OBB &obb)
{
	for(int i = 0; i < 8; ++i)
		Enclose(obb.CornerPoint(i));
}
Ejemplo n.º 5
0
void AABB::Enclose(const Polyhedron &polyhedron)
{
	for(int i = 0; i < polyhedron.NumVertices(); ++i)
		Enclose(polyhedron.Vertex(i));
}
Ejemplo n.º 6
0
Archivo: AABB.cpp Proyecto: katik/naali
void AABB::Enclose(const LineSegment &lineSegment)
{
	Enclose(lineSegment.a);
	Enclose(lineSegment.b);
}
Ejemplo n.º 7
0
void AABB::Enclose(const Frustum &frustum)
{
	for(int i = 0; i < 8; ++i)
		Enclose(frustum.CornerPoint(i));
}
Ejemplo n.º 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);
}
Ejemplo n.º 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));
}
Ejemplo n.º 10
0
void Sphere::Enclose(const Polyhedron &polyhedron)
{
	Enclose(polyhedron.VertexArrayPtr(), polyhedron.NumVertices());
}
Ejemplo n.º 11
0
void AABB::Enclose(const Sphere &sphere)
{
	vec d = POINT_VEC_SCALAR(sphere.r);
	Enclose(sphere.pos - d);
	Enclose(sphere.pos + d);
}