• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Paramdigma.Core
    • Convert
    • Intersect3D
    • Intersect3D.LineLineIntersectionResult
    • Intersect3D.LineLineIntersectionStatus
    • Intersect3D.LinePlaneIntersectionStatus
    • Intersect3D.RayFacePerimeterIntersectionStatus
    • Settings
  • Paramdigma.Core.Collections
    • Interval
    • Matrix<T>
  • Paramdigma.Core.Curves
    • Geodesics
    • LevelSets
  • Paramdigma.Core.Exceptions
    • UnsetGeometryException
  • Paramdigma.Core.Extensions
    • Lists
  • Paramdigma.Core.Geometry
    • BaseCurve
    • BasePoint
    • Box
    • Circle
    • Cylinder
    • Delaunay
    • InvalidCurveException
    • Line
    • Line2d
    • Mesh
    • MeshCorner
    • MeshEdge
    • MeshFace
    • MeshGeometry
    • MeshHalfEdge
    • MeshPoint
    • MeshTopology
    • MeshVertex
    • NurbsCurve
    • NurbsSurface
    • Plane
    • Point2d
    • Point3d
    • Point4d
    • Polyline
    • Polyline2d
    • Ray
    • Ray2d
    • Rectangle2d
    • Sphere
    • Torus
    • Vector2d
    • Vector3d
    • VectorNd
  • Paramdigma.Core.Geometry.Interfaces
    • ICurve
    • ISurface
    • IVector
  • Paramdigma.Core.IO
    • CsvReader
    • CsvWritter
    • OBJMeshData
    • ObjReader
    • ObjWritter
    • OffMeshData
    • OffReader
    • OffResult
    • OffWriter
  • Paramdigma.Core.LinearAlgebra
    • Complex
    • LeastSquaresLinearFit
    • Triplet
    • TripletData
  • Paramdigma.Core.Optimization
    • GradientDescent
    • GradientDescent.FitnessFunction
    • GradientDescentOptions
    • GradientDescentResult
    • KMeansCluster
    • KMeansClustering
    • KMeansClustering.IterationCompletedEventArgs
  • Paramdigma.Core.Spatial
    • DelaunayEdge
    • DelaunayPoint
    • DelaunayTriangle
    • Octree
    • PointCloud
    • PointCloudMember
    • QuadTree

Class Vector3d

Represents a 3D Vector entity.

Inheritance
System.Object
BasePoint
Vector3d
Inherited Members
BasePoint.X
BasePoint.Y
BasePoint.Z
BasePoint.IsUnset
BasePoint.Add(BasePoint)
BasePoint.Substract(BasePoint)
BasePoint.Multiply(Double)
BasePoint.Divide(Double)
BasePoint.Negate()
BasePoint.ToArray()
BasePoint.Equals(Object)
BasePoint.GetHashCode()
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Vector3d : BasePoint

Constructors

| Improve this Doc View Source

Vector3d()

Initializes a new instance of the Vector3d class.

Declaration
public Vector3d()
| Improve this Doc View Source

Vector3d(Point3d)

Initializes a new instance of the Vector3d class from a v.

Declaration
public Vector3d(Point3d point)
Parameters
Type Name Description
Point3d point

Point to copy values from.

| Improve this Doc View Source

Vector3d(Vector3d)

Initializes a new instance of the Vector3d class with the same values as the provided vector.

Declaration
public Vector3d(Vector3d vector)
Parameters
Type Name Description
Vector3d vector

Vector to copy values from.

| Improve this Doc View Source

Vector3d(Double, Double, Double)

Initializes a new instance of the Vector3d class given it's 3 coordinates.

Declaration
public Vector3d(double xCoord, double yCoord, double zCoord)
Parameters
Type Name Description
System.Double xCoord

X coordinate.

System.Double yCoord

Y coordinate.

System.Double zCoord

Z coordinate.

Properties

| Improve this Doc View Source

Length

Gets the Euclidean length of this vector.

Declaration
public double Length { get; }
Property Value
Type Description
System.Double

Length of the vector.

| Improve this Doc View Source

LengthSquared

Gets the Euclidean length squared of this vector.

Declaration
public double LengthSquared { get; }
Property Value
Type Description
System.Double

Squared Length of the vector.

| Improve this Doc View Source

UnitX

Gets a vector of unit length in the X direction.

Declaration
public static Vector3d UnitX { get; }
Property Value
Type Description
Vector3d

Vector {1,0,0}.

| Improve this Doc View Source

UnitY

Gets a vector of unit length in the Y direction.

Declaration
public static Vector3d UnitY { get; }
Property Value
Type Description
Vector3d

Vector {0,1,0}.

| Improve this Doc View Source

UnitZ

Gets a vector of unit length in the Z direction.

Declaration
public static Vector3d UnitZ { get; }
Property Value
Type Description
Vector3d

Vector {0,1,0}.

Methods

| Improve this Doc View Source

Angle(Vector3d, Vector3d)

Computes the angle in Radians between two given vectors Angle = Arcosine of the CrossProduct of UxV divided with their multiplied lengths.

