Points&Forces (core)
Software tools facilitating the task of surveying architecture
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
a_triangle Class Reference

a triangle More...

#include <a_triangle.h>

+ Inheritance diagram for a_triangle:
+ Collaboration diagram for a_triangle:

Public Member Functions

 a_triangle ()
 
 a_triangle (const a_point &p1, const a_point &p2, const a_point &p3)
 
 a_triangle (const a_triangle &p)
 
virtual const std::string classname ()
 
a_point p1 () const
 
a_point p2 () const
 
a_point p3 () const
 
a_point operator[] (const int i) const
 
a_point p (const int i) const
 
void p1 (const a_point &v)
 
void p2 (const a_point &v)
 
void p3 (const a_point &v)
 
void set (const a_point &p1, const a_point &p2, const a_point &p3)
 
a_segment s1 () const
 get first segment of triangle More...
 
a_segment s2 () const
 get second segment of triangle More...
 
a_segment s3 () const
 get third segment of triangle More...
 
a_segment s (const int ref) const
 get segment i (0-2) of triangle More...
 
a_point c () const
 get centre of gravity More...
 
a_triangletranslate (double x, double y, double z)
 
a_trianglerotate (const a_point &x_axis, const a_point &y_axis, const a_point &z_axis)
 
a_triangleinvert ()
 
a_point normal () const
 
double S () const
 
a_triangle shape () const
 triangle with same shape but with centre of gravity at origin More...
 
a_mat_sq coord () const
 cordinates of the triangle as a 3x3 matrix More...
 
a_mat_sq inertia () const
 inertia of the triangle 3x3 matrix More...
 
bool contains (const a_point &p) const
 check whether point lies inside triangle More...
 
a_point closest (const a_point &p) const
 triangle point closest to p More...
 
a_point closestp (const a_point &p) const
 point of plane defined by triangle closest to p More...
 
double dist (const a_point &p) const
 distance between p and triangle More...
 
double distp (const a_point &p) const
 distance between p and plane defined by triangle More...
 
a_segment intersect (const a_segment &s) const
 intersection of triangle with a segment More...
 
double min_edge () const
 length of smallest segment More...
 
double max_edge () const
 length of longest segment More...
 
double quality () const
 quality: ratio between smaller and bigger segment More...
 
bool operator== (const a_triangle &p)
 
a_triangleoperator= (const a_triangle &p)
 
virtual void read (std::istream &i)
 
virtual void write (std::ostream &o) const
 
- Public Member Functions inherited from a_base
 a_base ()
 
void read (const std::string &file_in)
 
void write (const std::string &file_out) const
 
void small (double tol)
 
double small () const
 

Static Public Member Functions

static const std::string help ()
 
- Static Public Member Functions inherited from a_geom_base
static const std::string help ()
 
- Static Public Member Functions inherited from a_base
static const std::string help ()
 

Protected Attributes

a_point p1_
 
a_point p2_
 
a_point p3_
 
- Protected Attributes inherited from a_base
double verysmall_
 

Detailed Description

a triangle

Author
P.Smars
Date
2002-2019

Definition at line 30 of file a_triangle.h.

Constructor & Destructor Documentation

◆ a_triangle() [1/3]

a_triangle::a_triangle ( )
inline

Definition at line 33 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ a_triangle() [2/3]

a_triangle::a_triangle ( const a_point p1,
const a_point p2,
const a_point p3 
)
inline

Definition at line 34 of file a_triangle.h.

◆ a_triangle() [3/3]

a_triangle::a_triangle ( const a_triangle p)
inline

Definition at line 35 of file a_triangle.h.

+ Here is the call graph for this function:

Member Function Documentation

◆ c()

a_point a_triangle::c ( ) const
inline

get centre of gravity

Definition at line 61 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ classname()

virtual const std::string a_triangle::classname ( )
inlinevirtual

return class name: should be overridden by children classes

Reimplemented from a_geom_base.

Definition at line 37 of file a_triangle.h.

◆ closest()

a_point a_triangle::closest ( const a_point p) const

triangle point closest to p

Definition at line 201 of file a_triangle.cxx.

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

◆ closestp()

a_point a_triangle::closestp ( const a_point p) const

point of plane defined by triangle closest to p

Definition at line 195 of file a_triangle.cxx.

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

◆ contains()

bool a_triangle::contains ( const a_point p) const

check whether point lies inside triangle

check whether point is in plane

change coordinate system (p1: origin, p2,p3: axis)

coordinates of p in new coordinate system

Definition at line 168 of file a_triangle.cxx.

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

◆ coord()

a_mat_sq a_triangle::coord ( ) const

cordinates of the triangle as a 3x3 matrix

Definition at line 118 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ dist()

