STLtriangle Class Reference

A triangle representation for STL files. More...

Public Member Functions

 STLtriangle ()=default
 Default construct. More...
 
 STLtriangle (const STLpoint &normal, const STLpoint &p0, const STLpoint &p1, const STLpoint &p2, uint16_t attrib)
 Construct from components. More...
 
 STLtriangle (std::istream &is)
 Construct from istream (read binary) More...
 
const STLpointnormal () const noexcept
 
const STLpointa () const noexcept
 
const STLpointb () const noexcept
 
const STLpointc () const noexcept
 
uint16_t attrib () const noexcept
 
void read (std::istream &is)
 Read from istream (binary) More...
 
void write (std::ostream &os) const
 Write to ostream (binary) More...
 
Ostreamprint (Ostream &os) const
 Write to Ostream (ASCII) More...
 

Static Public Member Functions

static void write (Ostream &os, const vector &norm, const point &p0, const point &p1, const point &p2)
 Write components to Ostream (ASCII) More...
 
static void write (Ostream &os, const point &p0, const point &p1, const point &p2)
 Write components to Ostream (ASCII), calculating the normal. More...
 

Friends

Ostreamoperator<< (Ostream &os, const STLtriangle &tri)
 Print triangle contents. More...
 

Detailed Description

A triangle representation for STL files.

Source files

Definition at line 54 of file STLtriangle.H.

Constructor & Destructor Documentation

◆ STLtriangle() [1/3]

STLtriangle ( )
default

Default construct.

◆ STLtriangle() [2/3]

STLtriangle ( const STLpoint normal,
const STLpoint p0,
const STLpoint p1,
const STLpoint p2,
uint16_t  attrib 
)
inline

Construct from components.

Definition at line 27 of file STLtriangleI.H.

◆ STLtriangle() [3/3]

STLtriangle ( std::istream &  is)
inline

Construct from istream (read binary)

Definition at line 43 of file STLtriangleI.H.

References STLtriangle::read().

Here is the call graph for this function:

Member Function Documentation

◆ normal()

const STLpoint& normal ( ) const
inlinenoexcept

Definition at line 111 of file STLtriangle.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ a()

const STLpoint& a ( ) const
inlinenoexcept

Definition at line 112 of file STLtriangle.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ b()

const STLpoint& b ( ) const
inlinenoexcept

Definition at line 113 of file STLtriangle.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ c()

const STLpoint& c ( ) const
inlinenoexcept

Definition at line 114 of file STLtriangle.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ attrib()

uint16_t attrib ( ) const
inlinenoexcept

Definition at line 115 of file STLtriangle.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ read()

void read ( std::istream &  is)
inline

Read from istream (binary)

Definition at line 51 of file STLtriangleI.H.

Referenced by STLtriangle::STLtriangle().

Here is the caller graph for this function:

◆ write() [1/3]

void write ( std::ostream &  os) const
inline

Write to ostream (binary)

Definition at line 58 of file STLtriangleI.H.

References os(), and OBJstream::write().

Here is the call graph for this function:

◆ print()

Foam::Ostream & print ( Ostream os) const
inline

Write to Ostream (ASCII)

Definition at line 65 of file STLtriangleI.H.

References Foam::nl, and os().

Here is the call graph for this function:

◆ write() [2/3]

void write ( Ostream os,
const vector norm,
const point p0,
const point p1,
const point p2 
)
inlinestatic

Write components to Ostream (ASCII)

Definition at line 81 of file STLtriangleI.H.

References Foam::nl, os(), and p0.

Here is the call graph for this function:

◆ write() [3/3]

void write ( Ostream os,
const point p0,
const point p1,
const point p2 
)
inlinestatic

Write components to Ostream (ASCII), calculating the normal.

Definition at line 101 of file STLtriangleI.H.

References os(), p0, triangle< Point, PointRef >::unitNormal(), and Foam::vtk::write().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream os,
const STLtriangle tri 
)
friend

Print triangle contents.


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