1 | // |
---|
2 | // ******************************************************************** |
---|
3 | // * License and Disclaimer * |
---|
4 | // * * |
---|
5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
7 | // * conditions of the Geant4 Software License, included in the file * |
---|
8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
9 | // * include a list of copyright holders. * |
---|
10 | // * * |
---|
11 | // * Neither the authors of this software system, nor their employing * |
---|
12 | // * institutes,nor the agencies providing financial support for this * |
---|
13 | // * work make any representation or warranty, express or implied, * |
---|
14 | // * regarding this software system or assume any liability for its * |
---|
15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
16 | // * for the full disclaimer and the limitation of liability. * |
---|
17 | // * * |
---|
18 | // * This code implementation is the result of the scientific and * |
---|
19 | // * technical work of the GEANT4 collaboration. * |
---|
20 | // * By using, copying, modifying or distributing the software (or * |
---|
21 | // * any work based on the software) you agree to acknowledge its * |
---|
22 | // * use in resulting scientific publications, and indicate your * |
---|
23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
24 | // ******************************************************************** |
---|
25 | // |
---|
26 | // |
---|
27 | // $Id: G4NURBShexahedron.cc,v 1.7 2006/06/29 19:06:49 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-04-beta-01 $ |
---|
29 | // |
---|
30 | // hexahedron implementation |
---|
31 | // OC 17 9 96 |
---|
32 | |
---|
33 | #include "G4NURBShexahedron.hh" |
---|
34 | |
---|
35 | G4NURBShexahedron::G4NURBShexahedron(const G4ThreeVector c [8]) |
---|
36 | : G4NURBS( 2, 2, // linear along U and V |
---|
37 | 5, 4 ) // Square x polyline |
---|
38 | { |
---|
39 | // let's it Generate regular knots vector |
---|
40 | |
---|
41 | CP(mpCtrlPts[To1d(0,0)] , c[0].x(), c[0].y(), c[0].z(), 1 ); |
---|
42 | CP(mpCtrlPts[To1d(1,0)] , c[1].x(), c[1].y(), c[1].z(), 1 ); |
---|
43 | CP(mpCtrlPts[To1d(2,0)] , c[1].x(), c[1].y(), c[1].z(), 1 ); |
---|
44 | CP(mpCtrlPts[To1d(3,0)] , c[0].x(), c[0].y(), c[0].z(), 1 ); |
---|
45 | CP(mpCtrlPts[To1d(4,0)] , c[0].x(), c[0].y(), c[0].z(), 1 ); |
---|
46 | |
---|
47 | CP(mpCtrlPts[To1d(0,1)] , c[0].x(), c[0].y(), c[0].z(), 1 ); |
---|
48 | CP(mpCtrlPts[To1d(1,1)] , c[1].x(), c[1].y(), c[1].z(), 1 ); |
---|
49 | CP(mpCtrlPts[To1d(2,1)] , c[2].x(), c[2].y(), c[2].z(), 1 ); |
---|
50 | CP(mpCtrlPts[To1d(3,1)] , c[3].x(), c[3].y(), c[3].z(), 1 ); |
---|
51 | CP(mpCtrlPts[To1d(4,1)] , c[0].x(), c[0].y(), c[0].z(), 1 ); |
---|
52 | |
---|
53 | CP(mpCtrlPts[To1d(0,2)] , c[4].x(), c[4].y(), c[4].z(), 1 ); |
---|
54 | CP(mpCtrlPts[To1d(1,2)] , c[5].x(), c[5].y(), c[5].z(), 1 ); |
---|
55 | CP(mpCtrlPts[To1d(2,2)] , c[6].x(), c[6].y(), c[6].z(), 1 ); |
---|
56 | CP(mpCtrlPts[To1d(3,2)] , c[7].x(), c[7].y(), c[7].z(), 1 ); |
---|
57 | CP(mpCtrlPts[To1d(4,2)] , c[4].x(), c[4].y(), c[4].z(), 1 ); |
---|
58 | |
---|
59 | CP(mpCtrlPts[To1d(0,3)] , c[4].x(), c[4].y(), c[4].z(), 1 ); |
---|
60 | CP(mpCtrlPts[To1d(1,3)] , c[5].x(), c[5].y(), c[5].z(), 1 ); |
---|
61 | CP(mpCtrlPts[To1d(2,3)] , c[5].x(), c[5].y(), c[5].z(), 1 ); |
---|
62 | CP(mpCtrlPts[To1d(3,3)] , c[4].x(), c[4].y(), c[4].z(), 1 ); |
---|
63 | CP(mpCtrlPts[To1d(4,3)] , c[4].x(), c[4].y(), c[4].z(), 1 ); |
---|
64 | } |
---|
65 | |
---|
66 | const char* G4NURBShexahedron::Whoami() const |
---|
67 | { |
---|
68 | return "Hexahedron"; |
---|
69 | } |
---|