本文整理汇总了C++中UStaticMeshComponent::SetRelativeScale3D方法的典型用法代码示例。如果您正苦于以下问题:C++ UStaticMeshComponent::SetRelativeScale3D方法的具体用法?C++ UStaticMeshComponent::SetRelativeScale3D怎么用?C++ UStaticMeshComponent::SetRelativeScale3D使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UStaticMeshComponent
的用法示例。
在下文中一共展示了UStaticMeshComponent::SetRelativeScale3D方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateGizmoHandleGroup
//.........这里部分代码省略.........
{
Rotator.Yaw = -90.0f;
Rotator.Pitch = 0.0f;
}
// Back top left
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Negative && HandlePlacement.Axes[1] == ETransformGizmoHandleDirection::Negative && HandlePlacement.Axes[2] == ETransformGizmoHandleDirection::Positive)
{
Rotator.Yaw = 0.0f;
Rotator.Pitch = -90.0f;
}
// Back top right
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Negative && HandlePlacement.Axes[1] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[2] == ETransformGizmoHandleDirection::Positive)
{
Rotator.Yaw = -90.0f;
Rotator.Pitch = -90.0f;
}
// Front bottom left
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[1] == ETransformGizmoHandleDirection::Negative && HandlePlacement.Axes[2] == ETransformGizmoHandleDirection::Negative)
{
Rotator.Yaw = 0.0f;
Rotator.Pitch = 90.0f;
}
// Front bottom right
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[1] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[2] == ETransformGizmoHandleDirection::Negative)
{
Rotator.Yaw = 90.0f;
Rotator.Pitch = 90.0f;
}
// Front top left
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[1] == ETransformGizmoHandleDirection::Negative && HandlePlacement.Axes[2] == ETransformGizmoHandleDirection::Positive)
{
Rotator.Yaw = 0.0f;
Rotator.Pitch = -180.0f;
}
// Front top right
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[1] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[2] == ETransformGizmoHandleDirection::Positive)
{
Rotator.Yaw = 180.0f;
Rotator.Pitch = -90.0f;
}
// Back left/right edge
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Negative && HandlePlacement.Axes[1] != ETransformGizmoHandleDirection::Center)
{
Rotator.Yaw = 0.0f;
Rotator.Pitch = 90.0f;
}
// Back bottom/top edge
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Negative && HandlePlacement.Axes[2] != ETransformGizmoHandleDirection::Center)
{
Rotator.Yaw = 90.0f;
Rotator.Pitch = 0.0f;
}
// Front left/right edge
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[1] != ETransformGizmoHandleDirection::Center)
{
Rotator.Yaw = 0.0f;
Rotator.Pitch = 90.0f;
}
// Front bottom/top edge
else if (HandlePlacement.Axes[0] == ETransformGizmoHandleDirection::Positive && HandlePlacement.Axes[2] != ETransformGizmoHandleDirection::Center)
{
Rotator.Yaw = 90.0f;
Rotator.Pitch = 0.0f;
}
else
{
// Facing out from center of a face
if (CenterHandleCount == 2)
{
const FQuat GizmoSpaceOrientation = GetAxisVector( FacingAxisIndex, HandlePlacement.Axes[FacingAxisIndex] ).ToOrientationQuat();
Rotator = GizmoSpaceOrientation.Rotator();
}
else
{
// One of the left/right bottom or top edges
}
}
}
StretchingHandle->SetRelativeRotation( Rotator );
StretchingHandle->SetRelativeScale3D( FVector( GizmoHandleScale ) );
// Update material
UpdateHandleColor( FacingAxisIndex, Handle, DraggingHandle, HoveringOverHandles );
}
}
}