OSDN Git Service

Added Assets for main menu
[mindgames/Mindgames_main.git] / Mindgames / Library / PackageCache / com.unity.visualeffectgraph@6.9.0-preview / Editor / Models / Operators / Implementations / CrossProduct.cs
1 using System;
2 using System.Linq;
3 using UnityEngine;
4
5 namespace UnityEditor.VFX.Operator
6 {
7     [VFXInfo(category = "Math/Vector")]
8     class CrossProduct : VFXOperatorNumericUniform
9     {
10         public class InputProperties
11         {
12             [Tooltip("The first operand.")]
13             public Vector3 a = Vector3.right;
14             [Tooltip("The second operand.")]
15             public Vector3 b = Vector3.up;
16         }
17
18         protected override sealed string operatorName { get { return "Cross Product"; } }
19
20         protected override sealed ValidTypeRule typeFilter
21         {
22             get
23             {
24                 return ValidTypeRule.allowVector3Type | ValidTypeRule.allowSpaceable;
25             }
26         }
27
28         protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
29         {
30             return new[] { VFXOperatorUtility.Cross(inputExpression[0], inputExpression[1]) };
31         }
32     }
33 }