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

a segment More...

#include <a_segment.h>

+ Inheritance diagram for a_segment:
+ Collaboration diagram for a_segment:

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_segmenttranslate (double x, double y, double z)
 
a_segmentrotate (const a_point &x_axis, const a_point &y_axis, const a_point &z_axis)
 
bool operator== (const a_segment &p)
 
a_segmentoperator= (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_
 

Detailed Description

a segment

Author
P.Smars
Date
2001-2017

Definition at line 28 of file a_segment.h.

Constructor & Destructor Documentation

◆ a_segment() [1/3]

a_segment::a_segment ( )
inline

Definition at line 31 of file a_segment.h.

+ Here is the caller graph for this function:

◆ a_segment() [2/3]

a_segment::a_segment ( const a_point  p1,
const a_point  p2 
)
inline

Definition at line 32 of file a_segment.h.

◆ a_segment() [3/3]

a_segment::a_segment ( const a_segment s)
inline

Definition at line 33 of file a_segment.h.

Member Function Documentation

◆ c()

a_point a_segment::c ( ) const
inline

center of segment

Definition at line 46 of file a_segment.h.

+ Here is the caller graph for this function:

◆ classname()

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

return class name: should be overridden by children classes

Reimplemented from a_geom_base.

Definition at line 35 of file a_segment.h.

◆ closest()

a_point a_segment::closest ( const a_point p) const

point closest to p inside segment

Definition at line 117 of file a_segment.cxx.

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

◆ closestl()

a_point a_segment::closestl ( const a_point p) const

point closest to p on line defined by segment

Definition at line 110 of file a_segment.cxx.

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

◆ dir()

a_point a_segment::dir ( ) const
inline

get direction defined by segment

Definition at line 44 of file a_segment.h.

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

◆ dist() [1/2]

double a_segment::dist ( const a_point p) const

distance betweeen p and segment

Definition at line 134 of file a_segment.cxx.

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

◆ dist() [2/2]

double a_segment::dist ( const a_segment s) const

shortest distance between two segments

Definition at line 370 of file a_segment.cxx.

+ Here is the call graph for this function:

◆ distl() [1/2]

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.

+ Here is the call graph for this function:

◆ distl() [2/2]

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.

+ Here is the call graph for this function:

◆ help()

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

Definition at line 25 of file a_segment.cxx.

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

◆ inertia()

a_mat_sq a_segment::inertia ( ) const

inertia of the segment

Definition at line 81 of file a_segment.cxx.

+ Here is the call graph for this function:

◆ intersect()

a_segment 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

Definition at line 139 of file a_segment.cxx.

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

◆ length()

double a_segment::length ( ) const
inline

Definition at line 57 of file a_segment.h.

+ Here is the caller graph for this function:

◆ operator=()

a_segment & a_segment::operator= ( const a_segment v)

Definition at line 74 of file a_segment.cxx.

+ Here is the call graph for this function:

◆ operator==()

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

Definition at line 69 of file a_segment.cxx.

+ Here is the call graph for this function:

◆ p1() [1/2]

a_point a_segment::p1 ( ) const
inline

get first apex of segment

Definition at line 38 of file a_segment.h.

+ Here is the caller graph for this function:

◆ p1() [2/2]

void a_segment::p1 ( const a_point  v)
inline

set first apex of segment

Definition at line 48 of file a_segment.h.

◆ p2() [1/2]

a_point a_segment::p2 ( ) const
inline

get second apex of segment

Definition at line 40 of file a_segment.h.

+ Here is the caller graph for this function:

◆ p2() [2/2]

void a_segment::p2 ( const a_point  v)
inline

set second apex of segment

Definition at line 50 of file a_segment.h.

◆ project()

double a_segment::project ( const a_point  v) const

Definition at line 103 of file a_segment.cxx.

+ Here is the call graph for this function:

◆ read()

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

read object from stream: should be overridden by children classes

Reimplemented from a_base.

Definition at line 378 of file a_segment.cxx.

◆ rotate()

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.

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

◆ shortest()

a_segment 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

Definition at line 177 of file a_segment.cxx.

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

◆ translate()

a_segment& a_segment::translate ( double  x,
double  y,
double  z 
)
inline

Definition at line 51 of file a_segment.h.

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

◆ vec()

a_point a_segment::vec ( ) const
inline

get vector between the two apices

Definition at line 42 of file a_segment.h.

+ Here is the caller graph for this function:

◆ write()

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

write object to stream: should be overridden by children classes

Reimplemented from a_base.

Definition at line 384 of file a_segment.cxx.

+ Here is the call graph for this function:

Member Data Documentation

◆ p1_

a_point a_segment::p1_
protected

Definition at line 93 of file a_segment.h.

◆ p2_

a_point a_segment::p2_
protected

Definition at line 94 of file a_segment.h.


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