Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -10,8 +10,10 @@
|
||||
|
||||
#include <CLHEP/Geometry/Plane3D.h>
|
||||
|
||||
using namespace HepGeom;
|
||||
|
||||
#define INITIAL_SIZE 200
|
||||
#define CRAZY_POINT HepPoint3D(-10.e+6, -10.e+6, -10.e+6)
|
||||
#define CRAZY_POINT Point3D<double>(-10.e+6, -10.e+6, -10.e+6)
|
||||
#define GRANULARITY 10.e+5;
|
||||
|
||||
#define SWAP(A,B) w = A; A = B; B = w
|
||||
@@ -69,11 +71,11 @@ class vector {
|
||||
// ---------------------------------------------------- Extended node ---
|
||||
class ExtNode {
|
||||
public:
|
||||
HepPoint3D v;
|
||||
Point3D<double> v;
|
||||
int s;
|
||||
|
||||
public:
|
||||
ExtNode(HepPoint3D vertex=HepPoint3D(), int status=0)
|
||||
ExtNode(Point3D<double> vertex=Point3D<double>(), int status=0)
|
||||
: v(vertex), s(status) {}
|
||||
~ExtNode() {}
|
||||
|
||||
@@ -125,7 +127,7 @@ class ExtEdge {
|
||||
class ExtFace {
|
||||
public:
|
||||
int iedges[4]; // indices of original edges
|
||||
HepPlane3D plane; // face plane
|
||||
Plane3D<double> plane; // face plane
|
||||
double rmin[3], rmax[3]; // bounding box
|
||||
int iold; // head of the list of the original edges
|
||||
int inew; // head of the list of the new edges
|
||||
@@ -250,7 +252,7 @@ class BooleanProcessor {
|
||||
void initiateLists();
|
||||
void assemblePolyhedra();
|
||||
void findABC(double x1, double y1, double x2, double y2,
|
||||
double &a, double &b, double &c) const;
|
||||
double &a, double &b, double &c) const;
|
||||
int checkDirection(double *x, double *y) const;
|
||||
int checkIntersection(int ix, int iy, int i1, int i2) const;
|
||||
void mergeContours(int ix, int iy, int kext, int kint);
|
||||
@@ -265,8 +267,8 @@ class BooleanProcessor {
|
||||
~BooleanProcessor() {}
|
||||
|
||||
HepPolyhedron execute(int op,
|
||||
const HepPolyhedron &a,
|
||||
const HepPolyhedron &b);
|
||||
const HepPolyhedron &a,
|
||||
const HepPolyhedron &b);
|
||||
|
||||
void draw();
|
||||
void draw_edge(int, int);
|
||||
@@ -309,7 +311,7 @@ inline void ExtFace::invert()
|
||||
}
|
||||
if (inew > 0) inew = iEprev;
|
||||
|
||||
plane = HepPlane3D(-plane.a(), -plane.b(), -plane.c(), -plane.d());
|
||||
plane = Plane3D<double>(-plane.a(), -plane.b(), -plane.c(), -plane.d());
|
||||
}
|
||||
|
||||
void BooleanProcessor::takePolyhedron(const HepPolyhedron & p,
|
||||
@@ -333,7 +335,7 @@ void BooleanProcessor::takePolyhedron(const HepPolyhedron & p,
|
||||
// nodes.push_back(ExtNode(p.GetVertex(i)));
|
||||
// }
|
||||
|
||||
HepPoint3D ppp;
|
||||
Point3D<double> ppp;
|
||||
for (i=1; i <= p.GetNoVertices(); i++) {
|
||||
ppp = p.GetVertex(i);
|
||||
ppp.setX(ppp.x()+dx);
|
||||
@@ -364,7 +366,7 @@ void BooleanProcessor::takePolyhedron(const HepPolyhedron & p,
|
||||
for (i=0; i<nnode; i++) {
|
||||
faces.back().iedges[i] = edges.size();
|
||||
edges.push_back(ExtEdge(iNodes[i], iNodes[i+1],
|
||||
iface+dface, iFaces[i], iVis[i]));
|
||||
iface+dface, iFaces[i], iVis[i]));
|
||||
edges.back().inext = edges.size();
|
||||
}
|
||||
edges.back().inext = 0;
|
||||
@@ -377,22 +379,22 @@ void BooleanProcessor::takePolyhedron(const HepPolyhedron & p,
|
||||
}
|
||||
for (i=1; i<nnode; i++) {
|
||||
for (k=0; k<3; k++) {
|
||||
if (faces.back().rmin[k] > nodes[iNodes[i]].v[k])
|
||||
faces.back().rmin[k] = nodes[iNodes[i]].v[k];
|
||||
if (faces.back().rmax[k] < nodes[iNodes[i]].v[k])
|
||||
faces.back().rmax[k] = nodes[iNodes[i]].v[k];
|
||||
if (faces.back().rmin[k] > nodes[iNodes[i]].v[k])
|
||||
faces.back().rmin[k] = nodes[iNodes[i]].v[k];
|
||||
if (faces.back().rmax[k] < nodes[iNodes[i]].v[k])
|
||||
faces.back().rmax[k] = nodes[iNodes[i]].v[k];
|
||||
}
|
||||
}
|
||||
|
||||
// S E T F A C E P L A N E
|
||||
|
||||
HepNormal3D n = (nodes[iNodes[2]].v-nodes[iNodes[0]].v).cross
|
||||
Normal3D<double> n = (nodes[iNodes[2]].v-nodes[iNodes[0]].v).cross
|
||||
(nodes[iNodes[3]].v-nodes[iNodes[1]].v);
|
||||
HepPoint3D p(0,0,0);
|
||||
Point3D<double> p(0,0,0);
|
||||
|
||||
for (i=0; i<nnode; i++) { p += nodes[iNodes[i]].v; }
|
||||
p *= (1./nnode);
|
||||
faces.back().plane = HepPlane3D(n.unit(), p);
|
||||
faces.back().plane = Plane3D<double>(n.unit(), p);
|
||||
|
||||
// S E T R E F E R E N C E T O T H E N E X T F A C E
|
||||
|
||||
@@ -473,14 +475,14 @@ void BooleanProcessor::selectOutsideFaces(int & ifaces, int & iout)
|
||||
***********************************************************************/
|
||||
{
|
||||
int i, outflag, iface = ifaces, *prev;
|
||||
HepPoint3D mmbox[8] = { HepPoint3D(rmin[0],rmin[1],rmin[2]),
|
||||
HepPoint3D(rmax[0],rmin[1],rmin[2]),
|
||||
HepPoint3D(rmin[0],rmax[1],rmin[2]),
|
||||
HepPoint3D(rmax[0],rmax[1],rmin[2]),
|
||||
HepPoint3D(rmin[0],rmin[1],rmax[2]),
|
||||
HepPoint3D(rmax[0],rmin[1],rmax[2]),
|
||||
HepPoint3D(rmin[0],rmax[1],rmax[2]),
|
||||
HepPoint3D(rmax[0],rmax[1],rmax[2]) };
|
||||
Point3D<double> mmbox[8] = { Point3D<double>(rmin[0],rmin[1],rmin[2]),
|
||||
Point3D<double>(rmax[0],rmin[1],rmin[2]),
|
||||
Point3D<double>(rmin[0],rmax[1],rmin[2]),
|
||||
Point3D<double>(rmax[0],rmax[1],rmin[2]),
|
||||
Point3D<double>(rmin[0],rmin[1],rmax[2]),
|
||||
Point3D<double>(rmax[0],rmin[1],rmax[2]),
|
||||
Point3D<double>(rmin[0],rmax[1],rmax[2]),
|
||||
Point3D<double>(rmax[0],rmax[1],rmax[2]) };
|
||||
prev = &ifaces;
|
||||
while (iface > 0) {
|
||||
|
||||
@@ -498,9 +500,9 @@ void BooleanProcessor::selectOutsideFaces(int & ifaces, int & iout)
|
||||
int npos = 0, nneg = 0;
|
||||
double d;
|
||||
for (i=0; i<8; i++) {
|
||||
d = faces[iface].plane.distance(mmbox[i]);
|
||||
if (d > +del) npos++;
|
||||
if (d < -del) nneg++;
|
||||
d = faces[iface].plane.distance(mmbox[i]);
|
||||
if (d > +del) npos++;
|
||||
if (d < -del) nneg++;
|
||||
}
|
||||
if (npos == 8 || nneg == 8) outflag = 1;
|
||||
}
|
||||
@@ -529,7 +531,7 @@ int BooleanProcessor::testFaceVsPlane(ExtEdge & edge)
|
||||
***********************************************************************/
|
||||
{
|
||||
int iface = edge.iface1;
|
||||
HepPlane3D plane = faces[edge.iface2].plane;
|
||||
Plane3D<double> plane = faces[edge.iface2].plane;
|
||||
int i, nnode, npos = 0, nneg = 0, nzer = 0;
|
||||
double dd[5];
|
||||
|
||||
@@ -594,22 +596,22 @@ int BooleanProcessor::testFaceVsPlane(ExtEdge & edge)
|
||||
for (i=0; i<2; i++) {
|
||||
iedge = faces[iface].iedges[ii[i]];
|
||||
while (iedge > 0) {
|
||||
i1 = edges[iedge].i1;
|
||||
i2 = edges[iedge].i2;
|
||||
d1 = plane.distance(nodes[i1].v);
|
||||
d2 = plane.distance(nodes[i2].v);
|
||||
if (d1 > del) {
|
||||
if (d2 < -del) { ii[i] = nodes.size(); break; } // +-
|
||||
}else if (d1 < -del) {
|
||||
if (d2 > del) { ii[i] = nodes.size(); break; } // -+
|
||||
}else{
|
||||
ii[i] = i1; break; // 0+ or 0-
|
||||
}
|
||||
iedge = edges[iedge].inext;
|
||||
i1 = edges[iedge].i1;
|
||||
i2 = edges[iedge].i2;
|
||||
d1 = plane.distance(nodes[i1].v);
|
||||
d2 = plane.distance(nodes[i2].v);
|
||||
if (d1 > del) {
|
||||
if (d2 < -del) { ii[i] = nodes.size(); break; } // +-
|
||||
}else if (d1 < -del) {
|
||||
if (d2 > del) { ii[i] = nodes.size(); break; } // -+
|
||||
}else{
|
||||
ii[i] = i1; break; // 0+ or 0-
|
||||
}
|
||||
iedge = edges[iedge].inext;
|
||||
}
|
||||
if (ii[i] == nodes.size()) {
|
||||
dd = d2-d1; d1 = d1/dd; d2 = d2/dd;
|
||||
nodes.push_back(ExtNode(d2*nodes[i1].v-d1*nodes[i2].v, iedge));
|
||||
dd = d2-d1; d1 = d1/dd; d2 = d2/dd;
|
||||
nodes.push_back(ExtNode(d2*nodes[i1].v-d1*nodes[i2].v, iedge));
|
||||
}
|
||||
}
|
||||
edge.inext = 0;
|
||||
@@ -729,7 +731,7 @@ void BooleanProcessor::divideEdge(int & i1, int & i2)
|
||||
ie2 = faces[edges[ie1].iface2].iedges[0];
|
||||
while (ie2 > 0) {
|
||||
if (edges[ie2].i1 == edges[ie1].i2 &&
|
||||
edges[ie2].i2 == edges[ie1].i1) break;
|
||||
edges[ie2].i2 == edges[ie1].i1) break;
|
||||
ie2 = edges[ie2].inext;
|
||||
}
|
||||
|
||||
@@ -942,30 +944,30 @@ void BooleanProcessor::assembleFace(int what, int iface)
|
||||
for (;;) {
|
||||
i = &faces[iface].inew;
|
||||
while(*i > 0) {
|
||||
if (edges[*i].i1 == edges[icur].i2) break;
|
||||
i = &edges[*i].inext;
|
||||
if (edges[*i].i1 == edges[icur].i2) break;
|
||||
i = &edges[*i].inext;
|
||||
}
|
||||
if (*i == 0) {
|
||||
i = &faces[iface].iold;
|
||||
while(*i > 0) {
|
||||
if (edges[*i].i1 == edges[icur].i2) ioldflag = 1;
|
||||
if (edges[*i].i1 == edges[icur].i2) break;
|
||||
i = &edges[*i].inext;
|
||||
}
|
||||
i = &faces[iface].iold;
|
||||
while(*i > 0) {
|
||||
if (edges[*i].i1 == edges[icur].i2) ioldflag = 1;
|
||||
if (edges[*i].i1 == edges[icur].i2) break;
|
||||
i = &edges[*i].inext;
|
||||
}
|
||||
}
|
||||
if (*i > 0) {
|
||||
icur = *i;
|
||||
*i = edges[icur].inext;
|
||||
INSERT_EDGE_TO_THE_LIST(icur);
|
||||
if (edges[icur].i2 == ifirst) { break; } else { continue; }
|
||||
icur = *i;
|
||||
*i = edges[icur].inext;
|
||||
INSERT_EDGE_TO_THE_LIST(icur);
|
||||
if (edges[icur].i2 == ifirst) { break; } else { continue; }
|
||||
}else{
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::assembleFace(" << iface << ") : "
|
||||
<< "could not find next edge of the contour"
|
||||
<< std::endl;
|
||||
faces[iface].inew = DEFECTIVE_FACE;
|
||||
return;
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::assembleFace(" << iface << ") : "
|
||||
<< "could not find next edge of the contour"
|
||||
<< std::endl;
|
||||
faces[iface].inew = DEFECTIVE_FACE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -977,18 +979,18 @@ void BooleanProcessor::assembleFace(int what, int iface)
|
||||
if (what == 0 && ioldflag == 0 && iedge > 0) {
|
||||
for (;;) {
|
||||
if (edges[iedge].inext > 0) {
|
||||
if (edges[iedge].i2 == edges[edges[iedge].inext].i1) {
|
||||
iedge = edges[iedge].inext;
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
if (edges[iedge].i2 == edges[edges[iedge].inext].i1) {
|
||||
iedge = edges[iedge].inext;
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
if (edges[iedge].i2 == edges[faces[iface].iold].i1) {
|
||||
edges[iedge].inext = ihead; // set new face
|
||||
return;
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
if (edges[iedge].i2 == edges[faces[iface].iold].i1) {
|
||||
edges[iedge].inext = ihead; // set new face
|
||||
return;
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1022,7 +1024,7 @@ void BooleanProcessor::assembleNewFaces(int what, int ihead)
|
||||
checkDoubleEdges(iface);
|
||||
assembleFace(what, iface);
|
||||
faces[iface].inew =
|
||||
(faces[iface].iold == 0) ? UNSUITABLE_FACE : NEW_FACE;
|
||||
(faces[iface].iold == 0) ? UNSUITABLE_FACE : NEW_FACE;
|
||||
}
|
||||
iface = faces[iface].inext;
|
||||
}
|
||||
@@ -1153,9 +1155,9 @@ void BooleanProcessor::assemblePolyhedra()
|
||||
while(iedge > 0) {
|
||||
iface = edges[iedge].iface2;
|
||||
if (faces[iface].inew == UNKNOWN_FACE) {
|
||||
unknown_faces.remove(iface);
|
||||
suitable_faces.push_back(iface);
|
||||
faces[iface].inew = ORIGINAL_FACE;
|
||||
unknown_faces.remove(iface);
|
||||
suitable_faces.push_back(iface);
|
||||
faces[iface].inew = ORIGINAL_FACE;
|
||||
}
|
||||
iedge = edges[iedge].inext;
|
||||
}
|
||||
@@ -1174,9 +1176,9 @@ void BooleanProcessor::assemblePolyhedra()
|
||||
while(iedge > 0) {
|
||||
iface = edges[iedge].iface2;
|
||||
if (faces[iface].inew == UNKNOWN_FACE) {
|
||||
unknown_faces.remove(iface);
|
||||
unsuitable_faces.push_back(iface);
|
||||
faces[iface].inew = UNSUITABLE_FACE;
|
||||
unknown_faces.remove(iface);
|
||||
unsuitable_faces.push_back(iface);
|
||||
faces[iface].inew = UNSUITABLE_FACE;
|
||||
}
|
||||
iedge = edges[iedge].inext;
|
||||
}
|
||||
@@ -1187,7 +1189,7 @@ void BooleanProcessor::assemblePolyhedra()
|
||||
|
||||
inline void
|
||||
BooleanProcessor::findABC(double x1, double y1, double x2, double y2,
|
||||
double &a, double &b, double &c) const
|
||||
double &a, double &b, double &c) const
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: BooleanProcessor::findABC Date: 07.03.00 *
|
||||
@@ -1358,34 +1360,34 @@ void BooleanProcessor::mergeContours(int ix, int iy, int kext, int kint)
|
||||
k[4] = edges[i1int].i2;
|
||||
k[5] = edges[i2int].i2;
|
||||
for (i=3; i<6; i++) {
|
||||
x[i] = nodes[k[i]].v[ix];
|
||||
y[i] = nodes[k[i]].v[iy];
|
||||
x[i] = nodes[k[i]].v[ix];
|
||||
y[i] = nodes[k[i]].v[iy];
|
||||
}
|
||||
|
||||
// T E S T L I N E K1 - K4
|
||||
// I F O K T H E N M E R G E C O N T O U R S
|
||||
|
||||
if (checkDirection(x, y) == 0) {
|
||||
if (checkIntersection(ix, iy, k[1], k[4]) == 0) {
|
||||
i = i1int;
|
||||
for(;;) {
|
||||
if (edges[i].inext == 0) {
|
||||
edges[i].inext = internal_contours[kint];
|
||||
internal_contours[kint] = 0;
|
||||
break;
|
||||
}else{
|
||||
i = edges[i].inext;
|
||||
}
|
||||
}
|
||||
i = edges[i1int].iface1;
|
||||
edges.push_back(ExtEdge(k[1], k[4], i, -(edges.size()+1), -1));
|
||||
edges.back().inext = i2int;
|
||||
edges.push_back(ExtEdge(k[4], k[1], i, -(edges.size()-1), -1));
|
||||
edges.back().inext = edges[i1ext].inext;
|
||||
edges[i1ext].inext = edges.size()-2;
|
||||
edges[i1int].inext = edges.size()-1;
|
||||
return;
|
||||
}
|
||||
if (checkIntersection(ix, iy, k[1], k[4]) == 0) {
|
||||
i = i1int;
|
||||
for(;;) {
|
||||
if (edges[i].inext == 0) {
|
||||
edges[i].inext = internal_contours[kint];
|
||||
internal_contours[kint] = 0;
|
||||
break;
|
||||
}else{
|
||||
i = edges[i].inext;
|
||||
}
|
||||
}
|
||||
i = edges[i1int].iface1;
|
||||
edges.push_back(ExtEdge(k[1], k[4], i, -(edges.size()+1), -1));
|
||||
edges.back().inext = i2int;
|
||||
edges.push_back(ExtEdge(k[4], k[1], i, -(edges.size()-1), -1));
|
||||
edges.back().inext = edges[i1ext].inext;
|
||||
edges[i1ext].inext = edges.size()-2;
|
||||
edges[i1int].inext = edges.size()-1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
i1int = edges[i1int].inext;
|
||||
}
|
||||
@@ -1482,25 +1484,25 @@ void BooleanProcessor::triangulateContour(int ix, int iy, int ihead)
|
||||
if (istart == 0) {
|
||||
istart = iedge1;
|
||||
if (nnode <= 3) {
|
||||
iedge3 = edges[iedge2].inext;
|
||||
edges[iedge1].iface1 = faces.size();
|
||||
edges[iedge2].iface1 = faces.size();
|
||||
edges[iedge3].iface1 = faces.size();
|
||||
edges[iedge3].inext = 0;
|
||||
faces.push_back(ExtFace());
|
||||
faces.back().iold = iedge1;
|
||||
faces.back().inew = ORIGINAL_FACE;
|
||||
iedge3 = edges[iedge2].inext;
|
||||
edges[iedge1].iface1 = faces.size();
|
||||
edges[iedge2].iface1 = faces.size();
|
||||
edges[iedge3].iface1 = faces.size();
|
||||
edges[iedge3].inext = 0;
|
||||
faces.push_back(ExtFace());
|
||||
faces.back().iold = iedge1;
|
||||
faces.back().inew = ORIGINAL_FACE;
|
||||
|
||||
//if (draw_flag) draw_contour(4, 2, iedge1);
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}else if (istart == iedge1) {
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::triangulateContour : "
|
||||
<< "could not generate a triangle (infinite loop)"
|
||||
<< std::endl;
|
||||
<< "BooleanProcessor::triangulateContour : "
|
||||
<< "could not generate a triangle (infinite loop)"
|
||||
<< std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1579,7 +1581,7 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
// F I N D M A X C O M P O N E N T O F T H E N O R M A L
|
||||
// S E T IX, IY, IZ
|
||||
|
||||
HepNormal3D normal = faces[iface].plane.normal();
|
||||
Normal3D<double> normal = faces[iface].plane.normal();
|
||||
int ix, iy, iz = 0;
|
||||
if (std::abs(normal[1]) > std::abs(normal[iz])) iz = 1;
|
||||
if (std::abs(normal[2]) > std::abs(normal[iz])) iz = 2;
|
||||
@@ -1601,34 +1603,34 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
z = 0.0;
|
||||
for(;;) {
|
||||
if (iedge > 0) {
|
||||
i1 = edges[iedge].i1;
|
||||
i2 = edges[iedge].i2;
|
||||
z += nodes[i1].v[ix]*nodes[i2].v[iy]-nodes[i2].v[ix]*nodes[i1].v[iy];
|
||||
if (ifirst != i2) {
|
||||
iedge = edges[iedge].inext;
|
||||
continue;
|
||||
}else{
|
||||
if (z > del*del) {
|
||||
external_contours.push_back(icontour);
|
||||
}else if (z < -del*del) {
|
||||
internal_contours.push_back(icontour);
|
||||
}else{
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::triangulateFace : too small contour"
|
||||
<< std::endl;
|
||||
}
|
||||
icontour = edges[iedge].inext;
|
||||
edges[iedge].inext = 0;
|
||||
break;
|
||||
}
|
||||
i1 = edges[iedge].i1;
|
||||
i2 = edges[iedge].i2;
|
||||
z += nodes[i1].v[ix]*nodes[i2].v[iy]-nodes[i2].v[ix]*nodes[i1].v[iy];
|
||||
if (ifirst != i2) {
|
||||
iedge = edges[iedge].inext;
|
||||
continue;
|
||||
}else{
|
||||
if (z > del*del) {
|
||||
external_contours.push_back(icontour);
|
||||
}else if (z < -del*del) {
|
||||
internal_contours.push_back(icontour);
|
||||
}else{
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::triangulateFace : too small contour"
|
||||
<< std::endl;
|
||||
}
|
||||
icontour = edges[iedge].inext;
|
||||
edges[iedge].inext = 0;
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::triangulateFace : broken contour"
|
||||
<< std::endl;
|
||||
icontour = 0;
|
||||
break;
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::triangulateFace : broken contour"
|
||||
<< std::endl;
|
||||
icontour = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1644,9 +1646,9 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
if (kext == external_contours.size()) {
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::triangulateFace : "
|
||||
<< "could not merge internal contour " << kint
|
||||
<< std::endl;
|
||||
<< "BooleanProcessor::triangulateFace : "
|
||||
<< "could not merge internal contour " << kint
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1664,16 +1666,16 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
iedge = faces[ifa].iold;
|
||||
while (iedge > 0) {
|
||||
if (edges[iedge].iface1 != ifa) {
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::triangulateFace : wrong reference to itself, "
|
||||
<< "iface=" << ifa << ", iface1=" << edges[iedge].iface1
|
||||
<< std::endl;
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::triangulateFace : wrong reference to itself, "
|
||||
<< "iface=" << ifa << ", iface1=" << edges[iedge].iface1
|
||||
<< std::endl;
|
||||
}else if (edges[iedge].iface2 > 0) {
|
||||
modifyReference(edges[iedge].iface2,
|
||||
edges[iedge].i1, edges[iedge].i2, ifa);
|
||||
modifyReference(edges[iedge].iface2,
|
||||
edges[iedge].i1, edges[iedge].i2, ifa);
|
||||
}else if (edges[iedge].iface2 < 0) {
|
||||
edges[iedge].iface2 = edges[-edges[iedge].iface2].iface1;
|
||||
edges[iedge].iface2 = edges[-edges[iedge].iface2].iface1;
|
||||
}
|
||||
iedge = edges[iedge].inext;
|
||||
}
|
||||
@@ -1701,8 +1703,8 @@ HepPolyhedron BooleanProcessor::createPolyhedron()
|
||||
faces[i].inew = ++nface;
|
||||
iedge = faces[i].iold;
|
||||
while (iedge > 0) {
|
||||
nodes[edges[iedge].i1].s = 1;
|
||||
iedge = edges[iedge].inext;
|
||||
nodes[edges[iedge].i1].s = 1;
|
||||
iedge = edges[iedge].inext;
|
||||
}
|
||||
}else{
|
||||
faces[i].inew = 0;
|
||||
@@ -1734,10 +1736,10 @@ HepPolyhedron BooleanProcessor::createPolyhedron()
|
||||
iedge = faces[i].iold;
|
||||
while (iedge > 0) {
|
||||
if (k > 3) {
|
||||
std::cerr
|
||||
<< "BooleanProcessor::createPolyhedron : too many edges"
|
||||
<< std::endl;
|
||||
break;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::createPolyhedron : too many edges"
|
||||
<< std::endl;
|
||||
break;
|
||||
}
|
||||
v[k] = nodes[edges[iedge].i1].s;
|
||||
if (edges[iedge].ivis < 0) v[k] = -v[k];
|
||||
@@ -1747,9 +1749,9 @@ HepPolyhedron BooleanProcessor::createPolyhedron()
|
||||
}
|
||||
if (k < 3) {
|
||||
std::cerr
|
||||
<< "BooleanProcessor::createPolyhedron : "
|
||||
<< "face has only " << k << " edges"
|
||||
<< std::endl;
|
||||
<< "BooleanProcessor::createPolyhedron : "
|
||||
<< "face has only " << k << " edges"
|
||||
<< std::endl;
|
||||
}
|
||||
polyhedron.pF[faces[i].inew] =
|
||||
G4Facet(v[0],f[0], v[1],f[1], v[2],f[2], v[3],f[3]);
|
||||
@@ -1758,8 +1760,8 @@ HepPolyhedron BooleanProcessor::createPolyhedron()
|
||||
}
|
||||
|
||||
HepPolyhedron BooleanProcessor::execute(int op,
|
||||
const HepPolyhedron & a,
|
||||
const HepPolyhedron & b)
|
||||
const HepPolyhedron & a,
|
||||
const HepPolyhedron & b)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: BooleanProcessor::execute Date: 10.12.99 *
|
||||
@@ -1779,7 +1781,7 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
{ 17, 31, -23},
|
||||
{ 31, -23, 17},
|
||||
{ -31, 23, -17}
|
||||
};
|
||||
};
|
||||
|
||||
// I N I T I A T E P R O C E S S O R
|
||||
|
||||
@@ -1806,13 +1808,13 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
return b;
|
||||
case OP_INTERSECTION:
|
||||
std::cerr
|
||||
<< "BooleanProcessor: intersection with empty polyhedron"
|
||||
<< std::endl;
|
||||
<< "BooleanProcessor: intersection with empty polyhedron"
|
||||
<< std::endl;
|
||||
return HepPolyhedron();
|
||||
case OP_SUBTRACTION:
|
||||
std::cerr
|
||||
<< "BooleanProcessor: subtraction from empty polyhedron"
|
||||
<< std::endl;
|
||||
<< "BooleanProcessor: subtraction from empty polyhedron"
|
||||
<< std::endl;
|
||||
return HepPolyhedron();
|
||||
}
|
||||
}
|
||||
@@ -1822,8 +1824,8 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
return a;
|
||||
case OP_INTERSECTION:
|
||||
std::cerr
|
||||
<< "BooleanProcessor: intersection with empty polyhedron"
|
||||
<< std::endl;
|
||||
<< "BooleanProcessor: intersection with empty polyhedron"
|
||||
<< std::endl;
|
||||
return HepPolyhedron();
|
||||
case OP_SUBTRACTION:
|
||||
return a;
|
||||
@@ -1835,7 +1837,7 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
del = findMinMax();
|
||||
|
||||
// W O R K A R O U N D T O A V O I D I E A N D E E
|
||||
|
||||
|
||||
double ddxx = del*shift[ishift][0];
|
||||
double ddyy = del*shift[ishift][1];
|
||||
double ddzz = del*shift[ishift][2];
|
||||
@@ -1883,8 +1885,8 @@ return a;
|
||||
while (ifa1 > 0) {
|
||||
ifa2 = ifaces2;
|
||||
while (ifa2 > 0) {
|
||||
testFaceVsFace(ifa1, ifa2);
|
||||
ifa2 = faces[ifa2].inext;
|
||||
testFaceVsFace(ifa1, ifa2);
|
||||
ifa2 = faces[ifa2].inext;
|
||||
}
|
||||
ifa1 = faces[ifa1].inext;
|
||||
}
|
||||
@@ -1906,8 +1908,8 @@ return a;
|
||||
if (unknown_faces.front() != 0) {
|
||||
processor_error = 1;
|
||||
std::cerr
|
||||
<< "BooleanProcessor::execute : unknown faces !!!"
|
||||
<< std::endl;
|
||||
<< "BooleanProcessor::execute : unknown faces !!!"
|
||||
<< std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1971,25 +1973,25 @@ return a;
|
||||
|
||||
while (iedge > 0) {
|
||||
|
||||
cout << " iegde = " << iedge
|
||||
<< " i1,i2 =" << edges[iedge].i1 << "," << edges[iedge].i2
|
||||
<< " iface1,iface2 = "
|
||||
<< edges[iedge].iface1 << "," << edges[iedge].iface2
|
||||
<< endl;
|
||||
cout << " iegde = " << iedge
|
||||
<< " i1,i2 =" << edges[iedge].i1 << "," << edges[iedge].i2
|
||||
<< " iface1,iface2 = "
|
||||
<< edges[iedge].iface1 << "," << edges[iedge].iface2
|
||||
<< endl;
|
||||
|
||||
i1 = edges[iedge].i1;
|
||||
p1[0] = nodes[i1].v.x();
|
||||
p1[1] = nodes[i1].v.y();
|
||||
p1[2] = nodes[i1].v.z();
|
||||
IHWTON(p1,p1);
|
||||
i2 = edges[iedge].i2;
|
||||
p2[0] = nodes[i2].v.x();
|
||||
p2[1] = nodes[i2].v.y();
|
||||
p2[2] = nodes[i2].v.z();
|
||||
IHWTON(p2,p2);
|
||||
i1 = edges[iedge].i1;
|
||||
p1[0] = nodes[i1].v.x();
|
||||
p1[1] = nodes[i1].v.y();
|
||||
p1[2] = nodes[i1].v.z();
|
||||
IHWTON(p1,p1);
|
||||
i2 = edges[iedge].i2;
|
||||
p2[0] = nodes[i2].v.x();
|
||||
p2[1] = nodes[i2].v.y();
|
||||
p2[2] = nodes[i2].v.z();
|
||||
IHWTON(p2,p2);
|
||||
// icol = (edges[iedge].ivis > 0) ? 1 : 2;
|
||||
IHZLIN(icol,p1[0],p1[1],p1[2], p2[0],p2[1],p2[2]);
|
||||
iedge = edges[iedge].inext;
|
||||
IHZLIN(icol,p1[0],p1[1],p1[2], p2[0],p2[1],p2[2]);
|
||||
iedge = edges[iedge].inext;
|
||||
}
|
||||
|
||||
cout << "--- inew" << endl;
|
||||
@@ -1999,25 +2001,25 @@ return a;
|
||||
|
||||
while (iedge > 0) {
|
||||
|
||||
cout << " iegde = " << iedge
|
||||
<< " i1,i2 =" << edges[iedge].i1 << "," << edges[iedge].i2
|
||||
<< " iface1,iface2 = "
|
||||
<< edges[iedge].iface1 << "," << edges[iedge].iface2
|
||||
<< endl;
|
||||
cout << " iegde = " << iedge
|
||||
<< " i1,i2 =" << edges[iedge].i1 << "," << edges[iedge].i2
|
||||
<< " iface1,iface2 = "
|
||||
<< edges[iedge].iface1 << "," << edges[iedge].iface2
|
||||
<< endl;
|
||||
|
||||
i1 = edges[iedge].i1;
|
||||
p1[0] = nodes[i1].v.x();
|
||||
p1[1] = nodes[i1].v.y();
|
||||
p1[2] = nodes[i1].v.z();
|
||||
IHWTON(p1,p1);
|
||||
i2 = edges[iedge].i2;
|
||||
p2[0] = nodes[i2].v.x();
|
||||
p2[1] = nodes[i2].v.y();
|
||||
p2[2] = nodes[i2].v.z();
|
||||
IHWTON(p2,p2);
|
||||
i1 = edges[iedge].i1;
|
||||
p1[0] = nodes[i1].v.x();
|
||||
p1[1] = nodes[i1].v.y();
|
||||
p1[2] = nodes[i1].v.z();
|
||||
IHWTON(p1,p1);
|
||||
i2 = edges[iedge].i2;
|
||||
p2[0] = nodes[i2].v.x();
|
||||
p2[1] = nodes[i2].v.y();
|
||||
p2[2] = nodes[i2].v.z();
|
||||
IHWTON(p2,p2);
|
||||
// icol = (edges[iedge].ivis > 0) ? 1 : 2;
|
||||
IHZLIN(icol,p1[0],p1[1],p1[2], p2[0],p2[1],p2[2]);
|
||||
iedge = edges[iedge].inext;
|
||||
IHZLIN(icol,p1[0],p1[1],p1[2], p2[0],p2[1],p2[2]);
|
||||
iedge = edges[iedge].inext;
|
||||
}
|
||||
iface = faces[iface].inext;
|
||||
|
||||
@@ -2026,8 +2028,6 @@ return a;
|
||||
cin >> II;
|
||||
ixclrwi();
|
||||
IHZCLE(0);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttCheck.cc,v 1.6 2005/05/03 17:43:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4AttCheck.cc,v 1.7 2005/09/16 01:04:43 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
|
||||
#include "G4AttCheck.hh"
|
||||
|
||||
@@ -45,11 +45,13 @@ G4AttCheck::G4AttCheck
|
||||
// Legal Unit Category Types...
|
||||
fUnitCategories.insert("Length");
|
||||
fUnitCategories.insert("Energy");
|
||||
fUnitCategories.insert("Time");
|
||||
fUnitCategories.insert("Electric charge");
|
||||
|
||||
// Corresponding Standard Units...
|
||||
fStandardUnits["Length"] = "m";
|
||||
fStandardUnits["Energy"] = "MeV";
|
||||
fStandardUnits["Time"] = "ns";
|
||||
fStandardUnits["Electric charge"] = "e+";
|
||||
|
||||
// Legal Categories...
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDefStore.cc,v 1.5 2004/03/31 06:50:19 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
|
||||
#include "G4AttDefStore.hh"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Circle.cc,v 1.4 2001/07/11 10:01:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Circle.cc,v 1.5 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -32,28 +32,8 @@
|
||||
|
||||
G4Circle::G4Circle () {}
|
||||
|
||||
G4Circle::G4Circle (const G4Point3D& pos):
|
||||
G4VMarker (pos) {}
|
||||
G4Circle::G4Circle (const G4VMarker& marker): G4VMarker (marker) {}
|
||||
|
||||
G4Circle::G4Circle (const G4VMarker& marker):
|
||||
G4VMarker (marker) {}
|
||||
G4Circle::G4Circle (const G4Point3D& pos): G4VMarker (pos) {}
|
||||
|
||||
G4Circle::~G4Circle () {}
|
||||
|
||||
G4Visible & G4Circle::operator = (const G4Visible &right) {
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4Circle::operator = (const G4VVisPrim &right) {
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
G4VMarker & G4Circle::operator = (const G4VMarker &right) {
|
||||
return G4VMarker::operator = (right);
|
||||
}
|
||||
|
||||
G4Circle& G4Circle::operator = (const G4Circle& right) {
|
||||
if (&right == this) return *this;
|
||||
G4VMarker::operator = (right);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -21,14 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Colour.cc,v 1.6 2003/09/18 11:03:12 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Colour.cc,v 1.9 2005/11/10 20:34:45 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
|
||||
#include "G4Colour.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
G4Colour::G4Colour (G4double r, G4double g, G4double b, G4double a):
|
||||
red (r), green (g), blue (b), alpha (a)
|
||||
@@ -66,3 +67,85 @@ G4bool G4Colour::operator != (const G4Colour& c) const {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
const G4Colour G4Colour::fWhite = G4Colour(1.0, 1.0, 1.0);
|
||||
const G4Colour G4Colour::fGray = G4Colour(0.5, 0.5, 0.5);
|
||||
const G4Colour G4Colour::fGrey = G4Colour::fGray;
|
||||
const G4Colour G4Colour::fBlack = G4Colour(0.0, 0.0, 0.0);
|
||||
const G4Colour G4Colour::fRed = G4Colour(1.0, 0.0, 0.0);
|
||||
const G4Colour G4Colour::fGreen = G4Colour(0.0, 1.0, 0.0);
|
||||
const G4Colour G4Colour::fBlue = G4Colour(0.0, 0.0, 1.0);
|
||||
const G4Colour G4Colour::fCyan = G4Colour(0.0, 1.0, 1.0);
|
||||
const G4Colour G4Colour::fMagenta = G4Colour(1.0, 0.0, 1.0);
|
||||
const G4Colour G4Colour::fYellow = G4Colour(1.0, 1.0, 0.0);
|
||||
|
||||
map<G4String, G4Colour> G4Colour::fColourMap;
|
||||
bool G4Colour::fInitColourMap = false;
|
||||
|
||||
const G4Colour& G4Colour::White() {return fWhite;}
|
||||
const G4Colour& G4Colour::Gray() {return fGray;}
|
||||
const G4Colour& G4Colour::Grey() {return fGrey;}
|
||||
const G4Colour& G4Colour::Black() {return fBlack;}
|
||||
const G4Colour& G4Colour::Red() {return fRed;}
|
||||
const G4Colour& G4Colour::Green() {return fGreen;}
|
||||
const G4Colour& G4Colour::Blue() {return fBlue;}
|
||||
const G4Colour& G4Colour::Cyan() {return fCyan;}
|
||||
const G4Colour& G4Colour::Magenta() {return fMagenta;}
|
||||
const G4Colour& G4Colour::Yellow() {return fYellow;}
|
||||
|
||||
void
|
||||
G4Colour::AddToMap(const G4String& key, const G4Colour& colour)
|
||||
{
|
||||
// Convert to lower case since colour map is case insensitive
|
||||
G4String myKey(key);
|
||||
myKey.toLower();
|
||||
|
||||
map<G4String, G4Colour>::iterator iter = fColourMap.find(myKey);
|
||||
|
||||
if (iter == fColourMap.end()) fColourMap[myKey] = colour;
|
||||
else {
|
||||
std::ostringstream o;
|
||||
o << "G4Colour with key "<<myKey<<" already exists ";
|
||||
G4Exception
|
||||
("G4Colour::AddToMap(const G4String& key, const G4Colour& colour)",
|
||||
"ColourKeyExists", JustWarning, o.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4Colour::InitialiseColourMap()
|
||||
{
|
||||
// Standard colours
|
||||
AddToMap("white", G4Colour::fWhite);
|
||||
AddToMap("gray", G4Colour::fGray);
|
||||
AddToMap("grey", G4Colour::fGrey);
|
||||
AddToMap("black", G4Colour::fBlack);
|
||||
AddToMap("red", G4Colour::fRed);
|
||||
AddToMap("green", G4Colour::fGreen);
|
||||
AddToMap("blue", G4Colour::fBlue);
|
||||
AddToMap("cyan", G4Colour::fCyan);
|
||||
AddToMap("magenta", G4Colour::fMagenta);
|
||||
AddToMap("yellow", G4Colour::fYellow);
|
||||
}
|
||||
|
||||
bool
|
||||
G4Colour::GetColour(const G4String& key, G4Colour& result)
|
||||
{
|
||||
if (false == fInitColourMap) {
|
||||
fInitColourMap = true;
|
||||
// Add standard colours to map
|
||||
InitialiseColourMap();
|
||||
}
|
||||
|
||||
G4String myKey(key);
|
||||
myKey.toLower();
|
||||
|
||||
map<G4String, G4Colour>::iterator iter = fColourMap.find(myKey);
|
||||
|
||||
// Don't modify "result" if colour was not found in map
|
||||
if (iter == fColourMap.end()) return false;
|
||||
|
||||
result = iter->second;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBS.cc,v 1.7 2003/06/16 16:55:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4NURBS.cc,v 1.8 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
@@ -41,16 +41,6 @@
|
||||
// Here start the real world. Please, check your armored jacket. //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4Visible & G4NURBS::operator = (const G4Visible &right)
|
||||
{
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4NURBS::operator = (const G4VVisPrim &right)
|
||||
{
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
std::ostream & operator << (std::ostream & inout_outStream,
|
||||
const G4NURBS & in_kNurb)
|
||||
{
|
||||
@@ -507,7 +497,7 @@ G4NURBS::G4NURBS( t_order in_Uorder, t_order in_Vorder,
|
||||
}
|
||||
|
||||
G4NURBS::G4NURBS(const G4NURBS & in_krNurb)
|
||||
: G4VVisPrim(in_krNurb)
|
||||
: G4Visible(in_krNurb)
|
||||
{
|
||||
// we assume the in nurbs is ok
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBSbox.cc,v 1.5 2003/04/03 15:31:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4NURBSbox.cc,v 1.6 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
@@ -68,16 +68,6 @@ G4NURBSbox::G4NURBSbox(G4double DX, G4double DY, G4double DZ)
|
||||
CP(mpCtrlPts[i++], DX, DY,-DZ, 1 );
|
||||
}
|
||||
|
||||
G4Visible & G4NURBSbox::operator = (const G4Visible &right)
|
||||
{
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4NURBSbox::operator = (const G4VVisPrim &right)
|
||||
{
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
const char* G4NURBSbox::Whoami() const
|
||||
{
|
||||
return "Box (as a folded piece)";
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBScylinder.cc,v 1.6 2004/12/07 08:42:25 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4NURBScylinder.cc,v 1.7 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
@@ -106,16 +106,6 @@ G4NURBScylinder::G4NURBScylinder(G4double R, G4double DZ)
|
||||
CP(mpCtrlPts[35] , 0, 0, -DZ, 1 );
|
||||
}
|
||||
|
||||
G4Visible & G4NURBScylinder::operator = (const G4Visible &right)
|
||||
{
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4NURBScylinder::operator = (const G4VVisPrim &right)
|
||||
{
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
const char* G4NURBScylinder::Whoami() const
|
||||
{
|
||||
return "Cylinder";
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBShexahedron.cc,v 1.5 2003/04/03 15:31:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4NURBShexahedron.cc,v 1.6 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// hexahedron implementation
|
||||
// OC 17 9 96
|
||||
@@ -60,16 +60,6 @@ G4NURBShexahedron::G4NURBShexahedron(const G4ThreeVector c [8])
|
||||
CP(mpCtrlPts[To1d(4,3)] , c[4].x(), c[4].y(), c[4].z(), 1 );
|
||||
}
|
||||
|
||||
G4Visible & G4NURBShexahedron::operator = (const G4Visible &right)
|
||||
{
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4NURBShexahedron::operator = (const G4VVisPrim &right)
|
||||
{
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
const char* G4NURBShexahedron::Whoami() const
|
||||
{
|
||||
return "Hexahedron";
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStube.cc,v 1.6 2004/12/07 08:42:25 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4NURBStube.cc,v 1.7 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
@@ -97,16 +97,6 @@ G4NURBStube::G4NURBStube(G4double r, G4double R, G4double DZ)
|
||||
CP(mpCtrlPts[44] , r, 0, DZ, 1 );
|
||||
}
|
||||
|
||||
G4Visible & G4NURBStube::operator = (const G4Visible &right)
|
||||
{
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4NURBStube::operator = (const G4VVisPrim &right)
|
||||
{
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
const char* G4NURBStube::Whoami() const
|
||||
{
|
||||
return "Tube";
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStubesector.cc,v 1.9 2004/12/10 17:48:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4NURBStubesector.cc,v 1.11 2005/10/03 12:30:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
@@ -31,7 +31,7 @@
|
||||
// OC 290896
|
||||
|
||||
#include "G4NURBStubesector.hh"
|
||||
#include <strstream>
|
||||
#include <sstream>
|
||||
|
||||
G4NURBStubesector::G4NURBStubesector(G4double r, G4double R,
|
||||
G4double DZ, G4double PHI1, G4double PHI2)
|
||||
@@ -179,21 +179,10 @@ G4NURBStubesector::G4NURBStubesector(G4double r, G4double R,
|
||||
// to a line instead of a point
|
||||
|
||||
// creating the nurbs identity
|
||||
mpwhoami = new char [200];
|
||||
std::ostrstream tmpstr(mpwhoami, 200);
|
||||
tmpstr << "Tubs" << " \tPHI1=" << PHI1 << " ; PHI2=" << PHI2 << '\0';
|
||||
// could be more sophisticated, reallocating
|
||||
// mpwhoami to the exact length
|
||||
}
|
||||
|
||||
G4Visible & G4NURBStubesector::operator = (const G4Visible &right)
|
||||
{
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4NURBStubesector::operator = (const G4VVisPrim &right)
|
||||
{
|
||||
return G4VVisPrim::operator = (right);
|
||||
std::ostringstream tmpstr;
|
||||
tmpstr << "Tubs" << " \tPHI1=" << PHI1 << " ; PHI2=" << PHI2;
|
||||
mpwhoami = new char [tmpstr.str().length() + 1];
|
||||
mpwhoami = std::strcpy(mpwhoami, tmpstr.str().c_str());
|
||||
}
|
||||
|
||||
const char* G4NURBStubesector::Whoami() const
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PlacedPolyhedron.cc,v 1.3 2001/07/11 10:01:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
|
||||
#include "G4PlacedPolyhedron.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Point3DList.cc,v 1.6 2003/06/16 16:55:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyhedron.cc,v 1.14 2005/03/22 19:18:56 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Polyhedron.cc,v 1.18 2005/08/10 08:20:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
@@ -32,13 +32,6 @@ G4Polyhedron::G4Polyhedron ():
|
||||
|
||||
G4Polyhedron::~G4Polyhedron () {}
|
||||
|
||||
G4Polyhedron::G4Polyhedron (const G4Polyhedron& from)
|
||||
: HepPolyhedron(from), G4VVisPrim(from)
|
||||
{
|
||||
fNumberOfRotationStepsAtTimeOfCreation =
|
||||
from.fNumberOfRotationStepsAtTimeOfCreation;
|
||||
}
|
||||
|
||||
G4Polyhedron::G4Polyhedron (const HepPolyhedron& from)
|
||||
: HepPolyhedron(from)
|
||||
{
|
||||
@@ -46,15 +39,6 @@ G4Polyhedron::G4Polyhedron (const HepPolyhedron& from)
|
||||
from.fNumberOfRotationSteps;
|
||||
}
|
||||
|
||||
G4Polyhedron& G4Polyhedron::operator = (const G4Polyhedron& from) {
|
||||
if (&from == this) return *this;
|
||||
HepPolyhedron::operator = (from);
|
||||
G4VVisPrim::operator = (from);
|
||||
fNumberOfRotationStepsAtTimeOfCreation =
|
||||
from.fNumberOfRotationStepsAtTimeOfCreation;
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4PolyhedronBox::G4PolyhedronBox (G4double dx, G4double dy, G4double dz):
|
||||
G4Polyhedron (HepPolyhedronBox (dx, dy, dz)) {}
|
||||
|
||||
@@ -143,3 +127,17 @@ G4PolyhedronTubs::G4PolyhedronTubs (G4double Rmin, G4double Rmax, G4double Dz,
|
||||
G4Polyhedron (HepPolyhedronTubs (Rmin, Rmax, Dz, Phi1, Dphi)) {}
|
||||
|
||||
G4PolyhedronTubs::~G4PolyhedronTubs () {}
|
||||
|
||||
G4PolyhedronEllipsoid::G4PolyhedronEllipsoid (G4double ax, G4double by,
|
||||
G4double cz,
|
||||
G4double zCut1, G4double zCut2):
|
||||
G4Polyhedron (HepPolyhedronEllipsoid (ax, by, cz, zCut1, zCut2)) {}
|
||||
|
||||
G4PolyhedronEllipsoid::~G4PolyhedronEllipsoid () {}
|
||||
|
||||
G4PolyhedronEllipticalCone::G4PolyhedronEllipticalCone (G4double ax, G4double ay,
|
||||
G4double h,
|
||||
G4double zCut1):
|
||||
G4Polyhedron (HepPolyhedronEllipticalCone (ax, ay, h, zCut1)) {}
|
||||
|
||||
G4PolyhedronEllipticalCone::~G4PolyhedronEllipticalCone () {}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyline.cc,v 1.8 2003/06/16 16:55:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Polyline.cc,v 1.9 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
@@ -31,26 +31,8 @@
|
||||
|
||||
G4Polyline::G4Polyline () {}
|
||||
|
||||
G4Polyline::G4Polyline (const G4VVisPrim& prim):
|
||||
G4VVisPrim (prim)
|
||||
{}
|
||||
|
||||
G4Polyline::~G4Polyline () {}
|
||||
|
||||
G4Visible & G4Polyline::operator = (const G4Visible &right) {
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4Polyline::operator = (const G4VVisPrim &right) {
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
G4Polyline & G4Polyline::operator = (const G4Polyline &right) {
|
||||
if (&right == this) return *this;
|
||||
G4VVisPrim::operator = (right);
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4Polyline& G4Polyline::transform (const G4Transform3D& transformation) {
|
||||
for (iterator i = begin(); i != end(); ++i) i->transform(transformation);
|
||||
return *this;
|
||||
@@ -58,7 +40,7 @@ G4Polyline& G4Polyline::transform (const G4Transform3D& transformation) {
|
||||
|
||||
std::ostream& operator << (std::ostream& os, const G4Polyline& line) {
|
||||
os << "G4Polyline: ";
|
||||
os << '\n' << (G4VVisPrim) line;
|
||||
os << '\n' << (G4Visible) line;
|
||||
os << '\n' << (G4Point3DList) line;
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polymarker.cc,v 1.9 2004/11/11 16:41:27 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Polymarker.cc,v 1.10 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison November 1996
|
||||
@@ -35,25 +35,6 @@ fMarkerType (G4Polymarker::dots)
|
||||
|
||||
G4Polymarker::~G4Polymarker () {}
|
||||
|
||||
G4Visible & G4Polymarker::operator = (const G4Visible &right) {
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4Polymarker::operator = (const G4VVisPrim &right) {
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
G4VMarker & G4Polymarker::operator = (const G4VMarker &right) {
|
||||
return G4VMarker::operator = (right);
|
||||
}
|
||||
|
||||
G4Polymarker & G4Polymarker::operator = (const G4Polymarker &right) {
|
||||
if (&right == this) return *this;
|
||||
G4VMarker::operator = (right);
|
||||
fMarkerType = right.fMarkerType;
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, const G4Polymarker& marker) {
|
||||
os << "G4Polymarker: type: ";
|
||||
switch (marker.fMarkerType) {
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scale.cc,v 1.7 2005/03/22 16:49:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Scale.cc,v 1.8 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 21st July 2001
|
||||
@@ -41,31 +41,6 @@ G4Scale::G4Scale (G4double length, const G4String& annotation,
|
||||
|
||||
G4Scale::~G4Scale () {}
|
||||
|
||||
G4Visible & G4Scale::operator = (const G4Visible &from) {
|
||||
return G4Visible::operator = (from);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4Scale::operator = (const G4VVisPrim &from) {
|
||||
return G4VVisPrim::operator = (from);
|
||||
}
|
||||
|
||||
G4VMarker & G4Scale::operator = (const G4VMarker &from) {
|
||||
return G4VMarker::operator = (from);
|
||||
}
|
||||
|
||||
G4Scale & G4Scale::operator = (const G4Scale &from) {
|
||||
if (&from == this) return *this;
|
||||
G4VMarker::operator = (from);
|
||||
fLength = from.fLength;
|
||||
fAnnotation = from.fAnnotation;
|
||||
fDirection = from.fDirection;
|
||||
fAutoPlacing = from.fAutoPlacing;
|
||||
fXmid = from.fXmid;
|
||||
fYmid = from.fYmid;
|
||||
fZmid = from.fZmid;
|
||||
return *this;
|
||||
}
|
||||
|
||||
const G4String G4Scale::GuidanceString
|
||||
(
|
||||
"An annotated line in the specified direction with tick marks at the"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Square.cc,v 1.3 2001/07/11 10:01:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Square.cc,v 1.4 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -31,21 +31,3 @@
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
G4Square::~G4Square () {}
|
||||
|
||||
G4Visible & G4Square::operator = (const G4Visible &right) {
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4Square::operator = (const G4VVisPrim &right) {
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
G4VMarker & G4Square::operator = (const G4VMarker &right) {
|
||||
return G4VMarker::operator = (right);
|
||||
}
|
||||
|
||||
G4Square& G4Square::operator = (const G4Square& right) {
|
||||
if (&right == this) return *this;
|
||||
G4VMarker::operator = (right);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Text.cc,v 1.6 2001/07/11 10:01:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Text.cc,v 1.7 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
@@ -50,25 +50,3 @@ fXOffset(0.) , fYOffset(0.)
|
||||
{}
|
||||
|
||||
G4Text::~G4Text () {}
|
||||
|
||||
G4Visible & G4Text::operator = (const G4Visible &from) {
|
||||
return G4Visible::operator = (from);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4Text::operator = (const G4VVisPrim &from) {
|
||||
return G4VVisPrim::operator = (from);
|
||||
}
|
||||
|
||||
G4VMarker & G4Text::operator = (const G4VMarker &from) {
|
||||
return G4VMarker::operator = (from);
|
||||
}
|
||||
|
||||
G4Text & G4Text::operator = (const G4Text &from) {
|
||||
if (&from == this) return *this;
|
||||
G4VMarker::operator = (from);
|
||||
fText = from.fText;
|
||||
fLayout = from.fLayout;
|
||||
fXOffset = from.fXOffset;
|
||||
fYOffset = from.fYOffset;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VMarker.cc,v 1.8 2003/06/16 16:55:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VMarker.cc,v 1.9 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -38,15 +38,6 @@ G4VMarker::G4VMarker ():
|
||||
fInfo (G4String())
|
||||
{}
|
||||
|
||||
G4VMarker::G4VMarker (const G4VMarker& marker):
|
||||
G4VVisPrim (marker),
|
||||
fPosition (marker.fPosition),
|
||||
fWorldSize (marker.fWorldSize),
|
||||
fScreenSize (marker.fScreenSize),
|
||||
fFillStyle (marker.fFillStyle),
|
||||
fInfo (marker.fInfo)
|
||||
{}
|
||||
|
||||
G4VMarker::G4VMarker (const G4Point3D& pos):
|
||||
fPosition (pos),
|
||||
fWorldSize (0.),
|
||||
@@ -57,23 +48,16 @@ G4VMarker::G4VMarker (const G4Point3D& pos):
|
||||
|
||||
G4VMarker::~G4VMarker () {}
|
||||
|
||||
G4Visible & G4VMarker::operator = (const G4Visible &right) {
|
||||
return G4Visible::operator = (right);
|
||||
}
|
||||
|
||||
G4VVisPrim & G4VMarker::operator = (const G4VVisPrim &right) {
|
||||
return G4VVisPrim::operator = (right);
|
||||
}
|
||||
|
||||
G4VMarker& G4VMarker::operator = (const G4VMarker& right) {
|
||||
if (&right == this) return *this;
|
||||
G4VVisPrim::operator = (right);
|
||||
fPosition = right.fPosition;
|
||||
fWorldSize = right.fWorldSize;
|
||||
fScreenSize = right.fScreenSize;
|
||||
fFillStyle = right.fFillStyle;
|
||||
fInfo = right.fInfo;
|
||||
return *this;
|
||||
G4bool G4VMarker::operator != (const G4VMarker& m) const {
|
||||
if (
|
||||
(G4Visible::operator != (m)) ||
|
||||
(fWorldSize != m.fWorldSize) ||
|
||||
(fScreenSize != m.fScreenSize) ||
|
||||
(fFillStyle != m.fFillStyle) ||
|
||||
!(fPosition == m.fPosition)
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, const G4VMarker& marker) {
|
||||
@@ -94,22 +78,10 @@ std::ostream& operator << (std::ostream& os, const G4VMarker& marker) {
|
||||
default:
|
||||
os << "unrecognised"; break;
|
||||
}
|
||||
os << "\n " << (G4VVisPrim) marker;
|
||||
os << "\n " << (G4Visible) marker;
|
||||
return os;
|
||||
}
|
||||
|
||||
G4bool G4VMarker::operator != (const G4VMarker& m) const {
|
||||
if (
|
||||
!(G4VVisPrim::operator == (m)) ||
|
||||
(fWorldSize != m.fWorldSize) ||
|
||||
(fScreenSize != m.fScreenSize) ||
|
||||
(fFillStyle != m.fFillStyle) ||
|
||||
!(fPosition == m.fPosition)
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
const G4String& G4VMarker::GetInfo() const { return fInfo ;}
|
||||
|
||||
void G4VMarker::SetInfo( const G4String& info ){ fInfo = info ;}
|
||||
|
||||
+13
-34
@@ -21,46 +21,25 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisPrim.cc,v 1.8 2003/06/16 16:55:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VVisManager.cc,v 1.3 2005/10/17 20:54:29 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison August 1995
|
||||
// Abstract interface for GEANT4 Visualization Manager.
|
||||
// John Allison 19/Oct/1996.
|
||||
|
||||
#include "G4VVisPrim.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
G4VVisPrim::G4VVisPrim () {}
|
||||
G4VVisManager::~G4VVisManager () {}
|
||||
|
||||
G4VVisPrim::G4VVisPrim (const G4VVisPrim& prim):
|
||||
G4Visible (prim)
|
||||
{}
|
||||
G4VVisManager* G4VVisManager::fpConcreteInstance = 0;
|
||||
|
||||
G4VVisPrim::G4VVisPrim (const G4VisAttributes* pVA):
|
||||
G4Visible (pVA)
|
||||
{}
|
||||
|
||||
G4VVisPrim::~G4VVisPrim () {}
|
||||
|
||||
G4Visible& G4VVisPrim::operator = (const G4Visible& right) {
|
||||
return G4Visible::operator = (right);
|
||||
G4VVisManager* G4VVisManager::GetConcreteInstance ()
|
||||
{
|
||||
return fpConcreteInstance;
|
||||
}
|
||||
|
||||
G4VVisPrim& G4VVisPrim::operator = (const G4VVisPrim& right) {
|
||||
if (&right == this) return *this;
|
||||
G4Visible::operator = (right);
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4bool G4VVisPrim::operator == (const G4Visible& right) const{
|
||||
return G4Visible::operator == (right);
|
||||
}
|
||||
|
||||
G4bool G4VVisPrim::operator == (const G4VVisPrim& right) const{
|
||||
return G4Visible::operator == (right);
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, const G4VVisPrim& prim) {
|
||||
return os << (G4Visible) prim;
|
||||
void G4VVisManager::SetConcreteInstance (G4VVisManager* m)
|
||||
{
|
||||
fpConcreteInstance = m;
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.cc,v 1.10 2004/07/28 15:44:32 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 23rd October 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExtent.cc,v 1.9 2005/02/19 22:00:11 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// A.Walkden 28/11/95
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Visible.cc,v 1.12 2005/05/26 10:34:55 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Visible.cc,v 1.13 2005/07/05 14:04:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 30th October 1996
|
||||
@@ -32,22 +32,23 @@
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
G4Visible::G4Visible (): fpVisAttributes (0) {}
|
||||
|
||||
G4Visible::~G4Visible () {}
|
||||
|
||||
G4Visible& G4Visible::operator = (const G4Visible& right) {
|
||||
if (&right == this) return *this;
|
||||
fpVisAttributes = right.fpVisAttributes;
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4bool G4Visible::operator == (const G4Visible& right) const{
|
||||
return fpVisAttributes == right.fpVisAttributes;
|
||||
}
|
||||
G4Visible::G4Visible (const G4VisAttributes* pVA):
|
||||
fpVisAttributes (pVA)
|
||||
{}
|
||||
|
||||
void G4Visible::SetVisAttributes (const G4VisAttributes& VA) {
|
||||
fpVisAttributes = new G4VisAttributes(VA);
|
||||
}
|
||||
|
||||
G4bool G4Visible::operator != (const G4Visible& right) const {
|
||||
// Simple test on non-equality of address...
|
||||
return fpVisAttributes != right.fpVisAttributes;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, const G4Visible& v) {
|
||||
if (v.fpVisAttributes) return os << *(v.fpVisAttributes);
|
||||
else return os << "No Visualization Attributes";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user