Share via


SCNVector4 Struct

Definition

Represents a 4D vector using four single-precision floating-point numbers.

[System.Serializable]
public struct SCNVector4 : IEquatable<SceneKit.SCNVector4>
[<System.Serializable>]
type SCNVector4 = struct
Inheritance
SCNVector4
Attributes
Implements

Remarks

The Vector4 structure is suitable for interoperation with unmanaged code requiring four consecutive floats.

Constructors

Name Description
SCNVector4(NFloat, NFloat, NFloat, NFloat)

Constructs a new SCNVector4.

SCNVector4(SCNVector3, NFloat)

Constructs a new SCNVector4 from the specified Vector3 and W component.

SCNVector4(SCNVector3, Single)

Constructs a new SCNVector4 from the specified Vector3 and W component.

SCNVector4(SCNVector3)

Constructs a new SCNVector4 from the given Vector3.

SCNVector4(SCNVector4)

Constructs a new SCNVector4 from the given SCNVector4.

SCNVector4(Single, Single, Single, Single)

Constructs a new SCNVector4.

SCNVector4(Vector2)

Constructs a new SCNVector4 from the given Vector2.

SCNVector4(Vector3)
SCNVector4(Vector4)

Fields

Name Description
One

Defines an instance with all components set to 1.

SizeInBytes

Defines the size of the SCNVector4 struct in bytes.

UnitW

Defines a unit-length SCNVector4 that points towards the W-axis.

UnitX

Defines a unit-length SCNVector4 that points towards the X-axis.

UnitY

Defines a unit-length SCNVector4 that points towards the Y-axis.

UnitZ

Defines a unit-length SCNVector4 that points towards the Z-axis.

W

The W component of the SCNVector4.

X

The X component of the SCNVector4.

Y

The Y component of the SCNVector4.

Z

The Z component of the SCNVector4.

Zero

Defines a zero-length SCNVector4.

Properties

Name Description
Length

Gets the length (magnitude) of the vector.

LengthFast

Gets an approximation of the vector length (magnitude).

LengthSquared

Gets the square of the vector length (magnitude).

Xy

Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.

Xyz

Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.

Methods

Name Description
Add(SCNVector4, SCNVector4, SCNVector4)

Adds two vectors.

Add(SCNVector4, SCNVector4)

Adds two vectors.

BaryCentric(SCNVector4, SCNVector4, SCNVector4, NFloat, NFloat, SCNVector4)

Interpolate 3 Vectors using Barycentric coordinates

BaryCentric(SCNVector4, SCNVector4, SCNVector4, NFloat, NFloat)

Interpolate 3 Vectors using Barycentric coordinates

BaryCentric(SCNVector4, SCNVector4, SCNVector4, Single, Single, SCNVector4)

Interpolate 3 Vectors using Barycentric coordinates

BaryCentric(SCNVector4, SCNVector4, SCNVector4, Single, Single)

Interpolate 3 Vectors using Barycentric coordinates

Clamp(SCNVector4, SCNVector4, SCNVector4, SCNVector4)

Clamp a vector to the given minimum and maximum vectors

Clamp(SCNVector4, SCNVector4, SCNVector4)

Clamp a vector to the given minimum and maximum vectors

Div(SCNVector4, NFloat, SCNVector4)

Divide a vector by a scalar

Div(SCNVector4, NFloat)

Divide a vector by a scalar

Div(SCNVector4, Single, SCNVector4)

Divide a vector by a scalar

Div(SCNVector4, Single)

Divide a vector by a scalar

Divide(SCNVector4, NFloat, SCNVector4)

Divides a vector by a scalar.

Divide(SCNVector4, NFloat)

Divides a vector by a scalar.

Divide(SCNVector4, SCNVector4, SCNVector4)

Divide a vector by the components of a vector (scale).

Divide(SCNVector4, SCNVector4)

Divides a vector by the components of a vector (scale).

Divide(SCNVector4, Single, SCNVector4)

Divides a vector by a scalar.

Divide(SCNVector4, Single)

Divides a vector by a scalar.

Dot(SCNVector4, SCNVector4, NFloat)

Calculate the dot product of two vectors

Dot(SCNVector4, SCNVector4, Single)

Calculate the dot product of two vectors

Dot(SCNVector4, SCNVector4)

Calculate the dot product of two vectors

