C# Class SolidworksAddinFramework.Geometry.Vector3Extensions

Exibir arquivo Open project: Weingartner/SolidworksAddinFramework Class Usage Examples

Public Methods

Method Description
AngleBetweenVectors ( this v0, System.Vector3 v1 ) : double
Dot ( this a, System.Vector3 other ) : double
Equals ( this a, System.Vector3 other, double tol ) : bool
GLNormal3 ( this v ) : void
GLVertex3 ( this v ) : void
Orientation ( this a, System.Vector3 b, System.Vector3 c ) : int

Returns 1 for right handed vectors and -1 for left handed

Orthogonal ( this v ) : System.Vector3

Returns an orthoganl vector. This is robust From http://lolengine.net/blog/2013/09/21/picking-orthogonal-vector-combing-coconuts

ProjectOn ( this point, System.Vector3 axis ) : System.Vector3
ProjectOnUnit ( this point, System.Vector3 axis ) : System.Vector3
SignedAngle ( this v0, System.Vector2 v1 ) : double

returns the signed angle between the two vectors

To2D ( this v ) : System.Vector2

Drops the Z value. Effectively a projection on to the XY plane

To3D ( this v ) : System.Vector3

Converts to Vector3 and sets the z component to 0.0

ToDoubles ( this v ) : double[]
ToEuclid ( this v ) : System.Vector3

Performs the perspective transformation to turn a 4D homogeneos coordinate into Euclidian coordinates. Useful for dealing with b-splines

ToHomogenous ( this v, double w ) : System.Vector4

Converts a euclidian vector into homogeneous space. Use ToEuclid to get it back again. Useful in dealing with b-splines

ToSWVector ( this v, IMathUtility m = null ) : MathVector
ToSingles ( this v ) : double[]
ToSwMathPoint ( this v ) : MathPoint
ToVector3 ( this value ) : System.Vector3
ToVector3 ( this value ) : System.Vector3
ToVector3D ( this values ) : System.Vector3
Unit ( this v ) : System.Vector3
WithZ ( this v, double value ) : System.Vector3
XComponent ( this v ) : System.Vector3
YComponent ( this v ) : System.Vector3
ZComponent ( this v ) : System.Vector3

Method Details

AngleBetweenVectors() public static method

public static AngleBetweenVectors ( this v0, System.Vector3 v1 ) : double
v0 this
v1 System.Vector3
return double

Dot() public static method

public static Dot ( this a, System.Vector3 other ) : double
a this
other System.Vector3
return double

Equals() public static method

public static Equals ( this a, System.Vector3 other, double tol ) : bool
a this
other System.Vector3
tol double
return bool

GLNormal3() public static method

public static GLNormal3 ( this v ) : void
v this
return void

GLVertex3() public static method

public static GLVertex3 ( this v ) : void
v this
return void

Orientation() public static method

Returns 1 for right handed vectors and -1 for left handed
public static Orientation ( this a, System.Vector3 b, System.Vector3 c ) : int
a this
b System.Vector3
c System.Vector3
return int

Orthogonal() public static method

Returns an orthoganl vector. This is robust From http://lolengine.net/blog/2013/09/21/picking-orthogonal-vector-combing-coconuts
public static Orthogonal ( this v ) : System.Vector3
v this
return System.Vector3

ProjectOn() public static method

public static ProjectOn ( this point, System.Vector3 axis ) : System.Vector3
point this
axis System.Vector3
return System.Vector3

ProjectOnUnit() public static method

public static ProjectOnUnit ( this point, System.Vector3 axis ) : System.Vector3
point this
axis System.Vector3
return System.Vector3

SignedAngle() public static method

returns the signed angle between the two vectors
public static SignedAngle ( this v0, System.Vector2 v1 ) : double
v0 this
v1 System.Vector2
return double

To2D() public static method

Drops the Z value. Effectively a projection on to the XY plane
public static To2D ( this v ) : System.Vector2
v this
return System.Vector2

To3D() public static method

Converts to Vector3 and sets the z component to 0.0
public static To3D ( this v ) : System.Vector3
v this
return System.Vector3

ToDoubles() public static method

public static ToDoubles ( this v ) : double[]
v this
return double[]

ToEuclid() public static method

Performs the perspective transformation to turn a 4D homogeneos coordinate into Euclidian coordinates. Useful for dealing with b-splines
public static ToEuclid ( this v ) : System.Vector3
v this
return System.Vector3

ToHomogenous() public static method

Converts a euclidian vector into homogeneous space. Use ToEuclid to get it back again. Useful in dealing with b-splines
public static ToHomogenous ( this v, double w ) : System.Vector4
v this
w double
return System.Vector4

ToSWVector() public static method

public static ToSWVector ( this v, IMathUtility m = null ) : MathVector
v this
m IMathUtility
return MathVector

ToSingles() public static method

public static ToSingles ( this v ) : double[]
v this
return double[]

ToSwMathPoint() public static method

public static ToSwMathPoint ( this v ) : MathPoint
v this
return MathPoint

ToVector3() public static method

public static ToVector3 ( this value ) : System.Vector3
value this
return System.Vector3

ToVector3() public static method

public static ToVector3 ( this value ) : System.Vector3
value this
return System.Vector3

ToVector3D() public static method

public static ToVector3D ( this values ) : System.Vector3
values this
return System.Vector3

Unit() public static method

public static Unit ( this v ) : System.Vector3
v this
return System.Vector3

WithZ() public static method

public static WithZ ( this v, double value ) : System.Vector3
v this
value double
return System.Vector3

XComponent() public static method

public static XComponent ( this v ) : System.Vector3
v this
return System.Vector3

YComponent() public static method

public static YComponent ( this v ) : System.Vector3
v this
return System.Vector3

ZComponent() public static method

public static ZComponent ( this v ) : System.Vector3
v this
return System.Vector3