You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
855 B
28 lines
855 B
using UnityEngine;
|
|
|
|
namespace UnityEditor.VFX.Operator
|
|
{
|
|
[VFXHelpURL("Operator-Volume(AxisAlignedBox)")]
|
|
[VFXInfo(name = "Volume (Axis Aligned Box)", category = "Math/Geometry")]
|
|
class AABoxVolume : VFXOperator
|
|
{
|
|
public class InputProperties
|
|
{
|
|
[Tooltip("Sets the box used for the volume calculation.")]
|
|
public AABox box = new AABox();
|
|
}
|
|
|
|
public class OutputProperties
|
|
{
|
|
[Tooltip("Outputs the volume of the box.")]
|
|
public float volume;
|
|
}
|
|
|
|
override public string name { get { return "Volume (Axis Aligned Box)"; } }
|
|
|
|
protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
|
|
{
|
|
return new VFXExpression[] { VFXOperatorUtility.BoxVolume(inputExpression[1]) };
|
|
}
|
|
}
|
|
}
|