Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
lm::builder::vector Struct Reference

A vector which points in a direction. More...

#include <Shape.h>

Public Member Functions

 vector (si_dist_t x=0.0, si_dist_t y=0.0, si_dist_t z=0.0)
 Create a vector.
 vector (const point &from, const point &to)
 Construct a vector pointing from one point to another.
 vector (const vector &v)
 Construct a vector from another vector.
 vector (const point &p)
 Construct a vector from a point.
point toPoint ()
 convert the vector to a point
si_dist_t length ()
 Get the vector length.
vector unitize ()
 Get a unit vector pointing in the same direction as this vector.
si_dist_t dot (const vector &r)
 Compute the dot product between vectors.
vector cross (const vector &r)
 Compute the cross product between vectors.
vector scale (const si_dist_t r)
 Scale the vector by a constant.
matrix mult (const vector &r)
 Multiply with another vector (taking this vector to be a row vector) to form a matrix.
vector mult (const matrix &r)
 Multiply with a matrix to form a new vector (assuming this vector is a row vector)

Static Public Member Functions

static vector findPerpendicularVector (vector v)

Public Attributes

si_dist_t x
si_dist_t y
si_dist_t z

Detailed Description

A vector which points in a direction.

Constructor & Destructor Documentation

◆ vector() [1/4]

lm::builder::vector::vector ( si_dist_t x = 0.0,
si_dist_t y = 0.0,
si_dist_t z = 0.0 )
inline

Create a vector.

Parameters
xDistance in x
yDistance in y
zDistance in z
Here is the caller graph for this function:

◆ vector() [2/4]

lm::builder::vector::vector ( const point & from,
const point & to )
inline

Construct a vector pointing from one point to another.

Parameters
fromThe point at the root of the vector
toThe point at the end of the vector

◆ vector() [3/4]

lm::builder::vector::vector ( const vector & v)
inline

Construct a vector from another vector.

Parameters
vThe vector to copy
Here is the call graph for this function:

◆ vector() [4/4]

lm::builder::vector::vector ( const point & p)
inline

Construct a vector from a point.

Parameters
pThe point to cast

Member Function Documentation

◆ cross()

vector lm::builder::vector::cross ( const vector & r)

Compute the cross product between vectors.

Parameters
rThe right hand vector
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot()

si_dist_t lm::builder::vector::dot ( const vector & r)

Compute the dot product between vectors.

Parameters
rThe right hand vector
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findPerpendicularVector()

vector lm::builder::vector::findPerpendicularVector ( vector v)
inlinestatic
Here is the call graph for this function:

◆ length()

si_dist_t lm::builder::vector::length ( )

Get the vector length.

Here is the caller graph for this function:

◆ mult() [1/2]

vector lm::builder::vector::mult ( const matrix & r)

Multiply with a matrix to form a new vector (assuming this vector is a row vector)

Parameters
rThe matrix
Here is the call graph for this function:

◆ mult() [2/2]

matrix lm::builder::vector::mult ( const vector & r)

Multiply with another vector (taking this vector to be a row vector) to form a matrix.

Parameters
rThe column vector
Here is the call graph for this function:

◆ scale()

vector lm::builder::vector::scale ( const si_dist_t r)

Scale the vector by a constant.

Parameters
rThe scalar
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toPoint()

point lm::builder::vector::toPoint ( )
inline

convert the vector to a point

Here is the caller graph for this function:

◆ unitize()

vector lm::builder::vector::unitize ( )

Get a unit vector pointing in the same direction as this vector.

Here is the call graph for this function:

Member Data Documentation

◆ x

si_dist_t lm::builder::vector::x

◆ y

si_dist_t lm::builder::vector::y

◆ z

si_dist_t lm::builder::vector::z

The documentation for this struct was generated from the following files:
  • /data2/LM_zls_github/Lattice-Microbes/src/builder/Shape.h
  • /data2/LM_zls_github/Lattice-Microbes/src/builder/Shape.cpp