Ignore:
Timestamp:
Feb 18, 2009, 10:59:48 AM (16 years ago)
Author:
garnier
Message:

rien de special, juste un backup avant de commiter sur cvs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenInventor/src/SoGL2PSAction.cc

    r929 r930  
    3333/*--------------------------------------------------------------------------*/
    3434
    35 #define G4DEBUG_VIS_OGL 1
     35//#define G4DEBUG_VIS_OGL 1
    3636
    3737// this :
     
    172172}
    173173
    174 void SoGL2PSAction::DrawXYPolygon
    175 (G4double size,
    176  const G4Point3D& centre,
    177  const G4VisAttributes* pApplicableVisAtts)
    178 {
    179   G4int nSides;
    180   G4double startPhi;
    181   nSides = GetNoOfSides(pApplicableVisAtts);
    182   startPhi = 0.;
    183 
    184   const G4Vector3D& viewpointDirection =
    185     fpViewer -> GetViewParameters().GetViewpointDirection();
    186   const G4Vector3D& up = fpViewer->GetViewParameters().GetUpVector();
    187   const G4double dPhi = twopi / nSides;
    188   const G4double radius = size / 2.;
    189   G4Vector3D start = radius * (up.cross(viewpointDirection)).unit();
    190   G4double phi;
    191   G4int i;
    192 
    193   glBegin (GL_POLYGON);
    194   for (i = 0, phi = startPhi; i < nSides; i++, phi += dPhi) {
    195     G4Vector3D r = start; r.rotate(phi, viewpointDirection);
    196     G4Vector3D p = centre + r;
    197     glVertex3d (p.x(), p.y(), p.z());
    198   }
    199   glEnd ();
    200 }
    201174
    202175#endif
Note: See TracChangeset for help on using the changeset viewer.