Points&Forces (core)
Software tools facilitating the task of surveying architecture
|
a triangle More...
#include <a_triangle.h>
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_triangle & | translate (double x, double y, double z) |
a_triangle & | rotate (const a_point &x_axis, const a_point &y_axis, const a_point &z_axis) |
a_triangle & | invert () |
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_triangle & | operator= (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_ |
|
inline |
Definition at line 34 of file a_triangle.h.
|
inline |
|
inline |
get centre of gravity
Definition at line 61 of file a_triangle.h.
|
inlinevirtual |
return class name: should be overridden by children classes
Reimplemented from a_geom_base.
Definition at line 37 of file a_triangle.h.
triangle point closest to p
Definition at line 201 of file a_triangle.cxx.
point of plane defined by triangle closest to p
Definition at line 195 of file a_triangle.cxx.
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.
a_mat_sq a_triangle::coord | ( | ) | const |
cordinates of the triangle as a 3x3 matrix
Definition at line 118 of file a_triangle.cxx.
double a_triangle::dist | ( | const a_point & | p | ) | const |
distance between p and triangle
Definition at line 222 of file a_triangle.cxx.
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.
|
static |
Definition at line 24 of file a_triangle.cxx.
a_mat_sq a_triangle::inertia | ( | ) | const |
inertia of the triangle 3x3 matrix
Definition at line 130 of file a_triangle.cxx.
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.
a_triangle & a_triangle::invert | ( | ) |
double a_triangle::max_edge | ( | ) | const |
length of longest segment
Definition at line 291 of file a_triangle.cxx.
double a_triangle::min_edge | ( | ) | const |
length of smallest segment
Definition at line 279 of file a_triangle.cxx.
a_point a_triangle::normal | ( | ) | const |
Definition at line 102 of file a_triangle.cxx.
a_triangle & a_triangle::operator= | ( | const a_triangle & | p | ) |
bool a_triangle::operator== | ( | const a_triangle & | p | ) |
|
inline |
Definition at line 43 of file a_triangle.h.
|
inline |
|
inline |
|
inline |
Definition at line 47 of file a_triangle.h.
|
inline |
|
inline |
Definition at line 48 of file a_triangle.h.
|
inline |
|
inline |
Definition at line 49 of file a_triangle.h.
double a_triangle::quality | ( | ) | const |
quality: ratio between smaller and bigger segment
Definition at line 303 of file a_triangle.cxx.
|
virtual |
read object from stream: should be overridden by children classes
Reimplemented from a_base.
Definition at line 324 of file a_triangle.cxx.
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.
double a_triangle::S | ( | ) | const |
Definition at line 107 of file a_triangle.cxx.
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.
|
inline |
get first segment of triangle
Definition at line 53 of file a_triangle.h.
|
inline |
get second segment of triangle
Definition at line 55 of file a_triangle.h.
|
inline |
get third segment of triangle
Definition at line 57 of file a_triangle.h.
Definition at line 50 of file a_triangle.h.
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.
a_triangle & a_triangle::translate | ( | double | x, |
double | y, | ||
double | z | ||
) |
Definition at line 78 of file a_triangle.cxx.
|
virtual |
write object to stream: should be overridden by children classes
Reimplemented from a_base.
Definition at line 331 of file a_triangle.cxx.
|
protected |
Definition at line 99 of file a_triangle.h.
|
protected |
Definition at line 100 of file a_triangle.h.
|
protected |
Definition at line 101 of file a_triangle.h.