25 #include "a_trianglecloud.h"
34 static const std::string
help();
40 a_point *
g()
const {
return g_;}
42 virtual double V()
const = 0;
46 virtual a_point
cl()
const = 0;
47 virtual std::string
name()
const {
return "a_block";}
81 virtual int nvt()
const = 0;
85 virtual int nit()
const = 0;
91 a_point *
v(
const int i);
93 a_point *
v(
const int i)
const;
95 virtual a_point
v3d(
const int i)
const = 0;
103 void place(
const int fi,
a_block * block,
const int fe,
double u,
double v);
105 std::vector<int>
in()
const;
107 std::vector<int>
out()
const;
121 virtual void read(std::istream &
i);
122 virtual void write(std::ostream &o)
const;
126 virtual void writeb(std::ostream &o)
const = 0;
128 virtual void writeg(std::ostream &o)
const = 0;
131 virtual void writefaces(std::ostream &o,
const int base = 0)
const = 0;
a_block * compute()
compute the exit force from all the forces on the block, return next block or 0 if last one or proble...
virtual void writefaces(std::ostream &o, const int base=0) const =0
write a triangle file description of the block
static const std::string help()
get information about the class
double potential() const
potential energy
virtual void copy(const a_block &)
int entrance(int ref)
set exit face specifying where the force enters
void clearinternal()
clear all the internal face forces
a_wrench W() const
weight wrench in world coordinate
a_point * g() const
get gravity
virtual void write(std::ostream &o) const
friend std::ostream & operator<<(std::ostream &o, const a_block &b)
void av(a_point *vertex)
add a vertex
a_wrench fe() const
external force on block in world coordinate
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
void writeverts(std::ostream &o) const
std::vector< int > in() const
return inside faces
void g(a_point *g)
set gravity
void clearall()
clear all the forces on faces
std::vector< a_point * > vertices_
virtual void writeb(std::ostream &o) const =0
write a blender description of the block
double penalty() const
penalty value used for optimization
virtual void trianglecloud(a_trianglecloud &) const =0
a_wrench ft() const
total force on block in world coordinate
a_point c() const
centre of mass (in world coordinate)
virtual int nit() const =0
get number of faces (not only the reference faces)
virtual std::string name() const
a_face * i(const int i)
get pointer to face
bool ok() const
check if forces on face are acceptable
void criteria(a_fcriteria *criteria)
set resistance criteria
virtual a_point v3d(const int i) const =0
get vertex (world coordinate, 3D)
int ni() const
get number of faces
virtual void writeg(std::ostream &o) const =0
write a brlcad description of the block
virtual void writetri(std::ostream &o) const =0
write a triangle face representation of the block
a_twist * pos() const
get pointer to position handle
void ai(a_face *face)
add a face
std::vector< a_face * > faces_
void clearexternal()
clear all the external face forces
a_point * v(const int i)
get pointer to vertex
friend std::istream & operator>>(std::istream &i, a_block &b)
virtual a_point cl() const =0
centre of mass (in local system)
int exit() const
get exit face
virtual void deepcopy(const a_block &)
virtual int nvt() const =0
get number of vertices (not only the reference vertices)
virtual void read(std::istream &i)
input/output
int nv() const
get number of vertices
std::vector< int > out() const
return outside faces
virtual double V() const =0
volume of the block
a_material * material() const
get pointer to material
a_block * nextblock() const
block connected (return 0 if end or problem)