Facebook Twitter YouTube

class Bivector4D

Defined in:  TSBivector4D.h
The Bivector4D class encapsulates a 4D bivector.
Definition

class Bivector4D

Member Functions
Bivector4D::Set Sets all six components of a bivector.
Bivector4D::Standardize Standardizes a 4D bivector.
Constructor

Bivector4D();

Bivector4D(float vx, float vy, float vz, float mx, float my, float mz);

Bivector4D(const Vector3D& v, const Vector3D& m);

Bivector4D(const Point3D& p, const Point3D& q);

Bivector4D(const Point3D& p, const Vector3D& v);

Bivector4D(const Trivector4D& f, const Trivector4D& g);

Parameters
vx,vy,vz The three components of the direction of the line.
mx,my,mz The three components of the moment of the line.
v A 3D vector corresponding to the direction of the line.
m A 3D antivector corresponding to the moment of the line.
p,q Two 3D points that lie on the line.
f,g Two planes that intersect at the line.
Description
The Bivector4D class is used to store a four-dimensional bivector having six floating-point components. The components of a 4D bivector are stored as two Vector3D members named direction and moment.

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 w coordinates set to 1, giving a representation of the 3D line containing both points. The direction component of the bivector is assigned the value q − p, and the moment component is assigned the value p ∧ q.

If the point p and the direction v are specified, then the line contains the point p and runs parallel to the direction v. The bivector is initialized to the wedge product between the homogeneous extension of p with w coordinate set to 1 and the homogeneous extension of v with w coordinate set to 0. The direction component of the bivector is set equal to v, and the moment component is assigned the value p ∧ v.

If planes f and g are specified, then the bivector is initialized to the antiwedge product between the 4D trivectors f and g, giving a representation of the line where the planes intersect.
Overloaded Operators
Bivector4D& operator *=(float s); Multiplies by the scalar s.
Bivector4D& operator /=(float s); Multiplies by the inverse of the scalar s.
Nonmember Operations
Bivector4D operator -(const Bivector4D& L); Returns the negation of the bivector L.
Bivector4D operator *(const Bivector4D& L, float s); Returns the product of the bivector L and the scalar s.
Bivector4D operator *(float s, const Bivector4D& L); Returns the product of the bivector L and the scalar s.
Bivector4D operator /(const Bivector4D& L, float s); Returns the product of the bivector L and the inverse of the scalar s.
Bivector4D operator ^(const Point3D& p, const Point3D& q); Returns the wedge product of the points p and q. The w coordinates of p and q are assumed to be 1.
Bivector4D operator ^(const Trivector4D& f, const Trivector4D& g); Returns the antiwedge product of the trivectors f and g. The result represents the line where the two planes f and g intersect. The direction of the line is equal to the cross product between the normal component of f and the normal component of g.
Trivector4D operator ^(const Bivector4D& L, const Point3D& p); Returns the wedge product of the bivector L and the point p. The w coordinate of p is assumed to be 1. The result represents the plane containing the line L and the point p, wound from the direction component of L toward the direction to p perpendicular to the line L.
Trivector4D operator ^(const Point3D& p, const Bivector4D& L); Returns the wedge product of the point p and the bivector L, which is the same as L ∧ p. The w coordinate of p is assumed to be 1.
Trivector4D operator ^(const Bivector4D& L, const Vector3D& v); Returns the wedge product of the bivector L and the direction v. The w coordinate of v is assumed to be 0. The result represents the plane containing the line L and the direction v, wound from the direction component of L toward the direction v.
Trivector4D operator ^(const Vector3D& v, const Bivector4D& L); Returns the wedge product of the direction v and the bivector L, which is the same as L ∧ v. The w coordinate of v is assumed to be 0.
Vector4D operator ^(const Bivector4D& L, const Trivector4D& f); Returns the antiwedge product of the bivector L and the plane f. The result represents the homogeneous point where the line and plane intersect. The x, y, and z must be divided by the w coordinate to produce a 3D point.
Vector4D operator ^(const Trivector4D& f, const Bivector4D& L); Returns the antiwedge product of the plane f and the bivector L, which is the same as L ∨ f.
float operator ^(const Bivector4D& a, const Bivector4D& b); Returns the negative antiwedge product of the bivectors a and b. This gives the crossing relationship between the two lines, with positive values representing clockwise crossings and negative values representing counterclockwise crossings.
bool operator ==(const Bivector4D& a, const Bivector4D& b); Returns a boolean value indicating the equality of the two bivectors a and b.
bool operator !=(const Bivector4D& a, const Bivector4D& b); Returns a boolean value indicating the inequality of the two bivectors a and b
See Also

Vector4D

Trivector4D