|
inlib
1.2.0
|


Public Member Functions | |
| polyhedron (int Nvert=0, int Nface=0) | |
| polyhedron (const polyhedron &from) | |
| polyhedron & | operator= (const polyhedron &from) |
| virtual | ~polyhedron () |
| void | setName (const std::string &aName) |
| std::string | getName () const |
| void | Set (int Nvert, HVPoint3D *aV, int Nface, SbFacet *aF) |
| void | Empty () |
| int | GetNoVertices () const |
| int | GetNoFacets () const |
| polyhedron & | Transform (const inlib::rotd &rot, const inlib::vec3d &trans) |
| bool | GetNextVertexIndex (int &index, int &edgeFlag) const |
| HVPoint3D | GetVertex (int index) const |
| const HVPoint3D & | GetVertexFast (int index) const |
| HVPoint3D * | GetPV () const |
| SbFacet * | GetPF () const |
| bool | GetNextVertex (HVPoint3D &vertex, int &edgeFlag) const |
| bool | GetNextVertex (HVPoint3D &vertex, int &edgeFlag, HVNormal3D &normal) const |
| bool | GetNextEdgeIndeces (int &i1, int &i2, int &edgeFlag, int &iface1, int &iface2) const |
| bool | GetNextEdgeIndeces (int &i1, int &i2, int &edgeFlag) const |
| bool | GetNextEdge (HVPoint3D &p1, HVPoint3D &p2, int &edgeFlag) const |
| bool | GetNextEdge (HVPoint3D &p1, HVPoint3D &p2, int &edgeFlag, int &iface1, int &iface2) const |
| void | GetFacet (int iFace, int &n, int *iNodes, int *edgeFlags=0, int *iFaces=0) const |
| void | GetFacet (int iFace, int &n, HVPoint3D *nodes, int *edgeFlags=0, HVNormal3D *normals=0) const |
| bool | GetNextFacet (int &n, HVPoint3D *nodes, int *edgeFlags=0, HVNormal3D *normals=0) const |
| HVNormal3D | GetNormal (int iFace) const |
| HVNormal3D | GetUnitNormal (int iFace) const |
| bool | GetNextNormal (HVNormal3D &normal) const |
| bool | GetNextUnitNormal (HVNormal3D &normal) const |
| polyhedron | add (const polyhedron &p) const |
| polyhedron | subtract (const polyhedron &p) const |
| polyhedron | intersect (const polyhedron &p) const |
| double | GetSurfaceArea () const |
| double | GetVolume () const |
| bool | isEqual (const polyhedron &p) const |
| bool | isConsistent (const char *=0) const |
| void | dump () const |
| int | GetNumberOfRotationSteps () |
| void | SetNumberOfRotationSteps (int n) |
| void | ResetNumberOfRotationSteps () |
Protected Member Functions | |
| void | AllocateMemory (int Nvert, int Nface) |
| int | FindNeighbour (int iFace, int iNode, int iOrder) const |
| HVNormal3D | FindNodeNormal (int iFace, int iNode) const |
| void | CreatePrism () |
| void | RotateEdge (int k1, int k2, double r1, double r2, int v1, int v2, int vEdge, bool ifWholeCircle, int ns, int &kface) |
| void | SetSideFacets (int ii[4], int vv[4], int *kk, double *r, double dphi, int ns, int &kface) |
| void | RotateAroundZ (int nstep, double phi, double dphi, int np1, int np2, const double *z, double *r, int nodeVis, int edgeVis) |
| void | SetReferences () |
| void | InvertFacets () |
Protected Attributes | |
| int | nvert |
| int | nface |
| HVPoint3D * | pV |
| SbFacet * | pF |
Friends | |
| std::ostream & | operator<< (std::ostream &, const polyhedron &ph) |
| int | operator== (const polyhedron &v1, const polyhedron &v2) |
| int | operator!= (const polyhedron &v1, const polyhedron &v2) |
Definition at line 94 of file polyhedron.
| inlib::hep::polyhedron::polyhedron | ( | int | Nvert = 0, |
| int | Nface = 0 |
||
| ) | [inline] |
| inlib::hep::polyhedron::polyhedron | ( | const polyhedron & | from | ) |
| virtual inlib::hep::polyhedron::~polyhedron | ( | ) | [inline, virtual] |
Definition at line 159 of file polyhedron.
| polyhedron inlib::hep::polyhedron::add | ( | const polyhedron & | p | ) | const |
| void inlib::hep::polyhedron::AllocateMemory | ( | int | Nvert, |
| int | Nface | ||
| ) | [protected] |
| void inlib::hep::polyhedron::CreatePrism | ( | ) | [protected] |
| void inlib::hep::polyhedron::dump | ( | ) | const |
| void inlib::hep::polyhedron::Empty | ( | ) | [inline] |
| int inlib::hep::polyhedron::FindNeighbour | ( | int | iFace, |
| int | iNode, | ||
| int | iOrder | ||
| ) | const [protected] |
| HVNormal3D inlib::hep::polyhedron::FindNodeNormal | ( | int | iFace, |
| int | iNode | ||
| ) | const [protected] |
| void inlib::hep::polyhedron::GetFacet | ( | int | iFace, |
| int & | n, | ||
| int * | iNodes, | ||
| int * | edgeFlags = 0, |
||
| int * | iFaces = 0 |
||
| ) | const |
| void inlib::hep::polyhedron::GetFacet | ( | int | iFace, |
| int & | n, | ||
| HVPoint3D * | nodes, | ||
| int * | edgeFlags = 0, |
||
| HVNormal3D * | normals = 0 |
||
| ) | const |
| std::string inlib::hep::polyhedron::getName | ( | ) | const [inline] |
Definition at line 169 of file polyhedron.
{
if(!m_name) return std::string();
return *m_name;
}
| bool inlib::hep::polyhedron::GetNextEdge | ( | HVPoint3D & | p1, |
| HVPoint3D & | p2, | ||
| int & | edgeFlag, | ||
| int & | iface1, | ||
| int & | iface2 | ||
| ) | const |
| bool inlib::hep::polyhedron::GetNextEdgeIndeces | ( | int & | i1, |
| int & | i2, | ||
| int & | edgeFlag, | ||
| int & | iface1, | ||
| int & | iface2 | ||
| ) | const |
| bool inlib::hep::polyhedron::GetNextEdgeIndeces | ( | int & | i1, |
| int & | i2, | ||
| int & | edgeFlag | ||
| ) | const |
| bool inlib::hep::polyhedron::GetNextFacet | ( | int & | n, |
| HVPoint3D * | nodes, | ||
| int * | edgeFlags = 0, |
||
| HVNormal3D * | normals = 0 |
||
| ) | const |
| bool inlib::hep::polyhedron::GetNextNormal | ( | HVNormal3D & | normal | ) | const |
| bool inlib::hep::polyhedron::GetNextUnitNormal | ( | HVNormal3D & | normal | ) | const |
| bool inlib::hep::polyhedron::GetNextVertex | ( | HVPoint3D & | vertex, |
| int & | edgeFlag | ||
| ) | const |
| bool inlib::hep::polyhedron::GetNextVertex | ( | HVPoint3D & | vertex, |
| int & | edgeFlag, | ||
| HVNormal3D & | normal | ||
| ) | const |
| bool inlib::hep::polyhedron::GetNextVertexIndex | ( | int & | index, |
| int & | edgeFlag | ||
| ) | const [inline] |
Definition at line 287 of file polyhedron.
{
static int iFace = 1;
static int iQVertex = 0;
//G.Barrand : int vIndex = pF[iFace].edge[iQVertex].v;
SbFacet::edge_t* edge = pF[iFace].edge; //G.Barrand : optimize.
int vIndex = edge[iQVertex].v;
edgeFlag = (vIndex > 0) ? 1 : 0;
index = Sb_iabs(vIndex);
if(index>nvert) {
std::cerr << "polyhedron::GetNextVertexIndex: pV index problem "
<< index << " exceed " << nvert << std::endl;
index = 0;
}
//G.Barrand : if (iQVertex >= 3 || pF[iFace].edge[iQVertex+1].v == 0) {
if (iQVertex >= 3 || edge[iQVertex+1].v == 0) {
iQVertex = 0;
if (++iFace > nface) iFace = 1;
return false; // Last Edge
}else{
++iQVertex;
return true; // not Last Edge
}
}
| int inlib::hep::polyhedron::GetNoFacets | ( | ) | const [inline] |
Definition at line 187 of file polyhedron.
{ return nface; }
| HVNormal3D inlib::hep::polyhedron::GetNormal | ( | int | iFace | ) | const |
| int inlib::hep::polyhedron::GetNoVertices | ( | ) | const [inline] |
Definition at line 184 of file polyhedron.
{ return nvert; }
| int inlib::hep::polyhedron::GetNumberOfRotationSteps | ( | ) |
| SbFacet* inlib::hep::polyhedron::GetPF | ( | ) | const [inline] |
Definition at line 203 of file polyhedron.
{return pF;} //G.Barrand
| HVPoint3D* inlib::hep::polyhedron::GetPV | ( | ) | const [inline] |
Definition at line 202 of file polyhedron.
{return pV;} //G.Barrand
| double inlib::hep::polyhedron::GetSurfaceArea | ( | ) | const |
| HVNormal3D inlib::hep::polyhedron::GetUnitNormal | ( | int | iFace | ) | const |
| HVPoint3D inlib::hep::polyhedron::GetVertex | ( | int | index | ) | const |
| const HVPoint3D& inlib::hep::polyhedron::GetVertexFast | ( | int | index | ) | const |
| double inlib::hep::polyhedron::GetVolume | ( | ) | const |
| polyhedron inlib::hep::polyhedron::intersect | ( | const polyhedron & | p | ) | const |
| void inlib::hep::polyhedron::InvertFacets | ( | ) | [protected] |
| bool inlib::hep::polyhedron::isConsistent | ( | const char * | = 0 | ) | const |
| bool inlib::hep::polyhedron::isEqual | ( | const polyhedron & | p | ) | const |
| polyhedron& inlib::hep::polyhedron::operator= | ( | const polyhedron & | from | ) |
Reimplemented in inlib::hep::polyhedronTorus, inlib::hep::polyhedronSphere, inlib::hep::polyhedronPcon, inlib::hep::polyhedronPgon, inlib::hep::polyhedronTube, inlib::hep::polyhedronTubs, inlib::hep::polyhedronCone, inlib::hep::polyhedronCons, inlib::hep::polyhedronPara, inlib::hep::polyhedronTrap, inlib::hep::polyhedronBox, inlib::hep::polyhedronTrd1, and inlib::hep::polyhedronTrd2.
| void inlib::hep::polyhedron::ResetNumberOfRotationSteps | ( | ) |
| void inlib::hep::polyhedron::RotateAroundZ | ( | int | nstep, |
| double | phi, | ||
| double | dphi, | ||
| int | np1, | ||
| int | np2, | ||
| const double * | z, | ||
| double * | r, | ||
| int | nodeVis, | ||
| int | edgeVis | ||
| ) | [protected] |
| void inlib::hep::polyhedron::RotateEdge | ( | int | k1, |
| int | k2, | ||
| double | r1, | ||
| double | r2, | ||
| int | v1, | ||
| int | v2, | ||
| int | vEdge, | ||
| bool | ifWholeCircle, | ||
| int | ns, | ||
| int & | kface | ||
| ) | [protected] |
| void inlib::hep::polyhedron::setName | ( | const std::string & | aName | ) | [inline] |
Definition at line 165 of file polyhedron.
{
delete m_name;
m_name = new std::string(aName);
}
| void inlib::hep::polyhedron::SetNumberOfRotationSteps | ( | int | n | ) |
| void inlib::hep::polyhedron::SetReferences | ( | ) | [protected] |
| void inlib::hep::polyhedron::SetSideFacets | ( | int | ii[4], |
| int | vv[4], | ||
| int * | kk, | ||
| double * | r, | ||
| double | dphi, | ||
| int | ns, | ||
| int & | kface | ||
| ) | [protected] |
| polyhedron inlib::hep::polyhedron::subtract | ( | const polyhedron & | p | ) | const |
| polyhedron& inlib::hep::polyhedron::Transform | ( | const inlib::rotd & | rot, |
| const inlib::vec3d & | trans | ||
| ) |
| int operator!= | ( | const polyhedron & | v1, |
| const polyhedron & | v2 | ||
| ) | [friend] |
| std::ostream& operator<< | ( | std::ostream & | , |
| const polyhedron & | ph | ||
| ) | [friend] |
| int operator== | ( | const polyhedron & | v1, |
| const polyhedron & | v2 | ||
| ) | [friend] |
int inlib::hep::polyhedron::nface [protected] |
Definition at line 105 of file polyhedron.
int inlib::hep::polyhedron::nvert [protected] |
Definition at line 105 of file polyhedron.
SbFacet* inlib::hep::polyhedron::pF [protected] |
Definition at line 107 of file polyhedron.
HVPoint3D* inlib::hep::polyhedron::pV [protected] |
Definition at line 106 of file polyhedron.
1.7.5.1