Click or drag to resize
Vector3f Structure
Represents the three components of a vector in three-dimensional space, using Single-precision floating point numbers.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
[SerializableAttribute]
public struct Vector3f : IEquatable<Vector3f>, 
	IComparable<Vector3f>, IComparable, IEpsilonFComparable<Vector3f>

The Vector3f type exposes the following members.

Constructors
  NameDescription
Public methodVector3f
Constructs a new vector from 3 single precision numbers.
Top
Properties
  NameDescription
Public propertyLength
Computes the length (or magnitude, or size) of this vector. This is an application of Pythagoras' theorem. If this vector is invalid, its length is considered 0.
Public propertyStatic memberUnset
Gets the value of the vector with each component set to RhinoMath.UnsetValue.
Public propertyX
Gets or sets the X (first) component of this vector.
Public propertyStatic memberXAxis
Gets the value of the vector with components 1,0,0.
Public propertyY
Gets or sets the Y (second) component of this vector.
Public propertyStatic memberYAxis
Gets the value of the vector with components 0,1,0.
Public propertyZ
Gets or sets the Z (third) component of this vector.
Public propertyStatic memberZAxis
Gets the value of the vector with components 0,0,1.
Public propertyStatic memberZero
Gets the value of the vector with components 0,0,0.
Top
Methods
  NameDescription
Public methodStatic memberAdd
Sums up a point and a vector, and returns a new point.

(Provided for languages that do not support operator overloading. You can use the + operator otherwise)

Public methodCompareTo
Compares this Vector3f with another Vector3f.

Component evaluation priority is first X, then Y, then Z.

Public methodStatic memberCrossProduct
Computes the cross product (or vector product, or exterior product) of two vectors.

This operation is not commutative.

Public methodEpsilonEquals
Check that all values in other are withing epsilon of the values in this
Public methodEquals(Object)
Determines whether the specified System.Object is a Vector3f and has the same values as the present vector.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector3f)
Determines whether the specified vector has the same values as the present vector.
Public methodGetHashCode
Computes a hash number that represents the current vector.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberMultiply(Single, Vector3f)
Multiplies a vector by a number, having the effect of scaling it.

(Provided for languages that do not support operator overloading. You can use the * operator otherwise)

Public methodStatic memberMultiply(Vector3f, Vector3f)
Multiplies two vectors together, returning the dot product (or inner product). This differs from the cross product.

(Provided for languages that do not support operator overloading. You can use the * operator otherwise)

Public methodStatic memberMultiply(Vector3f, Single)
Multiplies a vector by a number, having the effect of scaling it.

(Provided for languages that do not support operator overloading. You can use the * operator otherwise)

Public methodPerpendicularTo
Sets this vector to be perpendicular to another vector. Result is not unitized.
Public methodReverse
Reverses (inverts) this vector in place.

If this vector contains RhinoMath.UnsetValue, the reverse will also be invalid and false will be returned.

Public methodRotate
Rotates this vector around a given axis.
Public methodToString
Constructs the string representation of the current vector.
(Overrides ValueTypeToString.)
Public methodTransform
Transforms the vector in place.

The transformation matrix acts on the left of the vector; i.e.,

result = transformation*vector

Public methodUnitize
Unitizes the vector in place. A unit vector has length 1 unit.

An invalid or zero length vector cannot be unitized.

Top
Operators
  NameDescription
Public operatorStatic memberAddition
Sums up a point and a vector, and returns a new point.
Public operatorStatic memberEquality
Determines whether two vectors have equal values.
Public operatorStatic memberGreaterThan
Determines whether the first specified vector comes after (has superior sorting value than) the second vector.

Components evaluation priority is first X, then Y, then Z.

Public operatorStatic memberGreaterThanOrEqual
Determines whether the first specified vector comes after (has superior sorting value than) the second vector, or it is equal to it.

Components evaluation priority is first X, then Y, then Z.

Public operatorStatic memberInequality
Determines whether two vectors have different values.
Public operatorStatic memberLessThan
Determines whether the first specified vector comes before (has inferior sorting value than) the second vector.

Components evaluation priority is first X, then Y, then Z.

Public operatorStatic memberLessThanOrEqual
Determines whether the first specified vector comes before (has inferior sorting value than) the second vector, or it is equal to it.

Components evaluation priority is first X, then Y, then Z.

Public operatorStatic memberMultiply(Single, Vector3f)
Multiplies a vector by a number, having the effect of scaling it.
Public operatorStatic memberMultiply(Vector3f, Vector3f)
Multiplies two vectors together, returning the dot product (or inner product). This differs from the cross product.
Public operatorStatic memberMultiply(Vector3f, Single)
Multiplies a vector by a number, having the effect of scaling it.
Top
See Also