本文整理汇总了C++中Triangle::Intersects方法的典型用法代码示例。如果您正苦于以下问题:C++ Triangle::Intersects方法的具体用法?C++ Triangle::Intersects怎么用?C++ Triangle::Intersects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Triangle
的用法示例。
在下文中一共展示了Triangle::Intersects方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Intersects
bool Sector::Intersects(const Triangle& triangle) const {
Line il(this->GetPosition(), this->GetStartPoint().GetPosition());
Line tl(this->GetPosition(), this->GetEndPoint().GetPosition());
Circle s(this->GetPosition(), this->GetRadius(), this->GetColor(), this->IsFilled());
bool circle_intersect = triangle.Intersects(s);
if(circle_intersect == false) return false;
bool il_intersect = triangle.Intersects(il);
if(il_intersect) return true;
bool tl_intersect = triangle.Intersects(tl);
if(tl_intersect) return true;
bool c_intersect = triangle.Intersects(Point(this->GetPosition()));
if(c_intersect) return true;
return false;
}
示例2: Intersects
bool Sphere::Intersects(const Triangle &triangle, vec *closestPointOnTriangle) const
{
return triangle.Intersects(*this, closestPointOnTriangle);
}
示例3: Intersects
bool AABB::Intersects(const Triangle &triangle) const
{
return triangle.Intersects(*this);
}
示例4: Intersects
bool OBB::Intersects(const Triangle &triangle) const
{
AABB aabb(float3(0,0,0), float3(Size()));
Triangle t = WorldToLocal() * triangle;
return t.Intersects(aabb);
}
示例5: Intersects
bool OBB::Intersects(const Triangle &triangle) const
{
AABB aabb(POINT_VEC_SCALAR(0.f), Size());
Triangle t = WorldToLocal() * triangle;
return t.Intersects(aabb);
}
示例6: Intersects
bool Ray::Intersects(const Triangle &triangle, float *d, float3 *intersectionPoint) const
{
return triangle.Intersects(*this, d, intersectionPoint);
}
示例7: Intersects
bool Line::Intersects(const Triangle &triangle, float *d, vec *intersectionPoint) const
{
return triangle.Intersects(*this, d, intersectionPoint);
}