Points&Forces (core)
Software tools facilitating the task of surveying architecture
|
a segment More...
#include <a_segment.h>
Classes | |
class | denomin_error |
class | null_segment_error |
Public Member Functions | |
a_segment () | |
a_segment (const a_point p1, const a_point p2) | |
a_segment (const a_segment &s) | |
virtual const std::string | classname () |
a_point | p1 () const |
get first apex of segment More... | |
a_point | p2 () const |
get second apex of segment More... | |
a_point | vec () const |
get vector between the two apices More... | |
a_point | dir () const |
get direction defined by segment More... | |
a_point | c () const |
center of segment More... | |
void | p1 (const a_point v) |
set first apex of segment More... | |
void | p2 (const a_point v) |
set second apex of segment More... | |
a_segment & | translate (double x, double y, double z) |
a_segment & | rotate (const a_point &x_axis, const a_point &y_axis, const a_point &z_axis) |
bool | operator== (const a_segment &p) |
a_segment & | operator= (const a_segment &v) |
double | length () const |
a_mat_sq | inertia () const |
inertia of the segment More... | |
double | project (const a_point v) const |
a_point | closestl (const a_point &p) const |
point closest to p on line defined by segment More... | |
a_point | closest (const a_point &p) const |
point closest to p inside segment More... | |
double | distl (const a_point &p) const |
distance between p and line defined by segment More... | |
double | dist (const a_point &p) const |
distance betweeen p and segment More... | |
a_segment | intersect (const a_segment &s, double &m1, double &m2) const |
intersection between two segments, returns a segment between the closest point between the two lines (l1,l2) defined by the segment also returns the relative position (0-1 if inside segments) of its apices on l1 and l2 More... | |
a_segment | shortest (const a_segment &s, double &m1, double &m2) const |
intersection between two segments, returns a segment between the closest point between the two segments also returns the relative position (always between 0-1) of its apices on the input segments More... | |
double | distl (const a_segment &s) const |
shortest distance between two lines defined by segments More... | |
double | dist (const a_segment &s) const |
shortest distance between two segments More... | |
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_ |
Protected Attributes inherited from a_base | |
double | verysmall_ |
|
inline |
Definition at line 32 of file a_segment.h.
|
inline |
Definition at line 33 of file a_segment.h.
|
inline |
center of segment
Definition at line 46 of file a_segment.h.
|
inlinevirtual |
return class name: should be overridden by children classes
Reimplemented from a_geom_base.
Definition at line 35 of file a_segment.h.
point closest to p inside segment
Definition at line 117 of file a_segment.cxx.
point closest to p on line defined by segment
Definition at line 110 of file a_segment.cxx.
|
inline |
get direction defined by segment
Definition at line 44 of file a_segment.h.
double a_segment::dist | ( | const a_point & | p | ) | const |
distance betweeen p and segment
Definition at line 134 of file a_segment.cxx.
double a_segment::dist | ( | const a_segment & | s | ) | const |
shortest distance between two segments
Definition at line 370 of file a_segment.cxx.
double a_segment::distl | ( | const a_point & | p | ) | const |
distance between p and line defined by segment
Definition at line 129 of file a_segment.cxx.
double a_segment::distl | ( | const a_segment & | s | ) | const |
shortest distance between two lines defined by segments
Definition at line 363 of file a_segment.cxx.
|
static |
Definition at line 25 of file a_segment.cxx.
a_mat_sq a_segment::inertia | ( | ) | const |
inertia of the segment
Definition at line 81 of file a_segment.cxx.
intersection between two segments, returns a segment between the closest point between the two lines (l1,l2) defined by the segment also returns the relative position (0-1 if inside segments) of its apices on l1 and l2
Definition at line 139 of file a_segment.cxx.
|
inline |
bool a_segment::operator== | ( | const a_segment & | p | ) |
|
inline |
get first apex of segment
Definition at line 38 of file a_segment.h.
|
inline |
set first apex of segment
Definition at line 48 of file a_segment.h.
|
inline |
get second apex of segment
Definition at line 40 of file a_segment.h.
|
inline |
set second apex of segment
Definition at line 50 of file a_segment.h.
double a_segment::project | ( | const a_point | v | ) | const |
|
virtual |
read object from stream: should be overridden by children classes
Reimplemented from a_base.
Definition at line 378 of file a_segment.cxx.
a_segment & a_segment::rotate | ( | const a_point & | x_axis, |
const a_point & | y_axis, | ||
const a_point & | z_axis | ||
) |
Definition at line 62 of file a_segment.cxx.
intersection between two segments, returns a segment between the closest point between the two segments also returns the relative position (always between 0-1) of its apices on the input segments
Definition at line 177 of file a_segment.cxx.
|
inline |
Definition at line 51 of file a_segment.h.
|
inline |
get vector between the two apices
Definition at line 42 of file a_segment.h.
|
virtual |
write object to stream: should be overridden by children classes
Reimplemented from a_base.
Definition at line 384 of file a_segment.cxx.
|
protected |
Definition at line 93 of file a_segment.h.
|
protected |
Definition at line 94 of file a_segment.h.