Equals(Object)

Indicates whether this instance and a specified object are equal.

Equals(SCNVector4)

Indicates whether the current vector is equal to another vector.

GetHashCode()

Returns the hashcode for this instance.

Lerp(SCNVector4, SCNVector4, NFloat, SCNVector4)

Returns a new Vector that is the linear blend of the 2 given Vectors

Lerp(SCNVector4, SCNVector4, NFloat)

Returns a new Vector that is the linear blend of the 2 given Vectors

Lerp(SCNVector4, SCNVector4, Single, SCNVector4)

Returns a new Vector that is the linear blend of the 2 given Vectors

Lerp(SCNVector4, SCNVector4, Single)

Returns a new Vector that is the linear blend of the 2 given Vectors

Max(SCNVector4, SCNVector4, SCNVector4)

Calculate the component-wise maximum of two vectors

Max(SCNVector4, SCNVector4)

Calculate the component-wise maximum of two vectors

Min(SCNVector4, SCNVector4, SCNVector4)

Calculate the component-wise minimum of two vectors

Min(SCNVector4, SCNVector4)

Calculate the component-wise minimum of two vectors

Mult(SCNVector4, NFloat, SCNVector4)

Multiply a vector and a scalar

Mult(SCNVector4, NFloat)

Multiply a vector and a scalar

Mult(SCNVector4, Single, SCNVector4)

Multiply a vector and a scalar

Mult(SCNVector4, Single)

Multiply a vector and a scalar

Multiply(SCNVector4, NFloat, SCNVector4)

Multiplies a vector by a scalar.

Multiply(SCNVector4, NFloat)

Multiplies a vector by a scalar.

Multiply(SCNVector4, SCNVector4, SCNVector4)

Multiplies a vector by the components of a vector (scale).

Multiply(SCNVector4, SCNVector4)

Multiplies a vector by the components a vector (scale).

Multiply(SCNVector4, Single, SCNVector4)

Multiplies a vector by a scalar.

Multiply(SCNVector4, Single)

Multiplies a vector by a scalar.

Normalize()

Scales the SCNVector4 to unit length.

Normalize(SCNVector4, SCNVector4)

Scale a vector to unit length

Normalize(SCNVector4)

Scale a vector to unit length

NormalizeFast()

Scales the SCNVector4 to approximately unit length.

NormalizeFast(SCNVector4, SCNVector4)

Scale a vector to approximately unit length

NormalizeFast(SCNVector4)

Scale a vector to approximately unit length

Sub(SCNVector4, SCNVector4, SCNVector4)

Subtract one Vector from another

Sub(SCNVector4, SCNVector4)

Subtract one Vector from another

Subtract(SCNVector4, SCNVector4, SCNVector4)

Subtract one Vector from another

Subtract(SCNVector4, SCNVector4)

Subtract one Vector from another

ToString()

Returns a System.String that represents the current SCNVector4.

Transform(SCNVector4, SCNMatrix4, SCNVector4)

Transform a Vector by the given Matrix.

Transform(SCNVector4, SCNMatrix4)

Transform a Vector by the given Matrix

Operators

Name Description
Addition(SCNVector4, SCNVector4)

Adds two instances.

Division(SCNVector4, NFloat)

Divides an instance by a scalar.

Division(SCNVector4, Single)

Divides an instance by a scalar.

Equality(SCNVector4, SCNVector4)

Compares two instances for equality.

Explicit(SCNVector4 to IntPtr)

Returns a pointer to the first element of the specified instance.

Explicit(SCNVector4 to NFloat*)

Returns a pointer to the first element of the specified instance.

Explicit(SCNVector4 to Single*)

Returns a pointer to the first element of the specified instance.

Explicit(SCNVector4 to Vector4)
Implicit(Vector4 to SCNVector4)
Inequality(SCNVector4, SCNVector4)

Compares two instances for inequality.

Multiply(NFloat, SCNVector4)

Multiplies an instance by a scalar.

Multiply(SCNVector4, NFloat)

Multiplies an instance by a scalar.

Multiply(SCNVector4, Single)

Multiplies an instance by a scalar.

Multiply(Single, SCNVector4)

Multiplies an instance by a scalar.

Subtraction(SCNVector4, SCNVector4)

Subtracts two instances.

UnaryNegation(SCNVector4)

Negates an instance.

Applies to