예제 #1
0
bool Ellipsoid::Intersects( const CollisionTriangle& t ) const
{
	const Vector InvExtents = 1.0f / m_Extents;
	const Triangle ESpaceTri( t.m_Triangle.m_Vec1 * InvExtents, t.m_Triangle.m_Vec2 * InvExtents, t.m_Triangle.m_Vec3 * InvExtents );
	const Sphere UnitSphere( m_Center * InvExtents, 1.0f );

	return UnitSphere.Intersects( ESpaceTri );
}
예제 #2
0
파일: Ray.cpp 프로젝트: Ilikia/naali
bool Ray::Intersects(const Sphere &sphere, float3 *intersectionPoint, float3 *intersectionNormal, float *d) const
{
    return sphere.Intersects(*this, intersectionPoint, intersectionNormal, d);
}
예제 #3
0
파일: Ray.cpp 프로젝트: ggf31416/CompGraf1
bool Ray::Intersects(const Sphere &sphere) const
{
	return sphere.Intersects(*this, 0, 0, 0) > 0;
}
예제 #4
0
파일: aabb.cpp 프로젝트: ptitSeb/Eldritch
bool AABB::Intersects(const Sphere& s) const { return s.Intersects(*this); }
예제 #5
0
파일: Line.cpp 프로젝트: jnmacd/MathGeoLib
bool Line::Intersects(const Sphere &s, vec *intersectionPoint, vec *intersectionNormal, float *d) const
{
    return s.Intersects(*this, intersectionPoint, intersectionNormal, d) > 0;
}
예제 #6
0
bool Segment::Intersects( const Sphere& s, CollisionInfo* const pInfo /*= NULL*/ ) const
{
	return s.Intersects( *this, pInfo );
}
예제 #7
0
파일: plane.cpp 프로젝트: ptitSeb/Eldritch
bool Plane::Intersects(const Sphere& s) const { return s.Intersects(*this); }