STLpoint Class Reference

A vertex point or facet normal representation for STL files. More...

Inheritance diagram for STLpoint:
Collaboration diagram for STLpoint:

Public Member Functions

 STLpoint ()=default
 Default construct. More...
 
 STLpoint (const Vector< float > &p)
 Construct from single-precision point. More...
 
 STLpoint (const Vector< double > &p)
 Construct from double-precision point. More...
 
 STLpoint (float x, float y, float z)
 Construct from single-precision components. More...
 
 STLpoint (double x, double y, double z)
 Construct from double-precision components. More...
 
- Public Member Functions inherited from Vector< float >
 Vector ()=default
 Default construct. More...
 
 Vector (const Vector &)=default
 Copy construct. More...
 
 Vector (const Foam::zero)
 Construct initialized to zero. More...
 
 Vector (const VectorSpace< Vector< Cmpt2 >, Cmpt2, 3 > &vs)
 Copy construct from VectorSpace of the same rank. More...
 
 Vector (const float &vx, const float &vy, const float &vz)
 Construct from three components. More...
 
 Vector (Istream &is)
 Construct from Istream. More...
 
Vectoroperator= (const Vector &)=default
 Copy assignment. More...
 
const float & x () const noexcept
 Access to the vector x component. More...
 
float & x () noexcept
 Access to the vector x component. More...
 
const float & y () const noexcept
 Access to the vector y component. More...
 
float & y () noexcept
 Access to the vector y component. More...
 
const float & z () const noexcept
 Access to the vector z component. More...
 
float & z () noexcept
 Access to the vector z component. More...
 
const Vector< float > & centre (const Foam::UList< Vector< float >> &) const noexcept
 Return this (for point which is a typedef to Vector<scalar>) More...
 
scalar mag () const
 The length (L2-norm) of the vector. More...
 
scalar magSqr () const
 The length (L2-norm) squared of the vector. More...
 
scalar dist (const Vector< float > &v2) const
 The L2-norm distance from another vector. The mag() of the difference. More...
 
scalar distSqr (const Vector< float > &v2) const
 The L2-norm distance squared from another vector. The magSqr() of the difference. More...
 
Vector< float > & normalise (const scalar tol=ROOTVSMALL)
 Inplace normalise the vector by its magnitude. More...
 
Vector< float > & removeCollinear (const Vector< float > &unitVec)
 Inplace removal of components that are collinear to the given unit vector. More...
 
float inner (const Vector< float > &v2) const
 Scalar-product of this with another Vector. More...
 
Vector< float > cross (const Vector< float > &v2) const
 Cross-product of this with another Vector. More...
 
- Public Member Functions inherited from VectorSpace< Vector< float >, float, 3 >
 VectorSpace ()=default
 Default construct. More...
 
 VectorSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 VectorSpace (const VectorSpace< Vector< float >, float, Ncmpts > &vs)
 Copy construct. More...
 
 VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &)
 Copy construct of a VectorSpace with the same size. More...
 
 VectorSpace (Istream &is)
 Construct from Istream. More...
 
const float & component (const direction) const
 
float & component (const direction)
 
void component (float &, const direction) const
 
void replace (const direction, const float &)
 
const float * cdata () const noexcept
 Return const pointer to the first data element. More...
 
float * data () noexcept
 Return pointer to the first data element. More...
 
const ConstBlock< SubVector, BStart > block () const
 
const Foam::VectorSpace< Vector< float >, float, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 
const float & operator[] (const direction) const
 
float & operator[] (const direction)
 
void operator= (const VectorSpace< Vector< float >, float, Ncmpts > &)
 
void operator= (const Foam::zero)
 
void operator+= (const VectorSpace< Vector< float >, float, Ncmpts > &)
 
void operator-= (const VectorSpace< Vector< float >, float, Ncmpts > &)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 
iterator begin () noexcept
 Return an iterator to begin of VectorSpace. More...
 
const_iterator begin () const noexcept
 Return const_iterator to begin of VectorSpace. More...
 
iterator end () noexcept
 Return an iterator to end of VectorSpace. More...
 
const_iterator end () const noexcept
 Return const_iterator to end of VectorSpace. More...
 
const_iterator cbegin () const noexcept
 Return const_iterator to begin of VectorSpace. More...
 
const_iterator cend () const noexcept
 Return const_iterator to end of VectorSpace. More...
 

Additional Inherited Members

- Public Types inherited from Vector< float >
enum  components
 Component labeling enumeration. More...
 
typedef Vector< label > labelType
 Equivalent type of labels used for valid component indexing. More...
 
- Public Types inherited from VectorSpace< Vector< float >, float, 3 >
typedef VectorSpace< Vector< float >, float, Ncmpts > vsType
 VectorSpace type. More...
 
typedef float cmptType
 Component type. More...
 
typedef float magType
 Magnitude type. More...
 
typedef float * iterator
 Random access iterator for traversing VectorSpace. More...
 
typedef const float * const_iterator
 Random access iterator for traversing VectorSpace. More...
 
- 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) More...
 
static bool less_yzx (const Vector< float > &a, const Vector< float > &b)
 Lexicographically compare a and b with order (y:z:x) More...
 
static bool less_zxy (const Vector< float > &a, const Vector< float > &b)
 Lexicographically compare a and b with order (z:x:y) More...
 
- Static Public Member Functions inherited from VectorSpace< Vector< float >, float, 3 >
static constexpr direction size () noexcept
 The number of elements in the VectorSpace = Ncmpts. More...
 
static Vector< float > uniform (const float &s)
 Return a VectorSpace with all elements = s. More...
 
- Public Attributes inherited from VectorSpace< Vector< float >, float, 3 >
float v_ [Ncmpts]
 The components of this vector space. More...
 
- Static Public Attributes inherited from Vector< float >
static constexpr direction rank
 Rank of Vector is 1. More...
 
- Static Public Attributes inherited from VectorSpace< Vector< float >, float, 3 >
static constexpr direction dim
 Dimensionality of space. More...
 
static constexpr direction nComponents
 Number of components in this vector space. More...
 
static constexpr direction mRows
 
static constexpr direction nCols
 
static const char *const typeName
 
static const char *const componentNames []
 
static const Vector< float > zero
 
static const Vector< float > one
 
static const Vector< float > max
 
static const Vector< float > min
 
static const Vector< float > rootMax
 
static const Vector< float > rootMin
 

Detailed Description

A vertex point or facet normal representation for STL files.

Definition at line 43 of file STLpoint.H.

Constructor & Destructor Documentation

◆ STLpoint() [1/5]

STLpoint ( )
default

Default construct.

◆ STLpoint() [2/5]

STLpoint ( const Vector< float > &  p)
inline

Construct from single-precision point.

Definition at line 59 of file STLpoint.H.

◆ STLpoint() [3/5]

STLpoint ( const Vector< double > &  p)
inline

Construct from double-precision point.

Definition at line 67 of file STLpoint.H.

◆ STLpoint() [4/5]

STLpoint ( float  x,
float  y,
float  z 
)
inline

Construct from single-precision components.

Definition at line 75 of file STLpoint.H.

◆ STLpoint() [5/5]

STLpoint ( double  x,
double  y,
double  z 
)
inline

Construct from double-precision components.

Definition at line 83 of file STLpoint.H.


The documentation for this class was generated from the following file: