SCNVector3 Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a 3D vector using three single-precision floating-point numbers.
[System.Serializable]
public struct SCNVector3 : IEquatable<SceneKit.SCNVector3>
[<System.Serializable>]
type SCNVector3 = struct
- Inheritance
-
SCNVector3
- Attributes
- Implements
Remarks
The Vector3 structure is suitable for interoperation with unmanaged code requiring three consecutive floats.
Constructors
| Name | Description |
|---|---|
| SCNVector3(NFloat, NFloat, NFloat) |
Constructs a new Vector3. |
| SCNVector3(SCNVector3) |
Constructs a new Vector3 from the given Vector3. |
| SCNVector3(SCNVector4) |
Constructs a new Vector3 from the given Vector4. |
| SCNVector3(Single, Single, Single) |
Constructs a new Vector3. |
| SCNVector3(Vector3) | |
Fields
| Name | Description |
|---|---|
| One |
Defines an instance with all components set to 1. |
| SizeInBytes |
Defines the size of the SCNVector3 struct in bytes. |
| UnitX |
Defines a unit-length SCNVector3 that points towards the X-axis. |
| UnitY |
Defines a unit-length SCNVector3 that points towards the Y-axis. |
| UnitZ |
Defines a unit-length SCNVector3 that points towards the Z-axis. |
| X |
The X component of the Vector3. |
| Y |
The Y component of the Vector3. |
| Z |
The Z component of the Vector3. |
| Zero |
Defines a zero-length SCNVector3. |
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. |
Methods
| Name | Description |
|---|---|
| Add(SCNVector3, SCNVector3, SCNVector3) |
Adds two vectors. |
| Add(SCNVector3, SCNVector3) |
Adds two vectors. |
| BaryCentric(SCNVector3, SCNVector3, SCNVector3, NFloat, NFloat, SCNVector3) |
Interpolate 3 Vectors using Barycentric coordinates |
| BaryCentric(SCNVector3, SCNVector3, SCNVector3, NFloat, NFloat) |
Interpolate 3 Vectors using Barycentric coordinates |
| BaryCentric(SCNVector3, SCNVector3, SCNVector3, Single, Single, SCNVector3) |
Interpolate 3 Vectors using Barycentric coordinates |
| BaryCentric(SCNVector3, SCNVector3, SCNVector3, Single, Single) |
Interpolate 3 Vectors using Barycentric coordinates |
| CalculateAngle(SCNVector3, SCNVector3, NFloat) |
Calculates the angle (in radians) between two vectors. |
| CalculateAngle(SCNVector3, SCNVector3, Single) |
Calculates the angle (in radians) between two vectors. |
| CalculateAngle(SCNVector3, SCNVector3) |
Calculates the angle (in radians) between two vectors. |
| Clamp(SCNVector3, SCNVector3, SCNVector3, SCNVector3) |
Clamp a vector to the given minimum and maximum vectors |
| Clamp(SCNVector3, SCNVector3, SCNVector3) |
Clamp a vector to the given minimum and maximum vectors |
| ComponentMax(SCNVector3, SCNVector3, SCNVector3) |
Calculate the component-wise maximum of two vectors |
| ComponentMax(SCNVector3, SCNVector3) |
Calculate the component-wise maximum of two vectors |
| ComponentMin(SCNVector3, SCNVector3, SCNVector3) |
Calculate the component-wise minimum of two vectors |
| ComponentMin(SCNVector3, SCNVector3) |
Calculate the component-wise minimum of two vectors |
| Cross(SCNVector3, SCNVector3, SCNVector3) |
Caclulate the cross (vector) product of two vectors |
| Cross(SCNVector3, SCNVector3) |
Caclulate the cross (vector) product of two vectors |
| Divide(SCNVector3, NFloat, SCNVector3) |
Divides a vector by a scalar. |
| Divide(SCNVector3, NFloat) |
Divides a vector by a scalar. |
| Divide(SCNVector3, SCNVector3, SCNVector3) |
Divide a vector by the components of a vector (scale). |
| Divide(SCNVector3, SCNVector3) |
Divides a vector by the components of a vector (scale). |
| Divide(SCNVector3, Single, SCNVector3) |
Divides a vector by a scalar. |
| Divide(SCNVector3, Single) |
Divides a vector by a scalar. |
| Dot(SCNVector3, SCNVector3, NFloat) |
Calculate the dot (scalar) product of two vectors |
| Dot(SCNVector3, SCNVector3, Single) |
Calculate the dot (scalar) product of two vectors |
| Dot(SCNVector3, SCNVector3) |
Calculate the dot (scalar) product of two vectors |
| Equals(Object) |
Indicates whether this instance and a specified object are equal. |
| Equals(SCNVector3) |
Indicates whether the current vector is equal to another vector. |
| GetHashCode() |
Returns the hashcode for this instance. |
| Lerp(SCNVector3, SCNVector3, NFloat, SCNVector3) |
Returns a new Vector that is the linear blend of the 2 given Vectors |
| Lerp(SCNVector3, SCNVector3, NFloat) |
Returns a new Vector that is the linear blend of the 2 given Vectors |
| Lerp(SCNVector3, SCNVector3, Single, SCNVector3) |
Returns a new Vector that is the linear blend of the 2 given Vectors |
| Lerp(SCNVector3, SCNVector3, Single) |
Returns a new Vector that is the linear blend of the 2 given Vectors |
| Max(SCNVector3, SCNVector3) |
Returns the SCNVector3 with the minimum magnitude |
| Min(SCNVector3, SCNVector3) |
Returns the SCNVector3 with the minimum magnitude |
| Multiply(SCNVector3, NFloat, SCNVector3) |
Multiplies a vector by a scalar. |
| Multiply(SCNVector3, NFloat) |
Multiplies a vector by a scalar. |
| Multiply(SCNVector3, SCNVector3, SCNVector3) |
Multiplies a vector by the components of a vector (scale). |
| Multiply(SCNVector3, SCNVector3) |
Multiplies a vector by the components a vector (scale). |
| Multiply(SCNVector3, Single, SCNVector3) |
Multiplies a vector by a scalar. |
| Multiply(SCNVector3, Single) |
Multiplies a vector by a scalar. |
| Normalize() |
Scales the SCNVector3 to unit length. |
| Normalize(SCNVector3, SCNVector3) |
Scale a vector to unit length |
| Normalize(SCNVector3) |
Scale a vector to unit length |
| NormalizeFast() |
Scales the SCNVector3 to approximately unit length. |
| NormalizeFast(SCNVector3, SCNVector3) |
Scale a vector to approximately unit length |
| NormalizeFast(SCNVector3) |
Scale a vector to approximately unit length |
| Subtract(SCNVector3, SCNVector3, SCNVector3) |
Subtract one Vector from another |
| Subtract(SCNVector3, SCNVector3) |
Subtract one Vector from another |
| ToString() |
Returns a System.String that represents the current SCNVector3. |
| Transform(SCNVector3, SCNMatrix4, SCNVector4) |
Transform a Vector by the given Matrix |
| Transform(SCNVector3, SCNMatrix4) |
Transform a Vector by the given Matrix |
| TransformNormal(SCNVector3, SCNMatrix4, SCNVector3) |
Transform a Normal by the given Matrix |
| TransformNormal(SCNVector3, SCNMatrix4) |
Transform a Normal by the given Matrix |
| TransformNormalInverse(SCNVector3, SCNMatrix4, SCNVector3) |
Transform a Normal by the (transpose of the) given Matrix |
| TransformNormalInverse(SCNVector3, SCNMatrix4) |
Transform a Normal by the (transpose of the) given Matrix |
| TransformPerspective(SCNVector3, SCNMatrix4, SCNVector3) |
Transform a SCNVector3 by the given Matrix, and project the resulting SCNVector4 back to a SCNVector3 |
| TransformPerspective(SCNVector3, SCNMatrix4) |
Transform a SCNVector3 by the given Matrix, and project the resulting Vector4 back to a SCNVector3 |
| TransformPosition(SCNVector3, SCNMatrix4, SCNVector3) |
Transform a Position by the given Matrix |
| TransformPosition(SCNVector3, SCNMatrix4) |
Transform a Position by the given Matrix |
| TransformVector(SCNVector3, SCNMatrix4, SCNVector3) |
Transform a direction vector by the given matrix. Assumes the matrix has a right-most column of (0,0,0,1), that is the translation part is ignored. |
| TransformVector(SCNVector3, SCNMatrix4) |
Transform a direction vector by the given Matrix Assumes the matrix has a right-most column of (0,0,0,1), that is the translation part is ignored. |
Operators
| Name | Description |
|---|---|
| Addition(SCNVector3, SCNVector3) |
Adds two instances. |
| Division(SCNVector3, NFloat) |
Divides an instance by a scalar. |
| Division(SCNVector3, Single) |
Divides an instance by a scalar. |
| Equality(SCNVector3, SCNVector3) |
Compares two instances for equality. |
| Explicit(SCNVector3 to Vector3) | |
| Implicit(Vector3 to SCNVector3) | |
| Inequality(SCNVector3, SCNVector3) |
Compares two instances for inequality. |
| Multiply(NFloat, SCNVector3) |
Multiplies an instance by a scalar. |
| Multiply(SCNVector3, NFloat) |
Multiplies an instance by a scalar. |
| Multiply(SCNVector3, Single) |
Multiplies an instance by a scalar. |
| Multiply(Single, SCNVector3) |
Multiplies an instance by a scalar. |
| Subtraction(SCNVector3, SCNVector3) |
Subtracts two instances. |
| UnaryNegation(SCNVector3) |
Negates an instance. |