Points&Forces (survey)
Software tools facilitating the task of surveying architecture
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
a_block Class Referenceabstract

#include <a_block.h>

+ Inheritance diagram for a_block:
+ Collaboration diagram for a_block:

Classes

class  compatibility_error
 
class  no_block_error
 

Public Member Functions

 a_block ()
 
virtual ~a_block ()
 
void clear ()
 
virtual void copy (const a_block &)
 
virtual void deepcopy (const a_block &)
 
void g (a_point *g)
 set gravity More...
 
a_point * g () const
 get gravity More...
 
virtual double V () const =0
 volume of the block More...
 
a_point c () const
 centre of mass (in world coordinate) More...
 
virtual a_point cl () const =0
 centre of mass (in local system) More...
 
virtual std::string name () const
 
double m () const
 mass More...
 
double Ws () const
 weight More...
 
a_wrench W () const
 weight wrench in world coordinate More...
 
a_wrench fe () const
 external force on block in world coordinate More...
 
a_wrench ft () const
 total force on block in world coordinate More...
 
a_wrench W (const a_block &be) const
 compute the weight (in world coordinate) of block connected up to block be (included) More...
 
a_wrench ft (const a_block &be) const
 compute the total force (in world coordinate) of block connected up to block be (included) More...
 
a_blocknextblock () const
 block connected (return 0 if end or problem) More...
 
double potential () const
 potential energy More...
 
void clearinternal ()
 clear all the internal face forces More...
 
void clearexternal ()
 clear all the external face forces More...
 
void clearall ()
 clear all the forces on faces More...
 
a_blockcompute ()
 compute the exit force from all the forces on the block, return next block or 0 if last one or problem More...
 
void material (a_material *material)
 link a material More...
 
a_materialmaterial () const
 get pointer to material More...
 
int nv () const
 get number of vertices More...
 
virtual int nvt () const =0
 get number of vertices (not only the reference vertices) More...
 
int ni () const
 get number of faces More...
 
virtual int nit () const =0
 get number of faces (not only the reference faces) More...
 
void av (a_point *vertex)
 add a vertex More...
 
void ai (a_face *face)
 add a face More...
 
a_point * v (const int i)
 get pointer to vertex More...
 
a_point * v (const int i) const
 get pointer to vertex More...
 
virtual a_point v3d (const int i) const =0
 get vertex (world coordinate, 3D) More...
 
a_facei (const int i)
 get pointer to face More...
 
a_facei (const int i) const
 get pointer to face More...
 
a_twistpos () const
 get pointer to position handle More...
 
void place (const int fi, a_block *block, const int fe, double u, double v)
 place a face of the block on the face of another block More...
 
std::vector< int > in () const
 return inside faces More...
 
std::vector< int > out () const
 return outside faces More...
 
void exit (int ref)
 set exit face More...
 
int exit () const
 get exit face More...
 
int entrance (int ref)
 set exit face specifying where the force enters More...
 
void criteria (a_fcriteria *criteria)
 set resistance criteria More...
 
bool ok () const
 check if forces on face are acceptable More...
 
double penalty () const
 penalty value used for optimization More...
 
virtual void read (std::istream &i)
 input/output More...
 
virtual void write (std::ostream &o) const
 
virtual void writetri (std::ostream &o) const =0
 write a triangle face representation of the block More...
 
virtual void writeb (std::ostream &o) const =0
 write a blender description of the block More...
 
virtual void writeg (std::ostream &o) const =0
 write a brlcad description of the block More...
 
void writeverts (std::ostream &o) const
 
virtual void writefaces (std::ostream &o, const int base=0) const =0
 write a triangle file description of the block More...
 
virtual void trianglecloud (a_trianglecloud &) const =0
 

Static Public Member Functions

static const std::string help ()
 get information about the class More...
 

Protected Attributes

std::vector< a_point * > vertices_
 
std::vector< a_face * > faces_
 
a_materialmaterial_
 
bool material_auto_
 
int exit_face_
 
a_twistpos_
 
a_point * g_
 

Friends

std::istream & operator>> (std::istream &i, a_block &b)
 
std::ostream & operator<< (std::ostream &o, const a_block &b)
 

Detailed Description

Definition at line 27 of file a_block.h.

Constructor & Destructor Documentation

◆ a_block()

a_block::a_block ( )

Definition at line 21 of file a_block.cxx.

+ Here is the call graph for this function:

◆ ~a_block()

a_block::~a_block ( )
virtual

Definition at line 31 of file a_block.cxx.

+ Here is the call graph for this function:

Member Function Documentation

◆ ai()

void a_block::ai ( a_face face)
inline

add a face

