CalculateVectorFromVectors

MLModule
genre Vector
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLCoordUtils1
definition MLCoordUtils1.def
see also SoCalculator, CalculateAngle
keywords cross, product, length

Purpose

The module CalculateVectorFromVectors performs calculations on two given vectors.

Windows

Default Panel

../../../Modules/ML/MLCoordUtils1/mhelp/Images/Screenshots/CalculateVectorFromVectors._default.png

Parameter Fields

Field Index

Flip to Half-Space: Enum
Mode: Enum
Normalize: Bool
Result: Vector3
Vector 1: Vector3
Vector 2: Vector3

Visible Fields

Mode

name: mode, type: Enum, default: Add

Defines the function.

Values:

Title Name Deprecated Name Description
Add Add add (a+b) Adds the two input vectors.
Subtract Subtract subtract (a-b) Subtracts the second vector from the first one.
Cross Cross cross product (axb) Computes the cross product of the input vectors.
Ortho Project OrthoProject project a to plane orthogonal to b ((bxa)xb)

Projects the first vector onto a plane orthogonal to the second vector.

r = ((b x a) x b)

NOTE that the input vectors are not normalized.

Normalize

name: normalize, type: Bool, default: FALSE

If checked, the Result vector is normalized.

Flip to Half-Space

name: flipToHalfSpace, type: Enum, default: None

Defines one of six coordinate half-spaces available according to the three coordinate axes x, y, and z.

If a given condition is not met, the vector is inverted, i.e. flipped by multiplying each coordinate with (-1).

Values:

Title Name Deprecated Name
None None none
Pos X PosX positive x
Neg X NegX negative x
Pos Y PosY positive y
Neg Y NegY negative y
Pos Z PosZ positive z
Neg Z NegZ negative z

Vector 1

name: v1, type: Vector3, default: 0 0 0, deprecated name: vectorA

Sets the first input vector.

Vector 2

name: v2, type: Vector3, default: 0 0 0, deprecated name: vectorB

Sets the second input vector.

Result

name: result, type: Vector3, persistent: no, deprecated name: vector

Shows the result vector.