The Vish Visualization Shell 0.3
Vish
Public Member Functions | Friends | List of all members
Eagle::PhysicalSpace::vector Class Reference

3-dimensional vector. More...

#include <elementary/eagle/PhysicalSpace.hpp>

Inheritance diagram for Eagle::PhysicalSpace::vector:

Public Member Functions

vector inv () const
 Compute the inverse vector $ v^{-1} = v/|v|^2 $.
 
vector multiply (const FixedArray< double, 3 > &F) const
 Rescaling this vector by component-wise multiplication.
 
vector multiply (double F0, double F1, double F2) const
 Rescaling this vector by component-wise multiplication.
 
vectornormalize ()
 Normalize this vector.
 
vector operator() (const vector &v) const
 Compute nvn, which is the reflection of the vector v along the current vector n.
 
bivector operator* () const
 Compute the dual of this vector.
 
vector operator+ (const vector &r) const
 Add two vectors.
 
vector operator- () const
 Unary minus.
 
vector unit () const
 Return the unit vector of this vector.
 
constexpr vector ()
 Evil default constructor.
 
 vector (const DomainVector_t &v)
 Copy constructor.
 
 vector (const DomainVector_t::Base_t &v)
 Copy constructor.
 
template<OperatorID_t CompType>
 vector (const double &scalar, const vector &l, const Operator< CompType > &C)
 Generic computational constructor for scalar-vector operations.
 
 vector (const point &l)
 Construct vector from point.
 
 vector (const point &l, const point &r, const Operator<'-'> &C)
 Construct vector as subtraction of two points.
 
template<OperatorID_t CompType>
 vector (const vector &l, const double &scalar, const Operator< CompType > &C)
 Generic computational constructor for vector-scalar operations.
 
 vector (const vector &l, const Operator<'-'> &C)
 Computational constructor for unitary minus.
 
template<OperatorID_t CompType>
 vector (const vector &l, const vector &r, const Operator< CompType > &C)
 Generic computational constructor for two vectors.
 
 vector (double x, double y, double z)
 Component-wise construction.
 
Orthogonal vector functions
void Ortho (vector &v, vector &w) const
 Find two vectors which are orthogonal to this.
 
vector ortho () const
 Find a vector which is orthogonal to this.
 

Friends

double dot (const vector &a, const vector &b)
 Compute the Euclidean dot product (inner product) of two vectors.
 
Metric dyadic (const vector &a, const vector &b)
 Tensor product or dyadic product of two vectors.
 
vector operator* (const real &scalar, const vector &v)
 Multiply scalar with a vector, yielding a vector.
 
vector operator* (const vector &v, const real &scalar)
 Multiply vector with scalar.
 
vector operator- (const vector &l, const vector &r)
 Subtraction operator.
 
vector operator/ (const vector &v, const real &scalar)
 Divide a vector by a scalar.
 

Detailed Description

3-dimensional vector.

Examples
AnemoneBoundingVolume.cpp, and InteractivePoint.cpp.

Constructor & Destructor Documentation

◆ vector()

constexpr Eagle::PhysicalSpace::vector::vector ( )
inlineconstexpr

Evil default constructor.

Not sure if it should do anything or nothing. Primary purpose is for use within arrays. Currently does nothing, because it should be fast, and the user shouldnt expect uninitialized variables to contain anything useful.

Referenced by multiply(), multiply(), operator+(), and operator-().

Member Function Documentation

◆ operator*()

bivector Eagle::PhysicalSpace::vector::operator* ( ) const
inline

Compute the dual of this vector.

Compute dual of a vector, which is the plane orthogonal to the given vector.

Friends And Related Symbol Documentation

◆ dyadic

Metric dyadic ( const vector a,
const vector b 
)
friend

Tensor product or dyadic product of two vectors.

Creates a tensor of order two.