Definition at line 89 of file a_block.h.

◆ av()

void a_block::av ( a_point *  vertex)
inline

add a vertex

Definition at line 87 of file a_block.h.

+ Here is the caller graph for this function:

◆ c()

a_point a_block::c ( ) const

centre of mass (in world coordinate)

Definition at line 162 of file a_block.cxx.

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

◆ cl()

virtual a_point a_block::cl ( ) const
pure virtual

centre of mass (in local system)

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

+ Here is the caller graph for this function:

◆ clear()

void a_block::clear ( )

Definition at line 37 of file a_block.cxx.

+ Here is the caller graph for this function:

◆ clearall()

void a_block::clearall ( )

clear all the forces on faces

Definition at line 273 of file a_block.cxx.

+ Here is the call graph for this function:

◆ clearexternal()

void a_block::clearexternal ( )

clear all the external face forces

Definition at line 263 of file a_block.cxx.

+ Here is the call graph for this function:

◆ clearinternal()

void a_block::clearinternal ( )

clear all the internal face forces

Definition at line 253 of file a_block.cxx.

+ Here is the call graph for this function:

◆ compute()

a_block * a_block::compute ( )

compute the exit force from all the forces on the block, return next block or 0 if last one or problem

Definition at line 310 of file a_block.cxx.

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

◆ copy()

void a_block::copy ( const a_block b)
virtual

Definition at line 99 of file a_block.cxx.

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

◆ criteria()

void a_block::criteria ( a_fcriteria criteria)

set resistance criteria

Definition at line 282 of file a_block.cxx.

+ Here is the call graph for this function:

◆ deepcopy()

void a_block::deepcopy ( const a_block b)
virtual

Definition at line 110 of file a_block.cxx.

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

◆ entrance()

int a_block::entrance ( int  ref)

set exit face specifying where the force enters

Definition at line 409 of file a_block.cxx.

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

◆ exit() [1/2]

int a_block::exit ( ) const
inline

get exit face

Definition at line 111 of file a_block.h.

+ Here is the caller graph for this function:

◆ exit() [2/2]

void a_block::exit ( int  ref)

set exit face

Definition at line 397 of file a_block.cxx.

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

◆ fe()

a_wrench a_block::fe ( ) const

external force on block in world coordinate

Definition at line 186 of file a_block.cxx.

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

◆ ft() [1/2]

a_wrench a_block::ft ( ) const

total force on block in world coordinate

Definition at line 200 of file a_block.cxx.

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

◆ ft() [2/2]

a_wrench a_block::ft ( const a_block be) const

compute the total force (in world coordinate) of block connected up to block be (included)

Definition at line 218 of file a_block.cxx.

+ Here is the call graph for this function:

◆ g() [1/2]

a_point* a_block::g ( ) const
inline

get gravity

Definition at line 40 of file a_block.h.

+ Here is the caller graph for this function:

◆ g() [2/2]

void a_block::g ( a_point *  g)
inline

set gravity

Definition at line 38 of file a_block.h.

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

◆ help()

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

get information about the class

Definition at line 46 of file a_block.cxx.

+ Here is the caller graph for this function:

◆ i() [1/2]

a_face * a_block::i ( const int  i)

get pointer to face

Definition at line 148 of file a_block.cxx.

+ Here is the caller graph for this function:

◆ i() [2/2]

a_face * a_block::i ( const int  i) const

get pointer to face

Definition at line 155 of file a_block.cxx.

+ Here is the call graph for this function:

◆ in()

std::vector< int > a_block::in ( ) const

return inside faces

Definition at line 373 of file a_block.cxx.

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

◆ m()

double a_block::m ( ) const

mass

Definition at line 167 of file a_block.cxx.

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

◆ material() [1/2]

a_material* a_block::material ( ) const
inline

get pointer to material

Definition at line 77 of file a_block.h.

+ Here is the caller graph for this function:

◆ material() [2/2]

void a_block::material ( a_material material)

link a material

Definition at line 124 of file a_block.cxx.

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

◆ name()

virtual std::string a_block::name ( ) const
inlinevirtual

Reimplemented in a_block_2d5, a_block_2d4, and a_block_2d3.

Definition at line 47 of file a_block.h.

+ Here is the caller graph for this function:

◆ nextblock()

a_block * a_block::nextblock ( ) const

block connected (return 0 if end or problem)

Definition at line 229 of file a_block.cxx.

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

◆ ni()

int a_block::ni ( ) const
inline

get number of faces

Definition at line 83 of file a_block.h.

+ Here is the caller graph for this function:

◆ nit()

virtual int a_block::nit ( ) const
pure virtual

get number of faces (not only the reference faces)

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

