< Summary

Information
Class: Lattice.Generators.GenerateSwizzleAttribute
Assembly: Lattice
File(s): /home/runner/work/Sideline/Sideline/godot/scripts/lattice/Tools/SwizzleGenerator/GenerateSwizzleAttribute.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 28
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_MaxDimension()100%210%
get_IncludeZero()100%210%
.ctor()100%210%

File(s)

/home/runner/work/Sideline/Sideline/godot/scripts/lattice/Tools/SwizzleGenerator/GenerateSwizzleAttribute.cs

#LineLine coverage
 1// Copyright (c) 2026 Sideline Authors. All rights reserved.
 2// Licensed under GPL-3.0.
 3
 4// 这个文件会被嵌入到使用 Source Generator 的程序集中
 5
 6namespace Lattice.Generators
 7{
 8    /// <summary>
 9    /// 标记一个向量类型需要自动生成 Swizzle 属性
 10    /// </summary>
 11    [System.AttributeUsage(System.AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
 12    public sealed class GenerateSwizzleAttribute : System.Attribute
 13    {
 14        /// <summary>
 15        /// 最大 Swizzle 维度(2 或 3)
 16        /// </summary>
 017        public int MaxDimension { get; set; } = 3;
 18
 19        /// <summary>
 20        /// 是否包含 O(Zero)分量,如 XYO
 21        /// </summary>
 022        public bool IncludeZero { get; set; } = true;
 23
 024        public GenerateSwizzleAttribute()
 25        {
 026        }
 27    }
 28}