Files
adriadri6972 d3d9c5f833 upload project
2025-07-31 15:21:08 +02:00

50 lines
1.7 KiB
C#

using System.ComponentModel;
namespace UnityEngine.XR.ARSubsystems
{
/// <summary>
/// Represents the segmentation stencil mode.
/// </summary>
public enum HumanSegmentationStencilMode
{
/// <summary>
/// The segmentation stencil is disabled and will not be generated.
/// </summary>
Disabled = 0,
/// <summary>
/// The segmentation stencil is enabled and will be generated at the fastest resolution.
/// </summary>
/// <remarks>
/// On <see cref="Fastest"/> mode, there is no smoothing or other post-processing applied to the texture.
/// </remarks>
Fastest = 1,
/// <summary>
/// The segmentation stencil is enabled and will be generated at the medium resolution.
/// </summary>
Medium = 2,
/// <summary>
/// The segmentation stencil is enabled and will be generated at the best resolution.
/// </summary>
Best = 3,
}
/// <summary>
/// Extension for the <see cref="HumanSegmentationStencilMode"/>.
/// </summary>
public static class SegmentationStencilModeExtension
{
/// <summary>
/// Determine whether the segmentation stencil mode is enabled.
/// </summary>
/// <param name="segmentationStencilMode">The segmentation stencil mode to check.</param>
/// <returns>
/// <c>true</c> if the segmentation stencil mode is enabled. Otherwise, <c>false</c>.
/// </returns>
public static bool Enabled(this HumanSegmentationStencilMode segmentationStencilMode)
=> segmentationStencilMode != HumanSegmentationStencilMode.Disabled;
}
}