Public Member Functions | Private Types | Private Attributes | Friends
STLtriangle Class Reference

A triangle representation for STL files. More...

Collaboration diagram for STLtriangle:
Collaboration graph
[legend]

Public Member Functions

 STLtriangle ()
 Construct null. More...
 
 STLtriangle (const STLpoint &normal, const STLpoint &a, const STLpoint &b, const STLpoint &c, unsigned short region)
 Construct from components. More...
 
 STLtriangle (istream &)
 Construct from istream (read binary) More...
 
const STLpointa () const
 
const STLpointb () const
 
const STLpointc () const
 
unsigned short region () const
 
void read (istream &)
 Read from istream (binary) More...
 
void write (ostream &)
 Write to istream (binary) More...
 
 STLtriangle ()
 Construct null. More...
 
 STLtriangle (const STLpoint &normal, const STLpoint &a, const STLpoint &b, const STLpoint &c, unsigned short attrib)
 Construct from components. More...
 
 STLtriangle (istream &)
 Construct from istream (read binary) More...
 
const STLpointnormal () const
 
const STLpointa () const
 
const STLpointb () const
 
const STLpointc () const
 
unsigned short attrib () const
 
void read (istream &)
 Read from istream (binary) More...
 
void write (ostream &)
 Write to ostream (binary) More...
 

Private Types

typedef unsigned short STLattrib
 Attribute is 16-bit. More...
 

Private Attributes

STLpoint normal_
 The face normal, many programs write zore or other junk. More...
 
STLpoint a_
 The three points defining the triangle. More...
 
STLpoint b_
 
STLpoint c_
 
unsigned short region_
 
STLattrib attrib_
 The attribute information could for colour or solid id, etc. More...
 

Friends

Ostreamoperator<< (Ostream &, const STLtriangle &)
 
Ostreamoperator<< (Ostream &, const STLtriangle &)
 

Detailed Description

A triangle representation for STL files.

Source files

Source files

Definition at line 48 of file STLtriangle.H.

Member Typedef Documentation

◆ STLattrib

typedef unsigned short STLattrib
private

Attribute is 16-bit.

Definition at line 55 of file STLtriangle.H.

Constructor & Destructor Documentation

◆ STLtriangle() [1/6]

STLtriangle ( )
inline

Construct null.

Definition at line 36 of file STLtriangleI.H.

◆ STLtriangle() [2/6]

STLtriangle ( const STLpoint normal,
const STLpoint a,
const STLpoint b,
const STLpoint c,
unsigned short  region 
)
inline

Construct from components.

Definition at line 42 of file STLtriangleI.H.

◆ STLtriangle() [3/6]

STLtriangle ( istream &  is)
inline

Construct from istream (read binary)

Construct from istream (binary)

Definition at line 59 of file STLtriangleI.H.

References STLtriangle::read().

Here is the call graph for this function:

◆ STLtriangle() [4/6]

STLtriangle ( )
inline

Construct null.

◆ STLtriangle() [5/6]

STLtriangle ( const STLpoint normal,
const STLpoint a,
const STLpoint b,
const STLpoint c,
unsigned short  attrib 
)
inline

Construct from components.

◆ STLtriangle() [6/6]

STLtriangle ( istream &  )
inline

Construct from istream (read binary)

Member Function Documentation

◆ a() [1/2]

const Foam::STLpoint & a ( ) const
inline

Definition at line 67 of file STLtriangleI.H.

References STLtriangle::a_.

Referenced by STLsurfaceFormatCore::readBINARY(), and triSurface::readSTLBINARY().

Here is the caller graph for this function:

◆ b() [1/2]

const Foam::STLpoint & b ( ) const
inline

Definition at line 72 of file STLtriangleI.H.

References STLtriangle::b_.

Referenced by STLsurfaceFormatCore::readBINARY(), and triSurface::readSTLBINARY().

Here is the caller graph for this function:

◆ c() [1/2]

const Foam::STLpoint & c ( ) const
inline

Definition at line 77 of file STLtriangleI.H.

References STLtriangle::c_.

Referenced by STLsurfaceFormatCore::readBINARY(), and triSurface::readSTLBINARY().

Here is the caller graph for this function:

◆ region()

unsigned short region ( ) const
inline

Definition at line 82 of file STLtriangleI.H.

References STLtriangle::region_.

Referenced by triSurface::readSTLBINARY().

Here is the caller graph for this function:

◆ read() [1/2]

void read ( istream &  is)
inline

Read from istream (binary)

Definition at line 88 of file STLtriangleI.H.

References STLtriangle::region_.

Referenced by STLtriangle::STLtriangle().

Here is the caller graph for this function:

◆ write() [1/2]

void write ( ostream &  os)
inline

Write to istream (binary)

Definition at line 95 of file STLtriangleI.H.

References STLtriangle::region_.

Referenced by STLsurfaceFormat< Face >::writeShell(), and triSurface::writeSTLBINARY().

Here is the caller graph for this function:

◆ normal()

const Foam::STLpoint & normal ( ) const
inline

Definition at line 57 of file STLtriangleI.H.

Referenced by STLsurfaceFormatCore::readBINARY().

Here is the caller graph for this function:

◆ a() [2/2]

const STLpoint& a ( ) const
inline

◆ b() [2/2]

const STLpoint& b ( ) const
inline

◆ c() [2/2]

const STLpoint& c ( ) const
inline

◆ attrib()

unsigned short attrib ( ) const
inline

Definition at line 81 of file STLtriangleI.H.

Referenced by STLsurfaceFormatCore::readBINARY().

Here is the caller graph for this function:

◆ read() [2/2]

void read ( istream &  )
inline

Read from istream (binary)

◆ write() [2/2]

void write ( ostream &  )
inline

Write to ostream (binary)

Friends And Related Function Documentation

◆ operator<< [1/2]

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

Definition at line 103 of file STLtriangleI.H.

◆ operator<< [2/2]

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

Definition at line 103 of file STLtriangleI.H.

Field Documentation

◆ normal_

STLpoint normal_
private

The face normal, many programs write zore or other junk.

Definition at line 52 of file STLtriangle.H.

Referenced by Foam::operator<<().

◆ a_

STLpoint a_
private

The three points defining the triangle.

Definition at line 52 of file STLtriangle.H.

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

◆ b_

STLpoint b_
private

Definition at line 52 of file STLtriangle.H.

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

◆ c_

STLpoint c_
private

Definition at line 52 of file STLtriangle.H.

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

◆ region_

unsigned short region_
private

◆ attrib_

STLattrib attrib_
private

The attribute information could for colour or solid id, etc.

Definition at line 64 of file STLtriangle.H.


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