|
@@ -221,7 +221,7 @@ namespace SharpGLTF.Validation
|
|
|
#region data
|
|
#region data
|
|
|
|
|
|
|
|
[System.Diagnostics.DebuggerStepThrough]
|
|
[System.Diagnostics.DebuggerStepThrough]
|
|
|
- internal void _DataThrow(PARAMNAME pname, string msg) { throw new DataException(_Current, $"{pname}: {msg}"); }
|
|
|
|
|
|
|
+ private void _DataThrow(PARAMNAME pname, string msg) { throw new DataException(_Current, $"{pname}: {msg}"); }
|
|
|
|
|
|
|
|
public OUTTYPE IsInRange<T>(PARAMNAME pname, T value, T minInclusive, T maxInclusive)
|
|
public OUTTYPE IsInRange<T>(PARAMNAME pname, T value, T minInclusive, T maxInclusive)
|
|
|
where T : IComparable<T>
|
|
where T : IComparable<T>
|
|
@@ -231,26 +231,6 @@ namespace SharpGLTF.Validation
|
|
|
return this;
|
|
return this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public OUTTYPE IsInRange(PARAMNAME pname, double? value, double minInclusive, double maxInclusive)
|
|
|
|
|
- {
|
|
|
|
|
- if (!value.HasValue) return this;
|
|
|
|
|
- if (value.Value < minInclusive) _DataThrow(pname, $"is below minimum {minInclusive} value: {value}");
|
|
|
|
|
- if (value.Value > maxInclusive) _DataThrow(pname, $"is above maximum {maxInclusive} value: {value}");
|
|
|
|
|
- return this;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public OUTTYPE IsNullOrPosition(PARAMNAME pname, System.Numerics.Vector3? position)
|
|
|
|
|
- {
|
|
|
|
|
- if (!position.HasValue) return this;
|
|
|
|
|
- return IsPosition(pname, position.Value);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public OUTTYPE IsNullOrRotation(PARAMNAME pname, System.Numerics.Quaternion? rotation)
|
|
|
|
|
- {
|
|
|
|
|
- if (!rotation.HasValue) return this;
|
|
|
|
|
- return IsRotation(pname, rotation.Value);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public OUTTYPE IsNullOrMatrix(PARAMNAME pname, System.Numerics.Matrix4x4? matrix)
|
|
public OUTTYPE IsNullOrMatrix(PARAMNAME pname, System.Numerics.Matrix4x4? matrix)
|
|
|
{
|
|
{
|
|
|
if (!matrix.HasValue) return this;
|
|
if (!matrix.HasValue) return this;
|
|
@@ -275,12 +255,6 @@ namespace SharpGLTF.Validation
|
|
|
return this;
|
|
return this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public OUTTYPE IsNormal(PARAMNAME pname, in System.Numerics.Vector4 tangent)
|
|
|
|
|
- {
|
|
|
|
|
- if (!tangent.IsValidTangent()) _DataThrow(pname, "Invalid Tangent");
|
|
|
|
|
- return this;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public OUTTYPE IsMatrix(PARAMNAME pname, in System.Numerics.Matrix4x4 matrix)
|
|
public OUTTYPE IsMatrix(PARAMNAME pname, in System.Numerics.Matrix4x4 matrix)
|
|
|
{
|
|
{
|
|
|
if (!matrix.IsValid()) _DataThrow(pname, "Invalid Matrix");
|
|
if (!matrix.IsValid()) _DataThrow(pname, "Invalid Matrix");
|