Parameters

Returns

Description

Finds the cross product of this vector and another.

Vec3 cross = myVector.cross(Vec3(1, 2, 3));

The cross product of two vectors is a vector perpendicular to the two input vectors. Since there are two possible perpendicular vectors, the direction is determined by the "left hand rule". This means that crossing vector1 with vector2 will
produce the opposite of crossing vector2 with vector1. The magnitude of the new vector is equal to the magnitudes of the two inputs multiplied together and then multiplied by the sine of the angle between the inputs.

Description

The vector is taken from the origin point of from's coordinate space. The origin is the (0,0,0) point of the coordinate space and is often located in the top left corner of an object's coordinate space.

It is important to understand the way the axes work in FlexSim. The X and Y axes form the floor grid plane while the Z axis is equivalent to the height. Also objects y size values stretch in the
-y direction, but stretch in the positive direction on both the X and Z axes. In other words an object at location (0,5,0) with a size of (1,2,3) will stretch from x location 0 to 1, y location 5 to 3 and z location 0 to 3.

Vec3 globalLoc = Vec3(5, 3, 0).project(current, model());

This example finds out the global location of the position (5,3,0) in current's coordinate space.