g4tools  5.4.0
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
tools::hep::SbFacet Class Reference

Public Member Functions

 SbFacet (int v1=0, int f1=0, int v2=0, int f2=0, int v3=0, int f3=0, int v4=0, int f4=0)
 
virtual ~SbFacet ()
 
bool isEqual (const SbFacet &aFrom) const
 
void GetEdge (int i, int &v, int &f) const
 
void set (int v1, int f1, int v2, int f2, int v3, int f3, int v4, int f4)
 
void Set (int v[8])
 

Protected Member Functions

 SbFacet (const SbFacet &aFrom)
 
SbFacetoperator= (const SbFacet &aFrom)
 

Friends

class polyhedron
 
std::ostream & operator<< (std::ostream &, const SbFacet &facet)
 
int operator== (const SbFacet &v1, const SbFacet &v2)
 
int operator!= (const SbFacet &v1, const SbFacet &v2)
 

Detailed Description

Definition at line 45 of file polyhedron.

Constructor & Destructor Documentation

◆ SbFacet() [1/2]

tools::hep::SbFacet::SbFacet ( int  v1 = 0,
int  f1 = 0,
int  v2 = 0,
int  f2 = 0,
int  v3 = 0,
int  f3 = 0,
int  v4 = 0,
int  f4 = 0 
)
inline

Definition at line 63 of file polyhedron.

65  {
66 #ifdef TOOLS_MEM
67  mem::increment(s_class().c_str());
68 #endif
69  edge[0].v=v1; edge[0].f=f1; edge[1].v=v2; edge[1].f=f2;
70  edge[2].v=v3; edge[2].f=f3; edge[3].v=v4; edge[3].f=f4; }

◆ ~SbFacet()

virtual tools::hep::SbFacet::~SbFacet ( )
inlinevirtual

Definition at line 72 of file polyhedron.

72  {
73 #ifdef TOOLS_MEM
74  mem::decrement(s_class().c_str());
75 #endif
76  }

◆ SbFacet() [2/2]

tools::hep::SbFacet::SbFacet ( const SbFacet aFrom)
inlineprotected

Definition at line 79 of file polyhedron.

79  {
80 #ifdef TOOLS_MEM
81  mem::increment(s_class().c_str());
82 #endif
83  edge[0].v = aFrom.edge[0].v;
84  edge[0].f = aFrom.edge[0].f;
85  edge[1].v = aFrom.edge[1].v;
86  edge[1].f = aFrom.edge[1].f;
87  edge[2].v = aFrom.edge[2].v;
88  edge[2].f = aFrom.edge[2].f;
89  edge[3].v = aFrom.edge[3].v;
90  edge[3].f = aFrom.edge[3].f;
91  }

Member Function Documentation

◆ GetEdge()

void tools::hep::SbFacet::GetEdge ( int  i,
int &  v,
int &  f 
) const
inline

Definition at line 119 of file polyhedron.

119  { //G.Barrand
120  v = edge[i].v;
121  f = edge[i].f;
122  }

◆ isEqual()

bool tools::hep::SbFacet::isEqual ( const SbFacet aFrom) const
inline

Definition at line 104 of file polyhedron.

104  { //G.Barrand
105  if(edge[0].v!=aFrom.edge[0].v) return false;
106  if(edge[0].f!=aFrom.edge[0].f) return false;
107 
108  if(edge[1].v!=aFrom.edge[1].v) return false;
109  if(edge[1].f!=aFrom.edge[1].f) return false;
110 
111  if(edge[2].v!=aFrom.edge[2].v) return false;
112  if(edge[2].f!=aFrom.edge[2].f) return false;
113 
114  if(edge[3].v!=aFrom.edge[3].v) return false;
115  if(edge[3].f!=aFrom.edge[3].f) return false;
116 
117  return true;
118  }

◆ operator=()

SbFacet& tools::hep::SbFacet::operator= ( const SbFacet aFrom)
inlineprotected

Definition at line 92 of file polyhedron.

92  {
93  edge[0].v = aFrom.edge[0].v;
94  edge[0].f = aFrom.edge[0].f;
95  edge[1].v = aFrom.edge[1].v;
96  edge[1].f = aFrom.edge[1].f;
97  edge[2].v = aFrom.edge[2].v;
98  edge[2].f = aFrom.edge[2].f;
99  edge[3].v = aFrom.edge[3].v;
100  edge[3].f = aFrom.edge[3].f;
101  return *this;
102  }

◆ set()

void tools::hep::SbFacet::set ( int  v1,
int  f1,
int  v2,
int  f2,
int  v3,
int  f3,
int  v4,
int  f4 
)
inline

Definition at line 124 of file polyhedron.

125  {
126  edge[0].v=v1; edge[0].f=f1; edge[1].v=v2; edge[1].f=f2;
127  edge[2].v=v3; edge[2].f=f3; edge[3].v=v4; edge[3].f=f4;
128  }

◆ Set()

void tools::hep::SbFacet::Set ( int  v[8])
inline

Definition at line 131 of file polyhedron.

132  { edge[0].v = v[0]; edge[0].f = v[1];
133  edge[1].v = v[2]; edge[1].f = v[3];
134  edge[2].v = v[4]; edge[2].f = v[5];
135  edge[3].v = v[6]; edge[3].f = v[7]; }

Friends And Related Function Documentation

◆ operator!=

int operator!= ( const SbFacet v1,
const SbFacet v2 
)
friend

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const SbFacet facet 
)
friend

◆ operator==

int operator== ( const SbFacet v1,
const SbFacet v2 
)
friend

◆ polyhedron

friend class polyhedron
friend

Definition at line 50 of file polyhedron.


The documentation for this class was generated from the following file: