本文整理汇总了C++中float3::getY方法的典型用法代码示例。如果您正苦于以下问题:C++ float3::getY方法的具体用法?C++ float3::getY怎么用?C++ float3::getY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类float3
的用法示例。
在下文中一共展示了float3::getY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: intersectAABB
bool Frustum::intersectAABB( const float3 & pos, const float3 & e,
uint & outClipMask, uint inClipMask )
{
const Plane * plane = frust;
uint p = 0;
uint mk = 1;
outClipMask = 0; // init outclip mask
// loop while there are active planes..
while ( (mk <= inClipMask) && (p < 6) )
{
// if clip plane is active...
if ( inClipMask & mk )
{
const float3 & n = plane[p].normal();
float NP = e.getX() * fabs( n.getX() )
+ e.getY() * fabs( n.getY() )
+ e.getZ() * fabs( n.getZ() );
float MP = plane[p].distance(pos); //m.X*p->X+m.y*p->y+m.z*p->z+p->w;
if ( (MP + NP) < 0.0f )
{
return false; // behind clip plane
}
if ( (MP - NP) < 0.0f )
{
outClipMask |= mk;
}
}
mk += mk;
p++; // next plane
}
return true; // AABB intersects frustum
}