Advanced Multi-Physics (AMP)
On-Line Documentation
triangle_t.h
Go to the documentation of this file.
1#ifndef TRIANGLE_T
2#define TRIANGLE_T
3
4#include "AMP/mesh/edge_t.h"
5
6#include <vector>
7
9{
10public:
11 triangle_t( double const *A, double const *B, double const *C );
13 void set_support_points( double const *A, double const *B, double const *C );
14 double const *get_support_point_ptr( unsigned int i ) const;
15 double const *get_normal();
16 double const *get_centroid();
17 edge_t *get_edge( unsigned int i );
18 bool above_point( double const *point, double tolerance = 1.0e-12 );
19 bool contains_point( double const *point, double tolerance = 1.0e-12 );
20 int project_point( double const *point, double *projection, double tolerance = 1.0e-12 );
21
22private:
24 double const *support_points_ptr[3];
25 std::vector<double> normal;
26 std::vector<double> centroid;
27 std::vector<double> tmp;
31
36 double compute_distance_to_containing_plane( double const *point );
37};
38
39int project_point_onto_collection_of_triangles( unsigned int n_triangles,
40 triangle_t **triangle_ptr,
41 double const *point,
42 double *projection,
43 unsigned int &position,
44 double &distance,
45 double tolerance = 1.0e-12 );
46
47#endif // TRIANGLE_T
Definition edge_t.h:8
double const * get_support_point_ptr(unsigned int i) const
int project_point(double const *point, double *projection, double tolerance=1.0e-12)
void clear_edges()
bool centroid_updated
Definition triangle_t.h:29
void set_support_points(double const *A, double const *B, double const *C)
double compute_distance_to_containing_plane(double const *point)
double const * get_normal()
std::vector< double > centroid
Definition triangle_t.h:26
void compute_centroid()
triangle_t(double const *A, double const *B, double const *C)
double const * get_centroid()
std::vector< double > tmp
Definition triangle_t.h:27
bool edges_updated
Definition triangle_t.h:30
std::vector< double > normal
Definition triangle_t.h:25
void compute_normal()
bool above_point(double const *point, double tolerance=1.0e-12)
edge_t * get_edge(unsigned int i)
bool normal_updated
Definition triangle_t.h:28
bool contains_point(double const *point, double tolerance=1.0e-12)
void build_edges()
double const * support_points_ptr[3]
Definition triangle_t.h:24
edge_t * edges_ptr[3]
Definition triangle_t.h:23
int project_point_onto_collection_of_triangles(unsigned int n_triangles, triangle_t **triangle_ptr, double const *point, double *projection, unsigned int &position, double &distance, double tolerance=1.0e-12)



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page