本文整理汇总了C++中FQuat::GetUpVector方法的典型用法代码示例。如果您正苦于以下问题:C++ FQuat::GetUpVector方法的具体用法?C++ FQuat::GetUpVector怎么用?C++ FQuat::GetUpVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FQuat
的用法示例。
在下文中一共展示了FQuat::GetUpVector方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalculateRange
float UAblTargetingBox::CalculateRange() const
{
FVector RotatedBox;
FQuat Rotation = FQuat(m_Location.GetRotation());
RotatedBox = Rotation.GetForwardVector() + m_HalfExtents.X;
RotatedBox += Rotation.GetRightVector() + m_HalfExtents.Y;
RotatedBox += Rotation.GetUpVector() + m_HalfExtents.Z;
if (m_CalculateAs2DRange)
{
return m_Location.GetOffset().Size2D() + RotatedBox.Size2D();
}
return m_Location.GetOffset().Size() + RotatedBox.Size();
}
示例2: GetAlignedBox
FVector UAblTargetingBox::GetAlignedBox(const UAblAbilityContext& Context, FTransform& OutQueryTransform) const
{
FVector AlignedBox;
m_Location.GetTransform(Context, OutQueryTransform);
const FQuat QueryRotation = OutQueryTransform.GetRotation();
// Somewhere down the pipeline, the Box rotation is ignored, so go ahead and take care of it here.
AlignedBox = QueryRotation.GetForwardVector() * m_HalfExtents.X;
AlignedBox += QueryRotation.GetRightVector() * m_HalfExtents.Y;
AlignedBox += QueryRotation.GetUpVector() * m_HalfExtents.Z;
// Move out by our Half Extents.
FVector HalfExtentsOffset = QueryRotation.GetForwardVector() * m_HalfExtents.X;
OutQueryTransform *= FTransform(HalfExtentsOffset);
return AlignedBox;
}