double a_triangle::dist ( const a_point p) const

distance between p and triangle

Definition at line 222 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ distp()

double a_triangle::distp ( const a_point p) const

distance between p and plane defined by triangle

Definition at line 227 of file a_triangle.cxx.

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

◆ help()

const std::string a_triangle::help ( )
static

Definition at line 24 of file a_triangle.cxx.

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

◆ inertia()

a_mat_sq a_triangle::inertia ( ) const

inertia of the triangle 3x3 matrix

Definition at line 130 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ intersect()

a_segment a_triangle::intersect ( const a_segment s) const

intersection of triangle with a segment

check whether points are on plane of triangle

at least one point not in plane intersection cannot be a segment

segment fully inside

segment apices outside

one apex inside, set it to p1

Definition at line 232 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ invert()

a_triangle & a_triangle::invert ( )

Definition at line 94 of file a_triangle.cxx.

+ Here is the caller graph for this function:

◆ max_edge()

double a_triangle::max_edge ( ) const

length of longest segment

Definition at line 291 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ min_edge()

double a_triangle::min_edge ( ) const

length of smallest segment

Definition at line 279 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ normal()

a_point a_triangle::normal ( ) const

Definition at line 102 of file a_triangle.cxx.

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

◆ operator=()

a_triangle & a_triangle::operator= ( const a_triangle p)

Definition at line 63 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ operator==()

bool a_triangle::operator== ( const a_triangle p)

Definition at line 58 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ operator[]()

a_point a_triangle::operator[] ( const int  i) const
inline

Definition at line 43 of file a_triangle.h.

◆ p()

a_point a_triangle::p ( const int  i) const
inline

Definition at line 44 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ p1() [1/2]

a_point a_triangle::p1 ( ) const
inline

Definition at line 40 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ p1() [2/2]

void a_triangle::p1 ( const a_point v)
inline

Definition at line 47 of file a_triangle.h.

◆ p2() [1/2]

a_point a_triangle::p2 ( ) const
inline

Definition at line 41 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ p2() [2/2]

void a_triangle::p2 ( const a_point v)
inline

Definition at line 48 of file a_triangle.h.

◆ p3() [1/2]

a_point a_triangle::p3 ( ) const
inline

Definition at line 42 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ p3() [2/2]

void a_triangle::p3 ( const a_point v)
inline

Definition at line 49 of file a_triangle.h.

◆ quality()

double a_triangle::quality ( ) const

quality: ratio between smaller and bigger segment

Definition at line 303 of file a_triangle.cxx.

+ Here is the call graph for this function:

◆ read()

void a_triangle::read ( std::istream &  i)
virtual

read object from stream: should be overridden by children classes

Reimplemented from a_base.

Definition at line 324 of file a_triangle.cxx.

◆ rotate()

a_triangle & a_triangle::rotate ( const a_point x_axis,
const a_point y_axis,
const a_point z_axis 
)

Definition at line 86 of file a_triangle.cxx.

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

◆ S()

double a_triangle::S ( ) const

Definition at line 107 of file a_triangle.cxx.

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

◆ s()

a_segment a_triangle::s ( const int  ref) const

get segment i (0-2) of triangle

Definition at line 71 of file a_triangle.cxx.

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

◆ s1()

a_segment a_triangle::s1 ( ) const
inline

get first segment of triangle

Definition at line 53 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ s2()

a_segment a_triangle::s2 ( ) const
inline

get second segment of triangle

Definition at line 55 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ s3()

a_segment a_triangle::s3 ( ) const
inline

get third segment of triangle

Definition at line 57 of file a_triangle.h.

+ Here is the caller graph for this function:

◆ set()

void a_triangle::set ( const a_point p1,
const a_point p2,
const a_point p3 
)
inline

Definition at line 50 of file a_triangle.h.

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

◆ shape()

a_triangle a_triangle::shape ( ) const

triangle with same shape but with centre of gravity at origin

Definition at line 112 of file a_triangle.cxx.

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

◆ translate()

a_triangle & a_triangle::translate ( double  x,
double  y,
double  z 
)

Definition at line 78 of file a_triangle.cxx.

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

◆ write()

void a_triangle::write ( std::ostream &  o) const
virtual

write object to stream: should be overridden by children classes

Reimplemented from a_base.

Definition at line 331 of file a_triangle.cxx.

+ Here is the call graph for this function:

Member Data Documentation

◆ p1_

a_point a_triangle::p1_
protected

Definition at line 99 of file a_triangle.h.

◆ p2_

a_point a_triangle::p2_
protected

Definition at line 100 of file a_triangle.h.

◆ p3_

a_point a_triangle::p3_
protected

Definition at line 101 of file a_triangle.h.


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