Loading...
Searching...
No Matches
STLtriangle Class Reference

A triangle representation for STL files. More...

#include <STLtriangle.H>

Public Member Functions

 STLtriangle ()=default
 Default construct.
 STLtriangle (const STLpoint &normal, const STLpoint &p0, const STLpoint &p1, const STLpoint &p2, uint16_t attrib)
 Construct from components.
 STLtriangle (std::istream &is)
 Construct from istream (read binary).
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).
void write (std::ostream &os) const
 Write to ostream (binary).
Ostreamprint (Ostream &os) const
 Write to Ostream (ASCII).

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).
static void write (Ostream &os, const point &p0, const point &p1, const point &p2)
 Write components to Ostream (ASCII), calculating the normal.

Friends

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

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.

References attrib(), normal(), and p0.

Referenced by operator<<.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 26 of file STLtriangleI.H.

References attrib(), normal(), and p0.

Here is the call graph for this function:

◆ STLtriangle() [3/3]

STLtriangle ( std::istream & is)
inline

Construct from istream (read binary).

Definition at line 43 of file STLtriangleI.H.

References Foam::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.

References Foam::noexcept.

Referenced by Foam::operator<<(), STLtriangle(), and STLtriangle().

Here is the caller graph for this function:

◆ a()

const STLpoint & a ( ) const
inlinenoexcept

Definition at line 112 of file STLtriangle.H.

References Foam::noexcept.

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.

References Foam::noexcept.

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.

References Foam::noexcept.

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.

References Foam::noexcept.

Referenced by Foam::operator<<(), STLtriangle(), and STLtriangle().

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.

◆ write() [1/3]

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

Write to ostream (binary).

Definition at line 58 of file STLtriangleI.H.

References os().

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 80 of file STLtriangleI.H.

References Foam::nl, os(), p0, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

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 100 of file STLtriangleI.H.

References os(), p0, triangle< point, const point & >::unitNormal(), and write().

Here is the call graph for this function:

◆ operator<<

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

Print triangle contents.

References os(), and STLtriangle().


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