Example #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 );
}
Example #2
0
File: Ray.cpp Project: Ilikia/naali
bool Ray::Intersects(const Sphere &sphere, float3 *intersectionPoint, float3 *intersectionNormal, float *d) const
{
    return sphere.Intersects(*this, intersectionPoint, intersectionNormal, d);
}
Example #3
0
bool Ray::Intersects(const Sphere &sphere) const
{
	return sphere.Intersects(*this, 0, 0, 0) > 0;
}
Example #4
0
bool AABB::Intersects(const Sphere& s) const { return s.Intersects(*this); }
Example #5
0
bool Line::Intersects(const Sphere &s, vec *intersectionPoint, vec *intersectionNormal, float *d) const
{
    return s.Intersects(*this, intersectionPoint, intersectionNormal, d) > 0;
}
Example #6
0
bool Segment::Intersects( const Sphere& s, CollisionInfo* const pInfo /*= NULL*/ ) const
{
	return s.Intersects( *this, pInfo );
}
Example #7
0
bool Plane::Intersects(const Sphere& s) const { return s.Intersects(*this); }