![]() |
NLMech
0.1.0
|
A structure to represent 3d vectors. More...
#include <point.h>

Public Member Functions | |
| double | angle (Point3 b) const |
| Computes the angle between vector given by this and the vector b. More... | |
| Point3 | cross (const Point3 &b) const |
| Computes the cross product between this vector and given vector. More... | |
| double | dist (const Point3 &b) const |
| Computes the distance between a given point from this point. More... | |
| double | dot (const Point3 &b) const |
| Computes the dot product of this vector with another point. More... | |
| double | length () const |
| Computes the Euclidean length of the vector. More... | |
| double | lengthSq () const |
| Computes the Euclidean length of the vector. More... | |
| Point3 () | |
| Constructor. | |
| Point3 (const Point3 &p) | |
| Copy constructor. More... | |
| Point3 (const std::vector< double > &p) | |
| Constructor. More... | |
| template<class T > | |
| Point3 (T x, T y, T z) | |
| Constructor. More... | |
| template<class T > | |
| Point3 (T x[3]) | |
| Constructor. More... | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information. More... | |
| std::string | printStr (int nt=0, int lvl=0) const |
| Prints the information. More... | |
| Point3 | project (const Point3 &b, bool is_unit=false) const |
| Computes projection of vector on this vector. More... | |
| Point3 | projectNormal (const Point3 &b, bool is_unit=false) const |
| Computes projection of vector on plane with normal as this vector. More... | |
| util::Matrix33 | toMatrix () |
| Computes the dot product of the vector and its transpose. More... | |
| util::Matrix33 | toMatrix (const util::Point3 b) |
| Computes the dot product of the vector x and the transpose of y. More... | |
| util::Vector3 | toVector () |
| Converts the point to an blaze vector. More... | |
| Point3 | unit () |
| Returns the unit vector. More... | |
| Point3 | unit () const |
| Returns the unit vector. More... | |
Data Fields | |
| double | d_x |
| the x coordinate | |
| double | d_y |
| the y coordinate | |
| double | d_z |
| the z coordinate | |
Group operators | |
| Point3 & | operator+= (const double b) |
| Add a scalar to the point. More... | |
| Point3 & | operator-= (const double b) |
| Subtracts a scalar to the point. More... | |
| Point3 & | operator*= (const double b) |
| Multiplies a scalar to the point. More... | |
| Point3 & | operator+= (const Point3 &b) |
| Adds a point. More... | |
| Point3 & | operator-= (const Point3 &b) |
| Subtracts a point. More... | |
| Point3 & | operator*= (const Point3 &b) |
| Multiplies a point. More... | |
| Point3 & | operator/= (const double b) |
| Divides a point by a scalar. More... | |
| double & | operator[] (size_t i) |
| Access the 0th component of a point. More... | |
| const double & | operator[] (size_t i) const |
| Access the 0th component of a point. More... | |
| Point3 | operator+ (Point3 lhs, const Point3 &rhs) |
| Adds two points. More... | |
| Point3 | operator- (Point3 lhs, const Point3 &rhs) |
| Substracts two points. More... | |
| double | operator* (Point3 lhs, const Point3 rhs) |
| Multiplies a constant to the point. More... | |
| Point3 | operator* (Point3 lhs, const double rhs) |
| Adds two points. More... | |
| Point3 | operator+ (Point3 lhs, const double rhs) |
| Adds a scalar to the point. More... | |
| Point3 | operator+ (const double lhs, Point3 rhs) |
| Adds two points. More... | |
| Point3 | operator- (Point3 lhs, const double rhs) |
| Subtracts a scalar to the point. More... | |
| Point3 | operator- (const double lhs, Point3 rhs) |
| Subtracts a scalar to the point. More... | |
| Point3 | operator* (const double lhs, Point3 rhs) |
| Subtracts a scalar to the point. More... | |
| Point3 | operator/ (Point3 lhs, const double rhs) |
| Divides a scalar to the point. More... | |
| std::ostream & | operator<< (std::ostream &os, const Point3 p) |
| Print the point's value to the standard output stream. More... | |
A structure to represent 3d vectors.
|
inline |
Constructor.
| x | The x coordinate |
| y | The y coordinate |
| z | The z coordinate |
|
inlineexplicit |
Constructor.
| x | The coordinate vector |
|
inlineexplicit |
Constructor.
| p | Point |
|
inline |
Copy constructor.
| p | Point |
|
inline |
Computes the angle between vector given by this and the vector b.
| b | Another vector |

