Analysis Software
Documentation for sPHENIX simulation software
|
#include <JETSCAPE/blob/main/external_packages/cornelius.h>
Public Member Functions | |
Polygon () | |
~Polygon () | |
void | init (int) |
bool | add_line (Line *, int) |
int | get_Nlines () |
Line ** | get_lines () |
void | print (ofstream &file, double *) |
Polygon () | |
~Polygon () | |
void | init (int) |
bool | add_line (Line *, int) |
int | get_Nlines () |
Line ** | get_lines () |
void | print (ofstream &file, double *) |
Polygon () | |
~Polygon () | |
void | init (int) |
bool | add_line (Line *, int) |
int | get_Nlines () |
Line ** | get_lines () |
void | print (ofstream &file, double *) |
Polygon () | |
~Polygon () | |
void | init (int) |
bool | add_line (Line *, int) |
int | get_Nlines () |
Line ** | get_lines () |
void | print (ofstream &file, double *) |
Public Member Functions inherited from GeneralElement | |
GeneralElement () | |
~GeneralElement () | |
double * | get_centroid () |
double * | get_normal () |
GeneralElement () | |
~GeneralElement () | |
double * | get_centroid () |
double * | get_normal () |
GeneralElement () | |
~GeneralElement () | |
double * | get_centroid () |
double * | get_normal () |
GeneralElement () | |
~GeneralElement () | |
double * | get_centroid () |
double * | get_normal () |
Private Member Functions | |
void | calculate_centroid () |
void | calculate_normal () |
void | calculate_centroid () |
void | calculate_normal () |
void | calculate_centroid () |
void | calculate_normal () |
void | calculate_centroid () |
void | calculate_normal () |
Private Attributes | |
Line ** | lines |
int | Nlines |
int | x1 |
int | x2 |
int | x3 |
int | const_i |
Static Private Attributes | |
static const int | MAX_LINES = 24 |
static const int | POLYGON_DIM = 3 |
Additional Inherited Members | |
Protected Member Functions inherited from GeneralElement | |
void | check_normal_direction (double *normal, double *out) |
void | check_normal_direction (double *normal, double *out) |
void | check_normal_direction (double *normal, double *out) |
void | check_normal_direction (double *normal, double *out) |
Protected Attributes inherited from GeneralElement | |
double * | centroid |
double * | normal |
int | normal_calculated |
int | centroid_calculated |
Static Protected Attributes inherited from GeneralElement | |
static const int | DIM = 4 |
A class for storing polygons given by Cornelius. Can calculate the centroid and normal of the polygon.
Definition at line 347 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 347 of file cornelius.cpp
Polygon::Polygon | ( | ) |
Allocates memory for the list of pointers to the lines which form the polygon.
Definition at line 374 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 374 of file cornelius.cpp
References test_fpe::lines.
Polygon::~Polygon | ( | ) |
Frees memory allocated at the constructor.
Definition at line 385 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 385 of file cornelius.cpp
References test_fpe::lines.
Polygon::Polygon | ( | ) |
Polygon::~Polygon | ( | ) |
Polygon::Polygon | ( | ) |
Polygon::~Polygon | ( | ) |
Polygon::Polygon | ( | ) |
Polygon::~Polygon | ( | ) |
bool Polygon::add_line | ( | Line * | , |
int | |||
) |
bool Polygon::add_line | ( | Line * | , |
int | |||
) |
bool Polygon::add_line | ( | Line * | l, |
int | donotcheck | ||
) |
Adds a line to the polygon. This can also check if the line is connected to the ones already in the polygon and the line is added only when the line is connected.
[in] | l | Line which is tried to add to polygon |
[in] | donotcheck | 1 if no check is needed, 0 otherwise |
Definition at line 436 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 436 of file cornelius.cpp
References Acts::UnitConstants::e, eps, Line::flip_start_end(), Line::get_end(), Line::get_start(), j, and test_fpe::lines.
bool Polygon::add_line | ( | Line * | , |
int | |||
) |
|
privatevirtual |
Reimplemented from GeneralElement.
|
privatevirtual |
Reimplemented from GeneralElement.
|
privatevirtual |
This determines the centroid (center of mass) of the polygon.
Reimplemented from GeneralElement.
Definition at line 478 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 478 of file cornelius.cpp
References KFPMath::a, KFPMath::b, double(), i, j, test_fpe::lines, and mean().
|
privatevirtual |
Reimplemented from GeneralElement.
|
privatevirtual |
Reimplemented from GeneralElement.
|
privatevirtual |
Reimplemented from GeneralElement.
|
privatevirtual |
Determines the normal vector for polygon. Makes sure that it points in the outward direction.
Reimplemented from GeneralElement.
Definition at line 559 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 559 of file cornelius.cpp
References KFPMath::a, KFPMath::b, i, j, and test_fpe::lines.
|
privatevirtual |
Reimplemented from GeneralElement.
Line** Polygon::get_lines | ( | ) |
Line** Polygon::get_lines | ( | ) |
Line** Polygon::get_lines | ( | ) |
Line ** Polygon::get_lines | ( | ) |
Returns an array of pointers of the lines in the polygon.
Definition at line 638 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 638 of file cornelius.cpp
References test_fpe::lines.
Referenced by Polyhedron::add_polygon().
int Polygon::get_Nlines | ( | ) |
int Polygon::get_Nlines | ( | ) |
int Polygon::get_Nlines | ( | ) |
int Polygon::get_Nlines | ( | ) |
Return the number of lines in this polygon.
Definition at line 626 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 626 of file cornelius.cpp
Referenced by Polyhedron::add_polygon().
void Polygon::init | ( | int | ) |
void Polygon::init | ( | int | ) |
void Polygon::init | ( | int | c | ) |
This initializes the polygon. Can be used several times.
[in] | c | Index which is constant in this polygon |
Definition at line 397 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 397 of file cornelius.cpp
References Acts::PhysicalConstants::c, and i.
void Polygon::init | ( | int | ) |
void Polygon::print | ( | ofstream & | file, |
double * | |||
) |
void Polygon::print | ( | ofstream & | file, |
double * | |||
) |
void Polygon::print | ( | ofstream & | file, |
double * | pos | ||
) |
Prints the triangles formed from the polygon into a given file. Prints the absolute points, so this file can be used to plot the surface.
[in] | file | Output stream where the points are printed. |
[in] | file | Absolute position of the cube point (0,0,0) |
Definition at line 652 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 652 of file cornelius.cpp
References i, and test_fpe::lines.
Referenced by Cornelius::surface_3d().
void Polygon::print | ( | ofstream & | file, |
double * | |||
) |
|
private |
Definition at line 355 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 355 of file cornelius.cpp
|
private |
Definition at line 352 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 352 of file cornelius.cpp
|
staticprivate |
Definition at line 350 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 350 of file cornelius.cpp
|
private |
Definition at line 353 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 353 of file cornelius.cpp
|
staticprivate |
Definition at line 351 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 351 of file cornelius.cpp
|
private |
Definition at line 354 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 354 of file cornelius.cpp
|
private |
Definition at line 354 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 354 of file cornelius.cpp
|
private |
Definition at line 354 of file cornelius.cpp.
View newest version in sPHENIX GitHub at line 354 of file cornelius.cpp