35 #ifndef COMPUTE_INTERSECTION_H_ 36 #define COMPUTE_INTERSECTION_H_ 53 static const double plucker_empty = std::numeric_limits<double>::infinity();
116 plucker_coordinates_abscissa_ = p;
124 plucker_coordinates_triangle_[side_idx] = p;
129 return plucker_coordinates_abscissa_;
136 return plucker_coordinates_triangle_[side_idx];
144 { plucker_products_[side_idx] = number; };
151 {
return plucker_products_[side_idx]; };
166 int check_abscissa_topology(IPAux12& IP);
169 void print_plucker_coordinates(std::ostream &os);
180 void compute_plucker_products();
194 bool compute_plucker(IPAux12 &IP,
const arma::vec3 &local);
202 bool compute_degenerate(
unsigned int side_idx, IPAux12 &IP);
277 plucker_coordinates_[side_idx] = p;
285 plucker_coordinates_[3 + side_idx] = p;
290 return plucker_coordinates_[side_idx];
295 return plucker_coordinates_[3 + side_idx];
304 plucker_products_[sideA_idx*3 + sideB_idx] = number;
308 return plucker_products_[sideA_idx*3 + sideB_idx];
313 void print_plucker_coordinates(std::ostream &os);
315 void print_plucker_coordinates_tree(std::ostream &os);
391 plucker_coordinates_abscissa_ = p;
399 plucker_coordinates_tetrahedron[edge_idx] = p;
404 return plucker_coordinates_abscissa_;
409 return plucker_coordinates_tetrahedron[edge_idx];
417 plucker_products_[edge_idx] = number;
421 return plucker_products_[edge_idx];
426 void print_plucker_coordinates(std::ostream &os);
428 void print_plucker_coordinates_tree(std::ostream &os);
439 void correct_tetrahedron_ip_topology(
double t,
unsigned int i,
std::vector<IPAux> &ip);
503 void print_plucker_coordinates(std::ostream &os);
505 void print_plucker_coordinates_tree(std::ostream &os);
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);
561 #endif // COMPUTE_INTERSECTION_H_ void set_plucker_product(double *number, unsigned int side_idx)
Sets the Plucker product of abscissa and triangle side (use if computed before).
void set_plucker_product(double *number, unsigned edge_idx)
Sets the pointer to Plucker product of abscissa and tetrahedron edge.
double * get_plucker_product(unsigned int side_idx)
Getter for Plucker product of abscissa and triangle side.
void set_pc_triaB(Plucker *p, unsigned int side_idx)
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of pointers to plucker coordinates of tetrahedron edges.
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and triangle side.
IntersectionPointAux< 1, 2 > IPAux12
bool is_computed()
Gets true if the intersection has been computed already (e.g. in case of IP in vertex).
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of pointers to plucker coordinates of triangle sides.
bool computed_
Flag 'computed'; is true if intersection has been computed already.
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
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
Plucker * get_pc_triaA(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle A side of given side_idx. ...
std::vector< Plucker * > plucker_coordinates_
Pointers to plucker coordinates of sides of both triangles [triaA[3], triaB[3]], size 6...
const unsigned int no_idx
Plucker * get_pc_tetrahedron(unsigned int edge_idx)
Gets the pointer to Plucker coordinates of the tetrahedron edge of given edge_idx.
std::vector< unsigned int > IP_next
double * get_plucker_product(unsigned edge_idx)
Gets the pointer to Plucker product of abscissa and tetrahedron edge of given edge_idx.
static unsigned int normal_orientation(unsigned int sid)
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of Plucker coordinates for tetrahedron edges.
IntersectionPointAux< 2, 3 > IPAux23
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
std::vector< unsigned int > object_next
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...
Class for 1D-2D intersections.
IntersectionPointAux< 2, 2 > IPAux22
void set_pc_triaA(Plucker *p, unsigned int side_idx)
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
IntersectionPointAux< 1, 2 > IPAux12
Plucker * get_pc_triaB(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle B side of given side_idx. ...
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of Plucker coordinates for triangle side.
void set_plucker_product(double *number, unsigned sideA_idx, unsigned int sideB_idx)
void set_computed()
Sets the 'computed' flag true. Means that intersection has been computed already (e.g. in case of IP in vertex).
std::array< uint, 2 > FacePair
const std::vector< std::vector< arma::uvec > > on_faces
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
std::vector< IPAux23 > IP23_list
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
IntersectionAux< 2, 3 > * intersection_
IntersectionPointAux< 1, 2 > IPAux12
static const double plucker_empty
Auxiliary value for Plucker product. If equal this value, it is supposed not to be set yet...
std::vector< unsigned int > s3_dim_starts
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc...
void set_pc_triangle(Plucker *p, unsigned int side_idx)
Sets the pointer to Plucker coordinates of the triangle side.
std::vector< IPAux12 > IP12s_
Internal auxiliary class representing intersection object of simplex<dimA> and simplex<dimB>.
std::vector< double * > plucker_products_
Vector of pointers to Plucker products of triangle sides and tetrahedron edges.
IntersectionPointAux< 1, 3 > IPAux
Internal class representing intersection point.
Plucker coordinates representing line given by points A,B.
std::vector< double * > plucker_products_
Pointers to Plucker products of triangles sides [3x[sideA x triaB]]], size 9.
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.
IntersectionPointAux< 1, 3 > IPAux13
double signed_plucker_product(unsigned int i)