A vertex point or facet normal representation for STL files. More...
#include <STLpoint.H>


Public Member Functions | |
| STLpoint ()=default | |
| Default construct. | |
| STLpoint (const Vector< float > &p) | |
| Construct from single-precision point. | |
| STLpoint (const Vector< double > &p) | |
| Construct from double-precision point. | |
| STLpoint (float x, float y, float z) | |
| Construct from single-precision components. | |
| STLpoint (double x, double y, double z) | |
| Construct from double-precision components. | |
| Public Member Functions inherited from Vector< float > | |
| Vector ()=default | |
| Default construct. | |
| Vector (const Vector &)=default | |
| Copy construct. | |
| Vector & | operator= (const Vector &)=default |
| Copy assignment. | |
| Vector (Foam::zero) | |
| Construct initialized to zero. | |
| Vector (const VectorSpace< Vector< Cmpt2 >, Cmpt2, 3 > &vs) | |
| Copy construct from VectorSpace of the same rank. | |
| Vector (const float &vx, const float &vy, const float &vz) | |
| Construct from three components. | |
| Vector (Istream &is) | |
| Construct from Istream. | |
| const float & | x () const noexcept |
| Access to the vector x component. | |
| const float & | y () const noexcept |
| Access to the vector y component. | |
| const float & | z () const noexcept |
| Access to the vector z component. | |
| float & | x () noexcept |
| Access to the vector x component. | |
| float & | y () noexcept |
| Access to the vector y component. | |
| float & | z () noexcept |
| Access to the vector z component. | |
| const Vector< float > & | centre (const Foam::UList< Vector< float > > &) const noexcept |
Return this (for point which is a typedef to Vector<scalar>). | |
| scalar | mag () const |
| The length (L2-norm) of the vector. | |
| scalar | magSqr () const |
| The length (L2-norm) squared of the vector. | |
| scalar | dist (const Vector< float > &v2) const |
| The L2-norm distance from another vector. The mag() of the difference. | |
| scalar | distSqr (const Vector< float > &v2) const |
| The L2-norm distance squared from another vector. The magSqr() of the difference. | |
| Vector< float > & | normalise (const scalar tol=ROOTVSMALL) |
| Inplace normalise the vector by its magnitude. | |
| Vector< float > & | removeCollinear (const Vector< float > &unitVec) |
| Inplace removal of components that are collinear to the given unit vector. | |
| float | inner (const Vector< float > &v2) const |
Scalar-product of this with another Vector. | |
| Vector< float > | cross (const Vector< float > &v2) const |
Cross-product of this with another Vector. | |
| std::enable_if_t< std::is_convertible_v< Cmpt2, float >, void > | operator+= (const Vector< Cmpt2 > &b) |
| Add compatible vector to this. | |
| std::enable_if_t< std::is_convertible_v< Cmpt2, float >, void > | operator-= (const Vector< Cmpt2 > &b) |
| Subtract compatible vector from this. | |
| Public Member Functions inherited from VectorSpace< Form, Cmpt, Ncmpts > | |
| VectorSpace ()=default | |
| Default construct. | |
| VectorSpace (Foam::zero) | |
| Construct initialized to zero. | |
| VectorSpace (const VectorSpace< Form, Cmpt, Ncmpts > &vs) | |
| Copy construct. | |
| template<class Form2, class Cmpt2> | |
| VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &) | |
| Copy construct of a VectorSpace with the same size. | |
| VectorSpace (Istream &is) | |
| Construct from Istream. | |
| const Cmpt & | component (const direction) const |
| Cmpt & | component (const direction) |
| void | component (Cmpt &, const direction) const |
| void | replace (const direction, const Cmpt &) |
| const Cmpt * | cdata () const noexcept |
| Return const pointer to the first data element. | |
| Cmpt * | data () noexcept |
| Return pointer to the first data element. | |
| void | fill (const Cmpt &s) |
| Assign all components to given value. | |
| template<class SubVector, direction BStart> | |
| const ConstBlock< SubVector, BStart > | block () const |
| const Cmpt & | operator[] (const direction) const |
| Cmpt & | operator[] (const direction) |
| void | operator= (const VectorSpace< Form, Cmpt, Ncmpts > &) |
| void | operator+= (const VectorSpace< Form, Cmpt, Ncmpts > &) |
| void | operator-= (const VectorSpace< Form, Cmpt, Ncmpts > &) |
| template<class Form2, class Cmpt2> | |
| void | operator= (const VectorSpace< Form2, Cmpt2, Ncmpts > &) |
| Copy assign from a VectorSpace with the same size. | |
| void | operator= (Foam::zero) |
| void | operator*= (const scalar) |
| void | operator/= (const scalar) |
| iterator | begin () noexcept |
| Return an iterator (pointer) to begin of VectorSpace. | |
| const_iterator | begin () const noexcept |
| Return const_iterator (const pointer) to begin of VectorSpace. | |
| const_iterator | cbegin () const noexcept |
| Return const_iterator (const pointer) to begin of VectorSpace. | |
| iterator | end () noexcept |
| Return an iterator (pointer) to end of VectorSpace. | |
| const_iterator | end () const noexcept |
| Return const_iterator (const pointer) to end of VectorSpace. | |
| const_iterator | cend () const noexcept |
| Return const_iterator (const pointer) to end of VectorSpace. | |
| template<class SubVector, Foam::direction BStart> | |
| const Foam::VectorSpace< Form, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
Additional Inherited Members | |
| Public Types inherited from Vector< float > | |
| typedef Vector< label > | labelType |
| Equivalent type of labels used for valid component indexing. | |
| enum | components |
| Component labeling enumeration. More... | |
| Public Types inherited from VectorSpace< Form, Cmpt, Ncmpts > | |
| typedef VectorSpace< Form, Cmpt, Ncmpts > | vsType |
| VectorSpace type. | |
| typedef Cmpt | cmptType |
| Component type. | |
| typedef Cmpt | magType |
| Magnitude type. | |
| typedef direction | size_type |
| The type to represent the size of a VectorSpace. | |
| typedef Cmpt * | iterator |
| Random access iterator for traversing VectorSpace. | |
| typedef const Cmpt * | const_iterator |
| Random access iterator for traversing VectorSpace. | |
| Static Public Member Functions inherited from Vector< float > | |
| static bool | less_xyz (const Vector< float > &a, const Vector< float > &b) |
| Lexicographically compare a and b with order (x:y:z). | |
| static bool | less_yzx (const Vector< float > &a, const Vector< float > &b) |
| Lexicographically compare a and b with order (y:z:x). | |
| static bool | less_zxy (const Vector< float > &a, const Vector< float > &b) |
| Lexicographically compare a and b with order (z:x:y). | |
| Static Public Member Functions inherited from VectorSpace< Form, Cmpt, Ncmpts > | |
| static constexpr direction | size () noexcept |
| The number of elements in the VectorSpace = Ncmpts. | |
| static Form | uniform (const Cmpt &s) |
| Return a VectorSpace with all elements = s. | |
| Public Attributes inherited from VectorSpace< Form, Cmpt, Ncmpts > | |
| Cmpt | v_ [Ncmpts] |
| The components of this vector space. | |
| Static Public Attributes inherited from Vector< float > | |
| static constexpr direction | rank |
| Rank of Vector is 1. | |
| Static Public Attributes inherited from VectorSpace< Form, Cmpt, Ncmpts > | |
| static constexpr direction | dim = 3 |
| Dimensionality of space. | |
| static constexpr direction | nComponents = Ncmpts |
| Number of components in this vector space. | |
| static constexpr direction | mRows = Ncmpts |
| static constexpr direction | nCols = 1 |
| static const char *const | typeName = "spatialVector" |
| static const char *const | componentNames [] |
| static const Form | zero |
| static const Form | one |
| static const Form | max |
| static const Form | min |
| static const Form | rootMax |
| static const Form | rootMin |
A vertex point or facet normal representation for STL files.
Definition at line 43 of file STLpoint.H.
|
default |
Default construct.
|
inline |
Construct from single-precision point.
Definition at line 59 of file STLpoint.H.
References p, and Vector< float >::Vector().

|
inline |
Construct from double-precision point.
Definition at line 67 of file STLpoint.H.
References p, Vector< float >::Vector(), Vector< float >::x(), Vector< float >::y(), and Vector< float >::z().

|
inline |
Construct from single-precision components.
Definition at line 75 of file STLpoint.H.
References Vector< float >::Vector(), Vector< float >::x(), Vector< float >::y(), and Vector< float >::z().

|
inline |
Construct from double-precision components.
Definition at line 83 of file STLpoint.H.
References Vector< float >::Vector(), Vector< float >::x(), Vector< float >::y(), and Vector< float >::z().
