 C4 Engine API Documentation

## class Bivector3D

Defined in:  `TSBivector3D.h`
The `Bivector3D` class encapsulates a 3D bivector.
Definition

`class Bivector3D : public Antivec3D<TypeBivector3D>`

Member Functions
 `Bivector3D::Set` Sets all three components of a bivector.
Constructor

`Bivector3D();`

`Bivector3D(float a, float b, float c);`

`Bivector3D(const Point2D& p, const Point2D& q);`

`Bivector3D(const Point2D& p, const Vector2D& v);`

Parameters
 `a` The value of the e23 coordinate. `b` The value of the e31 coordinate. `c` The value of the e12 coordinate. `p,q` Two 2D points that lie on the line. `v` A 2D direction vector.
Description
The `Bivector3D` class is used to store a three-dimensional bivector having three floating-point components named `x`, `y`, and `z`.

The default constructor leaves the components of the bivector undefined.

If points `p` and `q` are specified, then the bivector is initialized to the wedge product between homogeneous extensions of `p` and `q` with z coordinates set to 1, giving a representation of the 2D line containing both points. If the point `p` and the direction `v` are specified, then the line contains the point `p` and runs parallel to the direction `v`.
 `Bivector3D& operator +=(const Bivector3D& v);` Adds the bivector `v`. `Bivector3D& operator -=(const Bivector3D& v);` Subtracts the bivector `v`. `Bivector3D& operator *=(float n);` Multiplies by the scalar `n`. `Bivector3D& operator /=(float n);` Multiplies by the inverse of the scalar `n`.
 `bool operator ==(const Bivector3D& a, const Bivector3D& b);` Returns a boolean value indicating whether the two bivectors `a` and `b` are equal. `bool operator !=(const Bivector3D& a, const Bivector3D& b);` Returns a boolean value indicating whether the two bivectors `a` and `b` are not equal. `Bivector3D operator !(const Vector3D& v);` Returns the complement of the vector `v`. `Vector3D operator !(const Bivector3D& v);` Returns the complement of the bivector `v`. `Bivector3D operator -(const Bivector3D& v);` Returns the negation of the bivector `v`. `Bivector3D operator +(const Bivector3D& a, const Bivector3D& b);` Returns the sum of the bivectors `a` and `b`. `Bivector3D operator -(const Bivector3D& a, const Bivector3D& b);` Returns the difference of the bivectors `a` and `b`. `Bivector3D operator *(const Bivector3D& v, float n);` Returns the product of the bivector `v` and the scalar `n`. `Bivector3D operator *(float n, const Bivector3D& v);` Returns the product of the bivector `v` and the scalar `n`. `Bivector3D operator /(const Bivector3D& v, float n);` Returns the product of the bivector `v` and the inverse of the scalar `n`. `bool operator ==(const Bivector3D& a, const Bivector3D& b);` Returns a boolean value indicating whether the two bivectors `a` and `b` are equal. `bool operator !=(const Bivector3D& a, const Bivector3D& b);` Returns a boolean value indicating whether the two bivectors `a` and `b` are not equal. `Bivector3D operator ^(const Vector3D& a, const Vector3D& b);` Returns the wedge product of the vectors `a` and `b`. `Bivector3D operator ^(const Point2D& p, const Point2D& q);` Returns the wedge product of the 2D points `p` and `q`. The z coordinates of `p` and `q` are assumed to be 1. `Bivector3D operator ^(const Point2D& p, const Vector2D& v);` Returns the wedge product of the 2D point `p` and the 2D vector `v`. The z coordinate of `p` is assumed to be 1. `Vector3D operator ^(const Bivector3D& a, const Bivector3D& b);` Returns the antiwedge product of the bivectors `a` and `b`. `float operator ^(const Bivector3D& a, const Vector3D& b);` Returns the antiwedge product of the bivector `a` and the vector `b`. `float operator ^(const Vector3D& a, const Bivector3D& b);` Returns the antiwedge product of the vector `a` and the bivector `b`. `Vector3D Project(const Vector3D& a, const Bivector3D& b);` Returns (b̲ ∧ a) ∨ b, which is the projection of `a` onto `b` under the assumption that the magnitude of `b` is one.
 `Antivec3D` Antivectors use a generic base class to store their components.
`Vector3D`
`Vector2D`
`Point2D`