Declaration
public static double Angle(Vector3d u, Vector3d v)
Parameters
Type Name Description
Vector3d u

First vector.

Vector3d v

Second vector.

Returns
Type Description
System.Double

Angle formed between u and v.

| Improve this Doc View Source

Cross(Vector3d)

Returns the cross product of this vector and v.

Declaration
public Vector3d Cross(Vector3d v)
Parameters
Type Name Description
Vector3d v

Vector.

Returns
Type Description
Vector3d

Cross product vector.

| Improve this Doc View Source

CrossProduct(Vector3d, Vector3d)

Computes the vector product (cross product) of two given vectors Cross product = { u2 * v3 - u3 * v2; u3 * v1 - u1 * v3; u1 * v2 - u2 * v1 }.

Declaration
public static Vector3d CrossProduct(Vector3d u, Vector3d v)
Parameters
Type Name Description
Vector3d u

First vector.

Vector3d v

Second vector.

Returns
Type Description
Vector3d

Vector result of the cross product.

| Improve this Doc View Source

Dot(Vector3d)

Computes the dot product of this vector and v.

Declaration
public double Dot(Vector3d v)
Parameters
Type Name Description
Vector3d v

Vector.

Returns
Type Description
System.Double

Dot product.

| Improve this Doc View Source

DotProduct(Vector3d, Vector3d)

Gets the scalar product (dot product) of two given vectors Dot product = u1v1 + u2v2 + u3*v3.

Declaration
public static double DotProduct(Vector3d u, Vector3d v)
Parameters
Type Name Description
Vector3d u

First vector.

Vector3d v

Second vector.

Returns
Type Description
System.Double

Numerical value of the dot product.

| Improve this Doc View Source

ToString()

Converts a vector into a string.

Declaration
public override string ToString()
Returns
Type Description
System.String

Returns a string representation of this vector.

Overrides
BasePoint.ToString()
| Improve this Doc View Source

Unit()

Returns a normalized copy of this vector.

Declaration
public Vector3d Unit()
Returns
Type Description
Vector3d

A copy of this vector unitized.

| Improve this Doc View Source

Unitize()

Divides this vector by it's euclidean length.

Declaration
public void Unitize()

Operators

| Improve this Doc View Source

Addition(Vector3d, Vector3d)

Adds one vector to another.

Declaration
public static Vector3d operator +(Vector3d v, Vector3d v2)
Parameters
Type Name Description
Vector3d v

First vector to add.

Vector3d v2

Second vector to add.

Returns
Type Description
Vector3d

New vector entity with the result of the addition.

| Improve this Doc View Source

Division(Vector3d, Double)

Divide a vector by a number.

Declaration
public static Vector3d operator /(Vector3d v, double scalar)
Parameters
Type Name Description
Vector3d v

Vector to be divided.

System.Double scalar

Number to be divided by.

Returns
Type Description
Vector3d

New vector entity with the result of the division.

| Improve this Doc View Source

Equality(Vector3d, Vector3d)

Checks if two vectors are equal.

Declaration
public static bool operator ==(Vector3d v, Vector3d w)
Parameters
Type Name Description
Vector3d v

First vector.

Vector3d w

Second vector.

Returns
Type Description
System.Boolean

Result of the comparison between v and w.

| Improve this Doc View Source

Inequality(Vector3d, Vector3d)

Checks if two vectors are not equal.

Declaration
public static bool operator !=(Vector3d v, Vector3d w)
Parameters
Type Name Description
Vector3d v

First vector.

Vector3d w

Second vector.

Returns
Type Description
System.Boolean

Result of the comparison between v and w.

| Improve this Doc View Source

Multiply(Vector3d, Double)

Multiply one vector by a number.

Declaration
public static Vector3d operator *(Vector3d v, double scalar)
Parameters
Type Name Description
Vector3d v

Vector to multiply.

System.Double scalar

Number to multiply with.

Returns
Type Description
Vector3d

New vector entity with the result of the multiplication.

| Improve this Doc View Source

Multiply(Double, Vector3d)

Multiply one vector by a number.

Declaration
public static Vector3d operator *(double scalar, Vector3d v)
Parameters
Type Name Description
System.Double scalar

Number to multiply with.

Vector3d v

Vector to multiply.

Returns
Type Description
Vector3d

New vector entity with the result of the multiplication.

| Improve this Doc View Source

Subtraction(Vector3d, Vector3d)

Substracts one vector from another.

Declaration
public static Vector3d operator -(Vector3d v, Vector3d v2)
Parameters
Type Name Description
Vector3d v

Vector to substract from.

Vector3d v2

Vector to be substracted.

Returns
Type Description
Vector3d

New vector entity with the result of the substraction.

| Improve this Doc View Source

UnaryNegation(Vector3d)

Negate a vector.

Declaration
public static Vector3d operator -(Vector3d v)
Parameters
Type Name Description
Vector3d v

Vector to negate.

Returns
Type Description
Vector3d

New vector entity with all the values negated.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX