 C4 Engine API Documentation

## class Flector4D

Defined in:  `TSFlector3D.h`
The `Flector4D` class encapsulates a 4D reflection operator (flector). For more information about flectors, see the projective geometric algebra website.
Definition

`class Flector4D`

Member Functions
 `Flector4D::Set` Sets all eight components of a flector. `Flector4D::Unitize` Unitizes the weight of a flector. `Flector4D::MakeTransflection` Returns a flector that represents a translation and a reflection. `Flector4D::MakeRotoreflection` Returns a flector that represents a rotation and a reflection. `Flector4D::GetTransformMatrix` Converts a flector to its corresponding 4 × 4 matrix. `Flector4D::GetInverseTransformMatrix` Converts a flector to the inverse of its corresponding 4 × 4 matrix. `Flector4D::GetTransformMatrices` Converts a flector to its corresponding 4 × 4 matrix and its inverse simultaneously. `Flector4D::SetTransformMatrix` Converts a 4 × 4 matrix to its corresponding flector.
Constructor

`Flector4D();`

`Flector4D(float px, float py, float pz, float pw, float gx, float gy, float gz, float gw);`

`Flector4D(const Vector4D& point, const Plane3D& plane);`

`Flector4D(const Point3D& point, const Plane3D& plane);`

`explicit Flector4D(const Vector4D& point);`

`explicit Flector4D(const Point3D& point);`

`explicit Flector4D(const Plane3D& plane);`

Parameters
 `px,py,pz,pw` The values of the e1, e2, e3, and e4 coordinates. `gx,gy,gz,gw` The values of the e234, e314, e124, and e321 coordinates. `plane` A plane whose entries are copied to the e234, e314, e124, and e321 coordinates. `point` A point whose entries are copied to the e1, e2, e3, and e4 coordinates.
Description
The `Flector4D` class encapsulates a reflection operator (flector) in the 4D projective geometric algebra. It has the general form Fpxe1 + Fpye2 + Fpze3 + Fpwe4 + Fgxe234 + Fgye314 + Fgze124 + Fgwe321.

The default constructor leaves the components of the flector undefined. If the point `point` and plane `plane` are specified, then their coordinates are assigned to the vector part and trivector part of the flector, respectively. If only one of the point `point` and plane `plane` are specified, then the other part is set to zero. If the `point` has type `Point3D`, then its w coordinate is assumed to be one.
 `Flector4D& operator *=(float n);` Multiplies by the scalar `n`. `Flector4D& operator /=(float n);` Multiplies by the inverse of the scalar `n`.
 `bool operator ==(const Flector4D& a, const Flector4D& b);` Returns a boolean value indicating whether the two flectors `a` and `b` are equal. `bool operator !=(const Flector4D& a, const Flector4D& b);` Returns a boolean value indicating whether the two flectors `a` and `b` are not equal. `Flector4D operator ~(const Flector4D& F);` Returns the antireverse of the flector `F`. `Flector4D operator -(const Flector4D& F);` Returns the negation of the flector `F`. `Flector4D operator *(const Flector4D& F, float n);` Returns the product of the flector `F` and the scalar `n`. `Flector4D operator *(float n, const Flector4D& F);` Returns the product of the flector `F` and the scalar `n`. `Flector4D operator /(const Flector4D& F, float n);` Returns the product of the flector `G` and the inverse of the scalar `n`. `Motor4D operator *(const Flector4D& a, const Flector4D& b);` Returns the geometric antiproduct of the flectors `a` and `b`, producing a motor. `Flector4D operator *(const Flector4D& a, const Motor4D& b);` Returns the geometric antiproduct of the flector `a` and the motor `b`, producing a flector. `Flector4D operator *(const Motor4D& a, const Flector4D& b);` Returns the geometric antiproduct of the motor `a` and the flector `b`, producing a flector. `float BulkNorm(const Flector4D& F);` Returns the bulk norm of the flector `F`. `float WeightNorm(const Flector4D& F);` Returns the weight norm of the flector `F`. `Vector3D Transform(const Vector3D& v, const Flector4D& F);` Transforms the vector `v` with the flector `F`. `Bivector3D Transform(const Bivector3D& v, const Flector4D& F);` Transforms the bivector `v` with the flector `F`. `Vector4D Transform(const Vector4D& p, const Flector4D& F);` Transforms the point `p` with the flector `F`. `Point3D Transform(const Point3D& p, const Flector4D& F);` Transforms the point `p` with the flector `F`. `Line3D Transform(const Line3D& l, const Flector4D& F);` Transforms the line `l` with the flector `F`. `Plane3D Transform(const Plane3D& g, const Flector4D& F);` Transforms the plane `g` with the flector `F`.
`Motor4D`
`Point3D`
`Line3D`
`Plane3D`