Computes the cross product between this vector and given vector.
| b | Another vector |
|
inline |
Computes the distance between a given point from this point.
| b | Another point |
Referenced by util::function::doubleGaussian2d(), tools::pp::Compute::findNode(), util::function::gaussian2d(), tools::pp::Compute::interpolateUV(), and inp::Input::setFractureDeck().

|
inline |
Computes the dot product of this vector with another point.
| b | Another vector |
Referenced by util::geometry::angle(), tools::pp::Compute::getContourContribJInt(), material::pd::RNPBond::getS(), project(), and projectNormal().

|
inline |
Computes the Euclidean length of the vector.
Referenced by material::pd::ElasticState::dirac_delta(), material::pd::ElasticState::getBondEF(), material::pd::RNPBond::getBondForceDirection(), material::pd::ElasticState::getBondForceDirection(), tools::pp::Compute::getContourContribJInt(), material::pd::ElasticState::K_modulus_tensor(), project(), projectNormal(), and unit().

|
inline |
Computes the Euclidean length of the vector.
|
inline |
Multiplies a scalar to the point.
| b | Scalar factor |
Multiplies a point.
| b | Point |
|
inline |
Add a scalar to the point.
| b | Scalar factor |
Adds a point.
| b | Point |
|
inline |
Subtracts a scalar to the point.
| b | Scalar factor |
Subtracts a point.
| b | Point |
|
inline |
Divides a point by a scalar.
| b | Scalar factor |
|
inline |
Access the 0th component of a point.
| i | Index |
|
inline |
Access the 0th component of a point.
| i | Index |
|
inline |
Prints the information.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |

|
inline |
Prints the information.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Referenced by tools::pp::Compute::computeJIntegral(), print(), and fe::QuadData::printStr().

Computes projection of vector on this vector.
| b | Another vector |
| is_unit | Is a unit vector |

Computes projection of vector on plane with normal as this vector.
| b | Another vector |
| is_unit | Is a unit vector |

|
inline |
Computes the dot product of the vector and its transpose.
Referenced by material::pd::ElasticState::deformation_gradient(), material::pd::ElasticState::K_modulus_tensor(), and material::pd::ElasticState::K_shape_tensor().

|
inline |
Computes the dot product of the vector x and the transpose of y.
| b | The node b |
|
inline |
Converts the point to an blaze vector.
Referenced by material::pd::ElasticState::getStress().

|
inline |
Returns the unit vector.
Referenced by angle().


|
inline |
Returns the unit vector.

Subtracts a scalar to the point.
| lhs | Left-hand side |
| rhs | Left-hand side |
Adds two points.
| lhs | Left-hand side |
| rhs | Left-hand side |
Multiplies a constant to the point.
| lhs | Left-hand side |
| rhs | Left-hand side |
Adds two points.
| lhs | Left-hand side |
| rhs | Left-hand side |
Adds a scalar to the point.
| lhs | Left-hand side |
| rhs | Left-hand side |
Adds two points.
| lhs | Left-hand side |
| rhs | Left-hand side |
Subtracts a scalar to the point.
| lhs | Left-hand side |
| rhs | Left-hand side |
Subtracts a scalar to the point.
| lhs | Left-hand side |
| rhs | Left-hand side |
Substracts two points.
| lhs | Left-hand side |
| rhs | Left-hand side |
Divides a scalar to the point.
| lhs | Left-hand side |
| rhs | Left-hand side |
|
friend |
Print the point's value to the standard output stream.
| os | Standard output stream |
| p | Point |