Vector3 Structure

3 dimensional vector of doubles.

Definition

Namespace: Karamba.Geometry
Assembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
C#
[SerializableAttribute]
public struct Vector3 : IEquatable<Vector3>, 
	IComparable<Vector3>, ISerializable
Inheritance
Object    ValueType    Vector3
Implements
IComparableVector3, IEquatableVector3, ISerializable

Constructors

Vector3(Point3) Initializes a new instance of the Vector3 struct. Create vector from point.
Vector3(Vec3d) Initializes a new instance of the Vector3 struct. transform C++-vector into C#-vector.
Vector3(Vector3) Initializes a new instance of the Vector3 struct. Create vector from vector.
Vector3(SerializationInfo, StreamingContext) Initializes a new instance of the Vector3 struct.
Vector3(Double, Double, Double) Initializes a new instance of the Vector3 struct. Create vector.

Properties

IsNaN Gets a value indicating whether this vector is NaN vector.
IsZero Gets a value indicating whether this vector is the zero vector.
Item Gets or sets a vector component at the given index.
Length Gets the length of vector.
SquaredLength Gets the squared length of vector.
Unitized Gets the normalized vector.
UnitX Gets the x-unit vector (1, 0, 0).
UnitY Gets the y-unit vector (0, 1, 0).
UnitZ Gets the z-unit vector (0, 0, 1).
Unset Gets the unset Vector3.
X Gets or sets the X-coordinate.
XAxis Gets the value of the vector with components 1,0,0.
Y Gets or sets the Y-coordinate.
YAxis Gets the value of the vector with components 0,1,0.
Z Gets or sets the Z-coordinate.
ZAxis Gets the value of the vector with components 0,0,1.
Zero Gets the zero vector.

Methods

Add Add a vector to this one.
CompareTo compares this to other vector based on the distance to the origin.
Cross Get the cross product of two vectors.
CrossProduct(Vector3, Vector3) Compute cross product.
CrossProduct(Vector3, Vector3, Vector3) Compute cross product.
DivideBy Divides this by a factor.
Dot Compute dot product.
DotProduct Compute dot product.
Equals(Object) Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object))
Equals(Vector3) check whether another vector is equal to this vector.
Equals(Vector3, Double) check whether another vector is equal to this vector within a given tolerance.
GetHashCode Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetObjectData Serializes a Point3.
GetType Gets the Type of the current instance.
(Inherited from Object)
GlobalToLocal(Plane3) Transform vector from global to local coordinate system of given plane.
GlobalToLocal(Transform3) Transform vector.
GlobalToLocal(Vector3, Quaternion) Transforms a vector by the given Quaternion rotation value.
IsParallelTo Checks whether two vectors are parallel.
IsTiny Determines whether the vector is small.
LocalToGlobal Transform vector from local to global coordinate system.
MakePerpendicularTo Makes this vector perpendicular to the given vector. Result is not unitized.
meanSquaredLength Gets the mean squared length of vectors in a list.
Multiply(Vector3, Vector3) Form the dot-product of two vectors.
Multiply(Vector3, Double) multiply a vector by a scalar.
Normalize Returns a vector with the same direction as the given vector, but with a length of 1.
Reverse reverse the direction of a vector.
Rotate Rotates vector by an angle about a given axis.
ScaleVectors Scales the vectors in a list by a given factor and returns the new list.
ToArray Converts to an array of Double.
ToDeg Convert angle in radians to degree.
ToEnumerable Converts to an IEnumerableT of Double.
ToPoint3 Converts to Point3.
ToRad Convert angle in degree to radians.
ToString Returns the fully qualified type name of this instance.
(Overrides ValueTypeToString)
Unitize Normalizes a vector.
VectorAngle Compute the angle between two vectors.

This operation is commutative.

Operators

Addition(Vector3, Vector3) Adds two vectors.
Division(Vector3, Double) Divide vector by constant.
Equality(Vector3, Vector3) Compare vectors for equality.
ExclusiveOr(Vector3, Vector3) Compute vector cross product.
GreaterThan(Vector3, Vector3) Compare vectors.
GreaterThanOrEqual(Vector3, Vector3) Compare vectors.
Inequality(Vector3, Vector3) Compare vectors for inequality.
LessThan(Vector3, Vector3) Compare vectors.
LessThanOrEqual(Vector3, Vector3) Compare vectors.
Multiply(Double, Vector3) Multiply vector by constant.
Multiply(Vector3, Vector3) Multiply vectors (dot product).
Multiply(Vector3, Double) Multiply vector by constant.
Subtraction(Vector3, Vector3) Subtracts vector b from vector a.
UnaryNegation(Vector3) Negates a vector.

Extension Methods

ContainerType test if object is (a container like) a list or an array.
(Defined by MiniUtil)
Convert Converts to Rhino's Vector3d.
(Defined by ToRhino)
ConvertToFebVec3d Converts to Vec3d.
(Defined by ToFeb)
ConvertToFebVec3d Converts to Vec3d.
(Defined by ToFeb)

See Also