35 #ifndef COMPUTE_INTERSECTION_H_ 36 #define COMPUTE_INTERSECTION_H_ 51 static const double plucker_empty = std::numeric_limits<double>::infinity();
113 plucker_coordinates_abscissa_ = p;
121 plucker_coordinates_triangle_[side_idx] = p;
126 return plucker_coordinates_abscissa_;
133 return plucker_coordinates_triangle_[side_idx];
141 { plucker_products_[side_idx] = number; };
148 {
return plucker_products_[side_idx]; };
158 void print_plucker_coordinates(std::ostream &os);
169 void compute_plucker_products();
268 plucker_coordinates_[side_idx] = p;
276 plucker_coordinates_[3 + side_idx] = p;
281 return plucker_coordinates_[side_idx];
286 return plucker_coordinates_[3 + side_idx];
295 plucker_products_[sideA_idx*3 + sideB_idx] = number;
299 return plucker_products_[sideA_idx*3 + sideB_idx];
304 void print_plucker_coordinates(std::ostream &os);
306 void print_plucker_coordinates_tree(std::ostream &os);
389 plucker_coordinates_abscissa_ = p;
397 plucker_coordinates_tetrahedron[edge_idx] = p;
402 return plucker_coordinates_abscissa_;
407 return plucker_coordinates_tetrahedron[edge_idx];
415 plucker_products_[edge_idx] = number;
419 return plucker_products_[edge_idx];
424 void print_plucker_coordinates(std::ostream &os);
426 void print_plucker_coordinates_tree(std::ostream &os);
437 void correct_tetrahedron_ip_topology(
double t,
unsigned int i,
std::vector<IPAux> &ip);
501 void print_plucker_coordinates(std::ostream &os);
503 void print_plucker_coordinates_tree(std::ostream &os);
539 bool ips_topology_equal(
const IPAux23 &first,
const IPAux23 &second);
540 bool obj_have_back_link(
unsigned int i_obj);
541 auto edge_faces(
uint i_edge) -> FacePair;
542 auto vertex_faces(
uint i_vtx) -> FacePair;
545 inline bool have_backlink(
uint i_obj);
550 inline void set_links(
uint obj_before_ip,
uint ip_idx,
uint obj_after_ip);
559 #endif // COMPUTE_INTERSECTION_H_ std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of pointers to plucker coordinates of tetrahedron edges.
double * get_plucker_product(unsigned sideA_idx, unsigned int sideB_idx)
Gets the pointer to Plucker product of triangle A side sideA_idx and triangle B side sideB_idx...
Plucker * get_pc_triaA(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle A side of given side_idx. ...
bool is_computed()
Gets true if the intersection has been computed already (e.g. in case of IP in vertex).
IntersectionPointAux< 1, 2 > IPAux12
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of pointers to plucker coordinates of triangle sides.
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and tetrahedron edges.
void set_pc_tetrahedron(Plucker *p, unsigned int edge_idx)
Sets the pointer to Plucker coordinates of the tetrahedron edge.
void set_computed()
Sets the 'computed' flag true. Means that intersection has been computed already (e.g. in case of IP in vertex).
void set_pc_triaB(Plucker *p, unsigned int side_idx)
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of Plucker coordinates for triangle side.
bool computed_
Flag 'computed'; is true if intersection has been computed already.
IntersectionPointAux< 1, 3 > IPAux13
double signed_plucker_product(unsigned int i)
void set_plucker_product(double *number, unsigned edge_idx)
Sets the pointer to Plucker product of abscissa and tetrahedron edge.
static unsigned int normal_orientation(unsigned int sid)
std::vector< double * > plucker_products_
Pointers to Plucker products of triangles sides [3x[sideA x triaB]]], size 9.
void set_plucker_product(double *number, unsigned int side_idx)
Sets the Plucker product of abscissa and triangle side (use if computed before).
Plucker * get_pc_triaB(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle B side of given side_idx. ...
IntersectionPointAux< 1, 3 > IPAux
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
IntersectionAux< 2, 3 > * intersection_
std::vector< double * > plucker_products_
Vector of pointers to Plucker products of triangle sides and tetrahedron edges.
const unsigned int no_idx
void set_pc_triaA(Plucker *p, unsigned int side_idx)
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
std::vector< unsigned int > object_next
std::vector< unsigned int > IP_next
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and triangle side.
void set_plucker_product(double *number, unsigned sideA_idx, unsigned int sideB_idx)
std::vector< IPAux23 > IP23_list
Plucker * get_pc_triangle(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle side.
std::vector< unsigned int > s2_dim_starts
double * get_plucker_product(unsigned edge_idx)
Gets the pointer to Plucker product of abscissa and tetrahedron edge of given edge_idx.
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
std::vector< Plucker * > plucker_coordinates_
Pointers to plucker coordinates of sides of both triangles [triaA[3], triaB[3]], size 6...
static const double plucker_empty
Auxiliary value for Plucker product. If equal this value, it is supposed not to be set yet...
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of Plucker coordinates for tetrahedron edges.
std::vector< IPAux12 > IP12s_
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc...
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
std::array< uint, 2 > FacePair
Internal auxiliary class representing intersection object of simplex<dimA> and simplex<dimB>.
Internal class representing intersection point.
double * get_plucker_product(unsigned int side_idx)
Getter for Plucker product of abscissa and triangle side.
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
IntersectionPointAux< 2, 3 > IPAux23
Plucker coordinates representing line given by points A,B.
void set_pc_triangle(Plucker *p, unsigned int side_idx)
Sets the pointer to Plucker coordinates of the triangle side.
std::vector< unsigned int > s3_dim_starts
Plucker * get_pc_tetrahedron(unsigned int edge_idx)
Gets the pointer to Plucker coordinates of the tetrahedron edge of given edge_idx.