◆ nv()

int a_block::nv ( ) const
inline

get number of vertices

Definition at line 79 of file a_block.h.

+ Here is the caller graph for this function:

◆ nvt()

virtual int a_block::nvt ( ) const
pure virtual

get number of vertices (not only the reference vertices)

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

+ Here is the caller graph for this function:

◆ ok()

bool a_block::ok ( ) const

check if forces on face are acceptable

Definition at line 288 of file a_block.cxx.

+ Here is the call graph for this function:

◆ out()

std::vector< int > a_block::out ( ) const

return outside faces

Definition at line 385 of file a_block.cxx.

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

◆ penalty()

double a_block::penalty ( ) const

penalty value used for optimization

Definition at line 298 of file a_block.cxx.

+ Here is the call graph for this function:

◆ place()

void a_block::place ( const int  fi,
a_block block,
const int  fe,
double  u,
double  v 
)

place a face of the block on the face of another block

Definition at line 355 of file a_block.cxx.

+ Here is the call graph for this function:

◆ pos()

a_twist* a_block::pos ( ) const
inline

get pointer to position handle

Definition at line 101 of file a_block.h.

+ Here is the caller graph for this function:

◆ potential()

double a_block::potential ( ) const

potential energy

Definition at line 246 of file a_block.cxx.

+ Here is the call graph for this function:

◆ read()

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

input/output

Reimplemented in a_block_2d5, a_block_2d4, and a_block_2d3.

Definition at line 449 of file a_block.cxx.

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

◆ trianglecloud()

virtual void a_block::trianglecloud ( a_trianglecloud &  ) const
pure virtual

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

◆ V()

virtual double a_block::V ( ) const
pure virtual

volume of the block

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

+ Here is the caller graph for this function:

◆ v() [1/2]

a_point * a_block::v ( const int  i)

get pointer to vertex

Definition at line 134 of file a_block.cxx.

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

◆ v() [2/2]

a_point * a_block::v ( const int  i) const

get pointer to vertex

Definition at line 141 of file a_block.cxx.

+ Here is the call graph for this function:

◆ v3d()

virtual a_point a_block::v3d ( const int  i) const
pure virtual

get vertex (world coordinate, 3D)

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

+ Here is the caller graph for this function:

◆ W() [1/2]

a_wrench a_block::W ( ) const

weight wrench in world coordinate

Definition at line 178 of file a_block.cxx.

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

◆ W() [2/2]

a_wrench a_block::W ( const a_block be) const

compute the weight (in world coordinate) of block connected up to block be (included)

Definition at line 207 of file a_block.cxx.

+ Here is the call graph for this function:

◆ write()

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

Reimplemented in a_block_2d5, a_block_2d4, and a_block_2d3.

Definition at line 473 of file a_block.cxx.

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

◆ writeb()

virtual void a_block::writeb ( std::ostream &  o) const
pure virtual

write a blender description of the block

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

◆ writefaces()

virtual void a_block::writefaces ( std::ostream &  o,
const int  base = 0 
) const
pure virtual

write a triangle file description of the block

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

◆ writeg()

virtual void a_block::writeg ( std::ostream &  o) const
pure virtual

write a brlcad description of the block

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

◆ writetri()

virtual void a_block::writetri ( std::ostream &  o) const
pure virtual

write a triangle face representation of the block

Implemented in a_block_2d5, a_block_2d4, and a_block_2d3.

◆ writeverts()

void a_block::writeverts ( std::ostream &  o) const

Definition at line 488 of file a_block.cxx.

+ Here is the call graph for this function:

◆ Ws()

double a_block::Ws ( ) const

weight

Definition at line 172 of file a_block.cxx.

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

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const a_block b 
)
friend

Definition at line 502 of file a_block.cxx.

◆ operator>>

std::istream& operator>> ( std::istream &  i,
a_block b 
)
friend

Definition at line 496 of file a_block.cxx.

Member Data Documentation

◆ exit_face_

int a_block::exit_face_
protected

Definition at line 145 of file a_block.h.

◆ faces_

std::vector<a_face *> a_block::faces_
protected

Definition at line 142 of file a_block.h.

◆ g_

a_point* a_block::g_
protected

Definition at line 147 of file a_block.h.

◆ material_

a_material* a_block::material_
protected

Definition at line 143 of file a_block.h.

◆ material_auto_

bool a_block::material_auto_
protected

Definition at line 144 of file a_block.h.

◆ pos_

a_twist* a_block::pos_
protected

Definition at line 146 of file a_block.h.

◆ vertices_

std::vector<a_point *> a_block::vertices_
protected

Definition at line 141 of file a_block.h.


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