1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

Replacing french comments by english one

This commit is contained in:
bugmaster
2011-04-28 16:28:27 +00:00
committed by bugmaster
parent 94354caf54
commit 81bba7173e
140 changed files with 4625 additions and 4701 deletions

View File

@@ -187,7 +187,7 @@ Graphic3d_Array1OfVertex Points(0,NFACES);
if ( Norme >= 0.0001 ) {
VX= DX/Norme; VY = DY/Norme; VZ = DZ/Norme;
//Construction d'un repere i,j pour le cercle:
//Construction of marker i,j for the circle:
Xn=0., Yn=0., Zn=0.;
if ( Abs(VX) <= Abs(VY) && Abs(VX) <= Abs(VZ)) Xn=1.;
else if ( Abs(VY) <= Abs(VZ) && Abs(VY) <= Abs(VX)) Yn=1.;
@@ -302,7 +302,7 @@ Standard_Integer u, v;
cin >> u; cin >> v;
V3d::SetPlane (aViewer, x1, y1, z1, x2, y2, z2);
// Pour relancer le calcul selon le nouveau plan
// To restart the calculation on the new plane
if (aViewer->Grid ()->IsActive ()) {
Standard_Real xo, yo;
Quantity_PlaneAngle angle;

View File

@@ -56,17 +56,17 @@ V3d_Camera::V3d_Camera(const Handle(V3d_View)& aView) {
Standard_Real X,Y,Z;
Graphic3d_Vertex P,T;
// Le point oeil definit la position de la camera
// The eye point defines the position of the camera
aView->Eye(X,Y,Z);
P.SetCoord(X,Y,Z);
MyPosition = P;
// Le point vise definit la cible de la camera
// The target point defines the target of the camera
aView->At(X,Y,Z);
T.SetCoord(X,Y,Z);
MyTarget = T;
// Angle d'inclinaison de la camera
// Incline Angle of the camera
MyAngle = aView->Twist();
// Angle d'ouverture de la camera
// Aperture Angle of the camera
MyAperture = (aView->DynamicType()==STANDARD_TYPE(V3d_PerspectiveView)) ?
((Handle(V3d_PerspectiveView)&)aView)->Angle() : 0.;
@@ -102,8 +102,8 @@ void V3d_Camera::SetRadius(const Standard_Real Radius) {
Standard_Real X0,Y0,Z0,Xn,Yn,Zn;
// Le point cible reste inchange, seul la position de la camera est modifiee
// en conservant la direction.
// Targer point remains unchanged, only the position of the camera is modified
// preserving the direction.
Graphic3d_Vector D(MyTarget,MyPosition);
D.Normalize();
D.Coord(Xn,Yn,Zn);
@@ -122,7 +122,7 @@ void V3d_Camera::OnHideFace(const Handle(V3d_View)& aView) {
Rayon = this->Radius();
MyPosition.Coord(XP,YP,ZP);
SymetricPointOnSphere(aView,MyTarget,MyPosition,Rayon,X,Y,Z,VX,VY,VZ);
// Actuellement est on sur le point vu
// This point is visible
if ( (VX*(X-XP) < 0.) && (VY*(Y-YP) < 0.) && (VZ*(Z-ZP) < 0.) ) {
this->SetPosition(X,Y,Z);
}
@@ -135,7 +135,7 @@ void V3d_Camera::OnSeeFace(const Handle(V3d_View)& aView) {
Rayon = this->Radius();
MyPosition.Coord(XP,YP,ZP);
SymetricPointOnSphere(aView,MyTarget,MyPosition,Rayon,X,Y,Z,VX,VY,VZ);
// Actuellement est on sur le point cache
// This point is hidden
if ( (VX*(X-XP) > 0.) && (VY*(Y-YP) > 0.) && (VZ*(Z-ZP) > 0.) ) {
this->SetPosition(X,Y,Z);
}
@@ -149,12 +149,12 @@ Standard_Boolean V3d_Camera::SeeOrHide(const Handle(V3d_View)& aView) const {
Rayon = this->Radius();
MyPosition.Coord(XP,YP,ZP);
SymetricPointOnSphere(aView,MyTarget,MyPosition,Rayon,X,Y,Z,VX,VY,VZ);
// Avons nous le point cache ou le point vu
// Is it a visible or a hidden point?
if ( (VX*(X-XP) > 0.) || (VY*(Y-YP) > 0.) || (VZ*(Z-ZP) > 0.) )
// la source est sur la face cachee
// the source is on the hidden face
Val = Standard_False;
else
// la source est sur la face vue.
// the source is on the visible face.
Val = Standard_True;
return Val;
@@ -206,17 +206,17 @@ void V3d_Camera::Symbol (const Handle(Graphic3d_Group)& gsymbol,
Graphic3d_Array1OfVertex VN2(1,NbPoints+1);
Graphic3d_Array1OfVertex V2(1,2);
// Direction de la camera
// Direction of the camera
MyPosition.Coord(XP,YP,ZP);
MyTarget.Coord(X0,Y0,Z0);
Dx = X0 - XP; Dy = Y0 - YP; Dz = Z0 - ZP;
Lng = this->Radius()/10.;
// Recherche des centres des carres de base du boitier de la camera :
// Find centers of base squares of the case of the camera :
Xc1 = XP - Dx * Lng; Yc1 = YP - Dy * Lng; Zc1 = ZP - Dz * Lng;
Xc2 = XP + Dx * Lng; Yc2 = YP + Dy * Lng; Zc2 = ZP + Dz * Lng;
// Construction d'un repere i,j pour les rectangles :
// Construction of a mark i,j for rectangles :
Xn=0., Yn=0., Zn=0.;
if ( Abs(Dx) <= Abs(Dy) && Abs(Dx) <= Abs(Dz)) Xn=1.;
@@ -233,13 +233,13 @@ void V3d_Camera::Symbol (const Handle(Graphic3d_Group)& gsymbol,
Yj = Dz * Xi - Dx * Zi;
Zj = Dx * Yi - Dy * Xi;
// Dessin du boitier
// Scheme of the case
for (i = 1 ; i <= NbPoints ; i++) {
cosinus = Cos ( Alpha + (i - 1) * Standard_PI/2. );
sinus = Sin ( Alpha + (i - 1) * Standard_PI/2. );
// Premier carre de base
// First base square
X = Xc1 + (cosinus * Xi + sinus * Xj) * Lng / 2.;
Y = Yc1 + (cosinus * Yi + sinus * Yj) * Lng / 2.;
Z = Zc1 + (cosinus * Zi + sinus * Zj) * Lng / 2.;
@@ -247,7 +247,7 @@ void V3d_Camera::Symbol (const Handle(Graphic3d_Group)& gsymbol,
if(i==1) VN1(NbPoints+1).SetCoord(X,Y,Z);
V2(1).SetCoord(X,Y,Z);
// Second carre de base
// Second base square
X = Xc2 + (cosinus * Xi + sinus * Xj) * Lng / 2.;
Y = Yc2 + (cosinus * Yi + sinus * Yj) * Lng / 2.;
Z = Zc2 + (cosinus * Zi + sinus * Zj) * Lng / 2.;
@@ -260,7 +260,7 @@ void V3d_Camera::Symbol (const Handle(Graphic3d_Group)& gsymbol,
gsymbol->Polyline(VN1);
gsymbol->Polyline(VN2);
// Dessin de l'objectif
// Scheme of the objective
for (i = 1 ; i <= NbPoints ; i++) {
cosinus = Cos ( Alpha + (i - 1) * Standard_PI/2. );
@@ -274,7 +274,7 @@ void V3d_Camera::Symbol (const Handle(Graphic3d_Group)& gsymbol,
if(i==1) VN1(NbPoints+1).SetCoord(X,Y,Z);
V2(1).SetCoord(X,Y,Z);
// Second carre de base
// Second base square
X = Xc2 + Dx * Lng / 6. + (cosinus * Xi + sinus * Xj) * Lng / 3.;
Y = Yc2 + Dy * Lng / 6. + (cosinus * Yi + sinus * Yj) * Lng / 3.;
Z = Zc2 + Dz * Lng / 6. + (cosinus * Zi + sinus * Zj) * Lng / 3.;
@@ -303,8 +303,8 @@ void V3d_Camera::Display( const Handle(V3d_View)& aView,
V3d_TypeOfUpdate UpdSov;
// Creation d'une structure d'elements reperables (la position de
// la camera, et la sphere de deplacement de cette camera)
// Creation of a structure of markable elements (position of the
// camera, and the sphere of displacement of this camera)
Pres = TPres;
Handle(V3d_Viewer) TheViewer = aView->Viewer();
@@ -336,18 +336,18 @@ void V3d_Camera::Display( const Handle(V3d_View)& aView,
Handle(Graphic3d_Group) gsphere;
if (Pres == V3d_COMPLETE || Pres == V3d_PARTIAL) gsphere = new Graphic3d_Group(MyGraphicStructure);
// Creation d'une structure d'elements non reperables ( meridien et
// parallele ).
// Creation of a structure of non-markable elements (meridian and
// parallel ).
Handle(Graphic3d_Group) gnopick = new Graphic3d_Group(MyGraphicStructure1);
MyGraphicStructure1->SetPick(Standard_False);
MyTarget.Coord(X0,Y0,Z0);
//Affichage de la position de la camera.
// Display of the position of the camera.
gcamera->SetPickId(1);
if (Pres == V3d_SIMPLE) {
// on dessine un viseur
// a viewfinder is drawn
Graphic3d_Array1OfVertex PViseur(1,2);
aView->Project(X0,Y0,Z0,PXT,PYT);
aView->Convert(PXT,PYT,IXP,IYP);
@@ -363,10 +363,10 @@ void V3d_Camera::Display( const Handle(V3d_View)& aView,
PViseur(2).SetCoord(X+X0-XT,Y+Y0-YT,Z+Z0-ZT);
gcamera->Polyline(PViseur);
}
// on dessine une camera
// a camera is drawn
else this->Symbol(gcamera,aView);
//Affichage de la sphere de reperage (limite au cercle).
// Display of the marking sphere (limited to circle).
if (Pres == V3d_COMPLETE || Pres == V3d_PARTIAL) {
@@ -375,7 +375,7 @@ void V3d_Camera::Display( const Handle(V3d_View)& aView,
gsphere->SetPickId(2);
V3d::CircleInPlane(gsphere,X0,Y0,Z0,VX,VY,VZ,Rayon);
//Affichage du rayon de la sphere (ligne + texte)
// Display of the radius of the sphere (line + text)
if (Pres == V3d_COMPLETE) {
gradius->SetPickId(3);
@@ -395,14 +395,14 @@ void V3d_Camera::Display( const Handle(V3d_View)& aView,
gradius->Text(ValOfRadius.ToCString(),PText,0.01);
}
//Affichage du meridien
// Display of the meridian
Quantity_Color Col2(Quantity_NOC_GREEN);
Handle(Graphic3d_AspectLine3d) Asp2 = new Graphic3d_AspectLine3d
(Col2,Aspect_TOL_SOLID,1.);
gnopick->SetPrimitivesAspect(Asp2);
// Definition de l'axe du cercle
// Definition of the axis of circle
aView->Up(DXRef,DYRef,DZRef);
this->Position(X,Y,Z);
DXini = X-X0; DYini = Y-Y0; DZini = Z-Z0;
@@ -412,9 +412,9 @@ void V3d_Camera::Display( const Handle(V3d_View)& aView,
V3d::CircleInPlane(gnopick,X0,Y0,Z0,VX,VY,VZ,Rayon);
//Affichage de la parallele
// Display of the parallel
// Definition de l'axe du cercle
// Definition of the axis of circle
aView->Proj(VX,VY,VZ);
aView->Up(X1,Y1,Z1);
DXRef = VY * Z1 - VZ * Y1;
@@ -500,11 +500,11 @@ void V3d_Camera::Tracking( const Handle(V3d_View)& aView,
MyTarget.Coord(X0,Y0,Z0);
aView->Project(X0,Y0,Z0,PXT,PYT);
aView->Convert(PXT,PYT,IPX,IPY);
// Coord 3d dans le plan de projection de la cible.
// Coord 3d in the plane of projection of the target.
aView->Convert(IPX,IPY,XT,YT,ZT);
switch (WhatPick) {
case V3d_POSITIONCAMERA :
// Les Coordonnees doivent rester a l'interieur de la sphere
// Coordinates should remain inside of the sphere
Rayon = this->Radius();
XMinTrack = PXT - Rayon;
XMaxTrack = PXT + Rayon;
@@ -518,14 +518,13 @@ void V3d_Camera::Tracking( const Handle(V3d_View)& aView,
DeltaY = Y0 - YP;
DeltaZ = Z0 - ZP;
// On recherche le point d'intersection des droites definies
// par :
// - Droite passant par le point de projection et l'oeil
// si on est en perspective, parralele a la normale de la
// vue si on a une vue axonometrique.
// position dans la vue est // a la normale de la vue
// - La distance position de la camera cible est egale au
// rayon.
// The point of intersection of straight lines defined by :
// - Straight line passing by the point of projection and the eye
// if this is a perspective, parallel to the normal of the
// view if there is an axonometric view.
// position in the view is parallel to the normal of the view
// - The distance position of the target camera cible is equal
// to the radius.
A = VX*VX + VY*VY + VZ*VZ ;
B = -2. * (VX*DeltaX + VY*DeltaY + VZ*DeltaZ);
@@ -547,8 +546,8 @@ void V3d_Camera::Tracking( const Handle(V3d_View)& aView,
}
case V3d_SPACECAMERA :
aView->Convert(PXT,PYT,IPX,IPY);
// Dans ce cas Xpix,Ypix correspondent a une distance , relative
// a la translation que l'on veut effectuer sur la sphere.
// In case Xpix,Ypix corresponding to a distance , relative
// to the translation that is planned to be done on the sphere.
aView->Convert(IPX+Xpix,IPY+Ypix,X,Y,Z);
X = X+X0-XT;
Y = Y+Y0-YT;
@@ -564,8 +563,8 @@ void V3d_Camera::Tracking( const Handle(V3d_View)& aView,
break;
case V3d_ExtRADIUSCAMERA :
// on cherche a conserver la direction cible positionnement de la
// camera ==> on projette le point sur la direction cible camera.
// It is attempted to preserve the target positioning direction of the
// camera ==> the point is projected on the target camera direction.
this->Position(Xi,Yi,Zi);
aView->Project(Xi,Yi,Zi,PXP,PYP);
DX = PXP - PXT;
@@ -586,9 +585,8 @@ void V3d_Camera::Tracking( const Handle(V3d_View)& aView,
}
break;
case V3d_IntRADIUSCAMERA :
// on cherche a conserver la direction cible positionnement
// de la camera ==> on projette le point sur la direction
// cible camera.
// It is attempted to preserve the target positioning direction of the
// camera ==> the point is projected on the target camera direction.
this->Position(Xi,Yi,Zi);
aView->Project(Xi,Yi,Zi,PXP,PYP);
DX = PXP - PXT;
@@ -603,8 +601,7 @@ void V3d_Camera::Tracking( const Handle(V3d_View)& aView,
Rap = NewRprj/OldRprj;
Rayon = this->Radius();
Rayon = Rayon * Rap;
// la camera doit rester a une position fixe, seule la cible
// est modifie.
// the camera should remain at a fixed position, only the target is modified.
Graphic3d_Vector Dir(MyPosition,MyTarget);
Dir.Normalize();
Dir.Coord(X,Y,Z);
@@ -639,10 +636,10 @@ void V3d_Camera::AerialPilot( const Handle(V3d_View)& aView,
aView->At(Xv,Yv,Zv);
aView->Project(Xv,Yv,Zv,PXT,PYT);
aView->Convert(PXT,PYT,IPX,IPY);
// Recherche de tangage ==> Xpix = IPX et Ypix inverse
// C'est le point vise qui tourne autour de l'axe passant par l'oeil et
// de direction un vecteur appartenant au plan de la vue et
// perpendiculaire au vecteur haut de la vue.
// Find the pitching ==> Xpix = IPX and Ypix inverted
// The target point turns around an axis passing through the eye and the
// direction of vector belonging to the view plane
// and perpendicular to the vector above the view.
if ( Ypix != IPY ) {
aView->Size(Width,Height);
IHeight = aView->Convert(Height);
@@ -669,14 +666,14 @@ void V3d_Camera::AerialPilot( const Handle(V3d_View)& aView,
Xf = Xp * MatRot(0,0) + Yp * MatRot(0,1) + Zp * MatRot(0,2);
Yf = Xp * MatRot(1,0) + Yp * MatRot(1,1) + Zp * MatRot(1,2);
Zf = Xp * MatRot(2,0) + Yp * MatRot(2,1) + Zp * MatRot(2,2);
// Rotation du point vise (cible de la camera)
// Rotation of the target point (target of the camera)
X1 = Xc * MatRot(0,0) + Yc * MatRot(0,1) + Zc * MatRot(0,2);
Y1 = Xc * MatRot(1,0) + Yc * MatRot(1,1) + Zc * MatRot(1,2);
Z1 = Xc * MatRot(2,0) + Yc * MatRot(2,1) + Zc * MatRot(2,2);
Xc = X1 + Xp - Xf ; Yc = Y1 + Yp - Yf ; Zc = Z1 + Zp - Zf;
MyTarget.SetCoord(Xc,Yc,Zc);
}
// Recherche de roulis determine par Xpix
// Find the rolling determined by Xpix
if ( Xpix != IPX ) {
IWidth = aView->Convert(Width);
Beta = ((IPX - Xpix)*Standard_PI)/(IWidth*2.);
@@ -688,8 +685,8 @@ void V3d_Camera::AerialPilot( const Handle(V3d_View)& aView,
void V3d_Camera::EarthPilot( const Handle(V3d_View)& aView,
const Standard_Integer Xpix,
const Standard_Integer Ypix) {
// Le pilotage en mode terrestre, ressemble a la conduite d'une voiture
// Dans ce cas, seul le point cible est modifie.
// Piloting in land mode, resembles to the car driving
// In this case, only the target point is modified.
Standard_Real Xp,Yp,Zp,Xc,Yc,Zc,Xv,Yv,Zv,Xf,Yf,Zf;
Standard_Real VX,VY,VZ,DXH,DYH,DZH,A,B,C,PXT,PYT,X1,Y1,Z1,Dist;
@@ -702,10 +699,10 @@ void V3d_Camera::EarthPilot( const Handle(V3d_View)& aView,
aView->At(Xv,Yv,Zv);
aView->Project(Xv,Yv,Zv,PXT,PYT);
aView->Convert(PXT,PYT,IPX,IPY);
// Recherche d' inclinaison==> Xpix = IPX et Ypix inverse
// C'est le point vise qui tourne autour de l'axe passant par l'oeil et
// de direction un vecteur appartenant au plan de la vue et
// perpendiculaire au vecteur haut de la vue.
// Find the pitching ==> Xpix = IPX and Ypix inverted
// The target point turns around an axis passing through the eye and the
// direction of vector belonging to the view plane
// and perpendicular to the vector above the view.
if ( Ypix != IPY ) {
aView->Size(Width,Height);
IHeight = aView->Convert(Height);
@@ -732,14 +729,14 @@ void V3d_Camera::EarthPilot( const Handle(V3d_View)& aView,
Xf = Xp * MatRot(0,0) + Yp * MatRot(0,1) + Zp * MatRot(0,2);
Yf = Xp * MatRot(1,0) + Yp * MatRot(1,1) + Zp * MatRot(1,2);
Zf = Xp * MatRot(2,0) + Yp * MatRot(2,1) + Zp * MatRot(2,2);
// Rotation du point vise (cible de la camera)
// Rotation of the target point (target of the camera)
X1 = Xc * MatRot(0,0) + Yc * MatRot(0,1) + Zc * MatRot(0,2);
Y1 = Xc * MatRot(1,0) + Yc * MatRot(1,1) + Zc * MatRot(1,2);
Z1 = Xc * MatRot(2,0) + Yc * MatRot(2,1) + Zc * MatRot(2,2);
Xc = X1 + Xp - Xf ; Yc = Y1 + Yp - Yf ; Zc = Z1 + Zp - Zf;
}
// Recherche de virage ==> Ypix = IPY . Le point vise tourne aoutour
// d'un axe // au vecteur haut passant par l'oeil
// Find turning ==> Ypix = IPY . The target point rotates around
// an axis // a vector above passing through the eye
if ( Xpix != IPX ) {
IWidth = aView->Convert(Width);
Beta = ((IPX - Xpix)*Standard_PI)/(IWidth*2.);
@@ -761,7 +758,7 @@ void V3d_Camera::EarthPilot( const Handle(V3d_View)& aView,
Xf = Xp * MatRot(0,0) + Yp * MatRot(0,1) + Zp * MatRot(0,2);
Yf = Xp * MatRot(1,0) + Yp * MatRot(1,1) + Zp * MatRot(1,2);
Zf = Xp * MatRot(2,0) + Yp * MatRot(2,1) + Zp * MatRot(2,2);
// Rotation du point vise (cible de la camera)
// Rotation of the target point (target of the camera)
X1 = Xc * MatRot(0,0) + Yc * MatRot(0,1) + Zc * MatRot(0,2);
Y1 = Xc * MatRot(1,0) + Yc * MatRot(1,1) + Zc * MatRot(1,2);
Z1 = Xc * MatRot(2,0) + Yc * MatRot(2,1) + Zc * MatRot(2,2);
@@ -771,7 +768,7 @@ void V3d_Camera::EarthPilot( const Handle(V3d_View)& aView,
}
void V3d_Camera::Move (const Standard_Real Dist) {
// Deplacement de la camera en conservant la direction camera - cible.
// Displacement of the camera by preserving the direction camera - target.
Standard_Real XP,YP,ZP,X0,Y0,Z0,DX,DY,DZ,Norme;
@@ -788,8 +785,8 @@ void V3d_Camera::Move (const Standard_Real Dist) {
void V3d_Camera::GoUp (const Standard_Real Haut) {
// Deplacement de la camera suivant l'axe z, en conservant la direction camera
// cible de la camera
// Displacement of the camera by axis z, preserving the direction camera -
// target of the camera
MyPosition.SetZCoord(MyPosition.Z()+Haut);
MyTarget.SetZCoord(MyTarget.Z()+Haut);
@@ -811,14 +808,13 @@ void V3d_Camera::SymetricPointOnSphere (const Handle(V3d_View)& aView, const Gra
DeltaY = Y0 - YP;
DeltaZ = Z0 - ZP;
// On recherche le point d'intersection des droites definies
// par :
// - Droite passant par le point de projection et l'oeil
// si on est en perspective, parralele a la normale de la
// vue si on a une vue axonometrique.
// position dans la vue est // a la normale de la vue
// - La distance position de la camera cible est egale au
// rayon.
// The point of intersection of straight lines defined by :
// - Straight line passing by the point of projection and the eye
// if this is a perspective, parallel to the normal of the
// view if there is an axonometric view.
// position in the view is parallel to the normal of the view
// - The distance position of the target camera cible is equal
// to the radius.
A = VX*VX + VY*VY + VZ*VZ ;
B = -2. * (VX*DeltaX + VY*DeltaY + VZ*DeltaZ);

View File

@@ -4,12 +4,8 @@
----------
Classe V3d_CircularGrid :
HISTORIQUE DES MODIFICATIONS :
VERSION HISTORY :
--------------------------------
16-08-98 : CAL ; S3892. Ajout grilles 3d.
13-10-98 : CAL ; S3892. Ajout de la gestion de la taille des grilles 3d.
23-10-98 : CAL ; PRO 15885. Patch K4403 et K4404
03-11-98 : CAL ; PRO 16161. Patch K4418 et K4419
IMP230300: GG The color fields and methods have moved in Aspect_Grid
@@ -156,7 +152,7 @@ TColStd_Array2OfReal Trsf (1, 4, 1, 4);
Trsf (1, 4) = xl,
Trsf (2, 4) = yl,
Trsf (3, 4) = zl;
// Transformation de changement de repere
// Transformation change of marker
Trsf (1, 1) = xdx,
Trsf (2, 1) = xdy,
Trsf (3, 1) = xdz,
@@ -168,11 +164,11 @@ TColStd_Array2OfReal Trsf (1, 4, 1, 4);
Trsf (3, 3) = dz;
myStructure->SetTransform (Trsf, Graphic3d_TOC_REPLACE);
// Translation de l'origine
// Translation of the origin
Trsf (1, 4) = -XOrigin (),
Trsf (2, 4) = -YOrigin (),
Trsf (3, 4) = 0.0;
// Rotation Alpha autour de l'axe -Z
// Rotation Alpha around axis -Z
Trsf (1, 1) = CosAlpha,
Trsf (2, 1) = -SinAlpha,
Trsf (3, 1) = 0.0,
@@ -184,11 +180,6 @@ TColStd_Array2OfReal Trsf (1, 4, 1, 4);
Trsf (3, 3) = 1.0;
myStructure->SetTransform (Trsf,Graphic3d_TOC_POSTCONCATENATE);
// CAL : 19 aout 1998
// Il y avait aussi la possibilite de faire le calcul
// de changement de repere par :
// gp_Trsf::SetTransformation
// (myGridPlane, myViewer->PrivilegedPlane ());
#ifdef TRACE_VALUES
Standard_Integer i, j;
@@ -302,7 +293,7 @@ Standard_Boolean MakeCercles = Standard_False;
#ifdef TRACE_MAKE
cout << "MakeCercles" << endl;
#endif
// cercles
// circles
#ifdef IMP300300
Standard_Integer nblines = 0;
#endif
@@ -371,7 +362,7 @@ Standard_Boolean MakeDiametres = Standard_False;
#ifdef TRACE_MAKE
cout << "MakeDiametres" << endl;
#endif
// diametres
// diameters
myGroup1->Clear ();
myGroup1->SetGroupPrimitivesAspect (MarkerAttrib);
myGroup1->BeginPrimitives ();

View File

@@ -57,9 +57,9 @@ V3d_TypeOfOrientation Direction,const Quantity_NameOfColor Name,const Standard_B
MyType = V3d_DIRECTIONAL ;
MyLight = new Visual3d_Light(C,V, Headlight) ;
// On choisit aleatoirement comme cible l'origine
// The initial target is chosen at random
MyTarget = T;
// On deduit une position
// Position is found
P.SetCoord(-V.X(),-V.Y(),-V.Z());
MyDisplayPosition = P;
@@ -133,18 +133,18 @@ void V3d_DirectionalLight::Symbol (const Handle(Graphic3d_Group)& gsymbol, const
Rayon = this->Radius();
aView->Project(Xi,Yi,Zi,PXT,PYT);
aView->Convert(PXT,PYT,IXP,IYP);
// Coord 3d dans le plan de projection de la source.
// Coordinated 3d in the plane of projection of the source.
aView->Convert(IXP,IYP,XT,YT,ZT);
aView->Convert(PXT,PYT+Rayon,IXP,IYP);
aView->Convert(IXP,IYP,X,Y,Z);
X = X+Xi-XT; Y = Y+Yi-YT; Z = Z+Zi-ZT;
Dist = Sqrt( Square(X-Xi) + Square(Y-Yi) + Square(Z-Zi) );
// Axe de rotation.
// Axis of rotation.
A = (X-Xi)/Dist;
B = (Y-Yi)/Dist;
C = (Z-Zi)/Dist;
// On dessine une sphere
// A sphere is drawn
V3d::CircleInPlane(gsymbol,Xi,Yi,Zi,VX,VY,VZ,Rayon/40.);
for( j=1 ; j<=3 ; j++ ) {
Beta = j * Standard_PI/4.;
@@ -163,7 +163,7 @@ void V3d_DirectionalLight::Symbol (const Handle(Graphic3d_Group)& gsymbol, const
Xf = Xi * MatRot(0,0) + Yi * MatRot(0,1) + Zi * MatRot(0,2);
Yf = Xi * MatRot(1,0) + Yi * MatRot(1,1) + Zi * MatRot(1,2);
Zf = Xi * MatRot(2,0) + Yi * MatRot(2,1) + Zi * MatRot(2,2);
// Rotation de la normale
// Rotation of the normal
X1 = VX * MatRot(0,0) + VY * MatRot(0,1) + VZ * MatRot(0,2);
Y1 = VX * MatRot(1,0) + VY * MatRot(1,1) + VZ * MatRot(1,2);
Z1 = VX * MatRot(2,0) + VY * MatRot(2,1) + VZ * MatRot(2,2);
@@ -171,7 +171,7 @@ void V3d_DirectionalLight::Symbol (const Handle(Graphic3d_Group)& gsymbol, const
V3d::CircleInPlane(gsymbol,Xi,Yi,Zi,VX,VY,VZ,Rayon/40.);
}
// On dessine la fleche
// The arrow is drawn
Rayon = this->Radius();
this->Direction(DX,DY,DZ);
X = Xi + DX*Rayon/10.; Y = Yi + DY*Rayon/10.; Z = Zi + DZ*Rayon/10.;
@@ -192,10 +192,10 @@ void V3d_DirectionalLight::Display( const Handle(V3d_View)& aView,
V3d_TypeOfRepresentation Pres;
V3d_TypeOfUpdate UpdSov;
// Creation d'une structure slight d'elements reperables (la position de
// la light, et le domaine d'eclairage represente par un cercle)
// Creation d'une structure snopick d'elements non reperables ( cible, meridien et
// parallele ).
// Creation of a structure of markable elements (position of the
// light, and the domain of lighting represented by a circle)
// Creation of a structure of non-markable elements (target, meridian and
// parallel).
Pres = TPres;
Handle(V3d_Viewer) TheViewer = aView->Viewer();
@@ -226,7 +226,7 @@ void V3d_DirectionalLight::Display( const Handle(V3d_View)& aView,
Y0 = MyTarget.Y();
Z0 = MyTarget.Z();
//Affichage de la position de la light.
//Display of the position of the light.
glight->SetPickId(1);
this->Color(Quantity_TOC_RGB,R1,G1,B1);
@@ -236,7 +236,7 @@ void V3d_DirectionalLight::Display( const Handle(V3d_View)& aView,
glight->SetPrimitivesAspect(Asp1);
this->Symbol(glight,aView);
//Affichage de la sphere de reperage (limite au cercle).
// Display of the markable sphere (limit at the circle).
if (Pres == V3d_COMPLETE || Pres == V3d_PARTIAL) {
@@ -245,14 +245,14 @@ void V3d_DirectionalLight::Display( const Handle(V3d_View)& aView,
gsphere->SetPickId(2);
V3d::CircleInPlane(gsphere,X0,Y0,Z0,VX,VY,VZ,Rayon);
//Affichage du meridien
//Display of the meridian
Quantity_Color Col2(Quantity_NOC_GREEN);
Handle(Graphic3d_AspectLine3d) Asp2 = new Graphic3d_AspectLine3d
(Col2,Aspect_TOL_SOLID,1.);
gnopick->SetPrimitivesAspect(Asp2);
// Definition de l'axe du cercle
// Definition of the axis of circle
aView->Up(DXRef,DYRef,DZRef);
this->DisplayPosition(X,Y,Z);
DXini = X-X0; DYini = Y-Y0; DZini = Z-Z0;
@@ -262,9 +262,9 @@ void V3d_DirectionalLight::Display( const Handle(V3d_View)& aView,
V3d::CircleInPlane(gnopick,X0,Y0,Z0,VX,VY,VZ,Rayon);
// Affichage de la parallele
// Display of the parallel
// Definition de l'axe du cercle
// Definition of the axis of circle
aView->Proj(VX,VY,VZ);
aView->Up(X1,Y1,Z1);
DXRef = VY * Z1 - VZ * Y1;

View File

@@ -7,7 +7,6 @@
HISTORIQUE DES MODIFICATIONS :
--------------------------------
00-09-92 : GG ; Creation.
18-06-96 : FMN ; Ajout MyGraphicStructure1 pour sauvegarder snopick
30-03-98 : ZOV ; PRO6774 (reconstruction of the class hierarchy and suppressing useless methods)
IMP230300: GG Add SetColor() and Color() methods
IMP231100: GG Add IsDisplayed() method
@@ -114,14 +113,12 @@ void V3d_Light::SymetricPointOnSphere (const Handle(V3d_View)& aView, const Grap
DeltaY = Y0 - YP;
DeltaZ = Z0 - ZP;
// On recherche le point d'intersection des droites definies
// par :
// - Droite passant par le point de projection et l'oeil
// si on est en perspective, parralele a la normale de la
// vue si on a une vue axonometrique.
// position dans la vue est // a la normale de la vue
// - La distance position de la camera cible est egale au
// rayon.
// The point of intersection of straight lines defined by :
// - Straight line passing by the point of projection and the eye
// if this is a perspective, parralel to the normal of the view
// if this is an axonometric view.
// position in the view is parallel to the normal of the view
// - The distance position of the target camera is equal to the radius.
A = VX*VX + VY*VY + VZ*VZ ;
B = -2. * (VX*DeltaX + VY*DeltaY + VZ*DeltaZ);

View File

@@ -42,7 +42,7 @@ void V3d_PositionLight::SetTarget(const Standard_Real X, const Standard_Real Y,
Standard_Real Xc,Yc,Zc, Xp,Yp,Zp;
// Recalcul de la position
// Recalculation of the position
MyTarget.Coord(Xc,Yc,Zc);
Position (Xp,Yp,Zp) ;
@@ -62,8 +62,8 @@ void V3d_PositionLight::SetRadius(const Standard_Real Radius) {
Standard_Real X0,Y0,Z0, Xn,Yn,Zn, Xp,Yp,Zp;
// Le point cible reste inchange, seul la position de la lumiere est modifiee
// en conservant la direction.
// The target point remains unchanged, only the position of the light is modified
// by preserving the direction.
Position (Xp,Yp,Zp);
Graphic3d_Vector D(MyTarget, Graphic3d_Vertex(Xp, Yp, Zp));
D.Normalize();
@@ -84,7 +84,7 @@ void V3d_PositionLight::OnHideFace(const Handle(V3d_View)& aView) {
V3d_Light::SymetricPointOnSphere (aView,
MyTarget, Graphic3d_Vertex(Xp,Yp,Yp), Radius(), X,Y,Z, VX,VY,VZ);
// Actuellement est on sur le point vu
// This is a visible point
if ((VX*(X-Xp) < 0.) && (VY*(Y-Yp) < 0.) && (VZ*(Z-Zp) < 0.))
SetPosition (X,Y,Z);
}
@@ -97,7 +97,7 @@ void V3d_PositionLight::OnSeeFace(const Handle(V3d_View)& aView) {
V3d_Light::SymetricPointOnSphere (aView,
MyTarget, Graphic3d_Vertex(Xp,Yp,Yp), Radius(), X,Y,Z, VX,VY,VZ);
// Actuellement est on sur le point cache
// This is a hidden point
if ((VX*(X-Xp) > 0.) && (VY*(Y-Yp) > 0.) && (VZ*(Z-Zp) > 0.))
SetPosition (X,Y,Z);
}
@@ -110,11 +110,11 @@ Standard_Boolean V3d_PositionLight::SeeOrHide(const Handle(V3d_View)& aView) con
V3d_Light::SymetricPointOnSphere (aView,
MyTarget, Graphic3d_Vertex(Xp,Yp,Yp), Radius(), X,Y,Z, VX,VY,VZ);
// Avons nous le point cache ou le point vu
// Is it a visible or a hidden point
return ( (VX*(X-Xp) > 0.) || (VY*(Y-Yp) > 0.) || (VZ*(Z-Zp) > 0.) )?
// la source est sur la face cachee
// the source is on the hidden face
Standard_False:
// la source est sur la face vue.
// the source is on the visible face.
Standard_True;
}
@@ -136,10 +136,11 @@ void V3d_PositionLight::Display( const Handle(V3d_View)& aView,
V3d_TypeOfRepresentation Pres;
V3d_TypeOfUpdate UpdSov;
// Creation d'une structure slight d'elements reperables (la position de
// la light, et le domaine d'eclairage represente par un cercle)
// Creation d'une structure snopick d'elements non reperables ( cible, meridien et
// parallele ).
// Creation of a structure of markable elements (position of the
// light, and the domain of lighting represented by a circle)
// Creation of a structure snopick of non-markable elements (target, meridian and
// parallel).
Pres = TPres;
Handle(V3d_Viewer) TheViewer = aView->Viewer();
@@ -182,7 +183,7 @@ void V3d_PositionLight::Display( const Handle(V3d_View)& aView,
Y0 = MyTarget.Y();
Z0 = MyTarget.Z();
//Affichage de la position de la light.
// Display of the light position.
glight->SetPickId(1);
this->Color(Quantity_TOC_RGB,R1,G1,B1);
@@ -192,7 +193,7 @@ void V3d_PositionLight::Display( const Handle(V3d_View)& aView,
glight->SetPrimitivesAspect(Asp1);
this->Symbol(glight,aView);
//Affichage de la sphere de reperage (limite au cercle).
// Display of the marking sphere (limit at the circle).
if (Pres == V3d_COMPLETE || Pres == V3d_PARTIAL) {
@@ -204,7 +205,7 @@ void V3d_PositionLight::Display( const Handle(V3d_View)& aView,
if (MyType != V3d_DIRECTIONAL) {
//Affichage du rayon de la sphere (ligne + texte)
//Display of the radius of the sphere (line + text)
if (Pres == V3d_COMPLETE) {
gradius->SetPickId(3);
@@ -225,14 +226,14 @@ void V3d_PositionLight::Display( const Handle(V3d_View)& aView,
}
//Affichage du meridien
// Display of the meridian
Quantity_Color Col2(Quantity_NOC_GREEN);
Handle(Graphic3d_AspectLine3d) Asp2 = new Graphic3d_AspectLine3d
(Col2,Aspect_TOL_SOLID,1.);
gnopick->SetPrimitivesAspect(Asp2);
// Definition de l'axe du cercle
// Definition of the axis of circle
aView->Up(DXRef,DYRef,DZRef);
this->Position(X,Y,Z);
DXini = X-X0; DYini = Y-Y0; DZini = Z-Z0;
@@ -242,9 +243,9 @@ void V3d_PositionLight::Display( const Handle(V3d_View)& aView,
V3d::CircleInPlane(gnopick,X0,Y0,Z0,VX,VY,VZ,Rayon);
// Affichage de la parallele
// Display of the parallel
// Definition de l'axe du cercle
// Definition of the axis of circle
aView->Proj(VX,VY,VZ);
aView->Up(X1,Y1,Z1);
DXRef = VY * Z1 - VZ * Y1;
@@ -338,11 +339,11 @@ void V3d_PositionLight::Tracking( const Handle(V3d_View)& aView,
Z0 = MyTarget.Z();
aView->Project(X0,Y0,Z0,PXT,PYT);
aView->Convert(PXT,PYT,IPX,IPY);
// Coord 3d dans le plan de projection de la cible.
// Coord 3d in the plane of projection of the target.
aView->Convert(IPX,IPY,XT,YT,ZT);
switch (WhatPick) {
case V3d_POSITIONLIGHT :
// Les Coordonnees doivent rester a l'interieur de la sphere
// The Coordinates should remain inside of the sphere
Rayon = Radius();
XMinTrack = PXT - Rayon;
XMaxTrack = PXT + Rayon;
@@ -356,14 +357,12 @@ void V3d_PositionLight::Tracking( const Handle(V3d_View)& aView,
DeltaY = Y0 - YP;
DeltaZ = Z0 - ZP;
// On recherche le point d'intersection des droites definies
// par :
// - Droite passant par le point de projection et l'oeil
// si on est en perspective, parralele a la normale de la
// vue si on a une vue axonometrique.
// position dans la vue est // a la normale de la vue
// - La distance position de la camera cible est egale au
// rayon.
// The point of intersection of straight lines defined by :
// - Straight line passing by the point of projection and the eye
// if this is a perspective, parralel to the normal of the view
// if this is an axonometric view.
// position in the view is parallel to the normal of the view
// - The distance position of the target camera is equal to the radius.
A = VX*VX + VY*VY + VZ*VZ ;
B = -2. * (VX*DeltaX + VY*DeltaY + VZ*DeltaZ);
@@ -389,8 +388,8 @@ void V3d_PositionLight::Tracking( const Handle(V3d_View)& aView,
case V3d_SPACELIGHT :
aView->Convert(PXT,PYT,IPX,IPY);
// Dans ce cas Xpix,Ypix correspondent a une distance , relative
// a la translation que l'on veut effectuer sur la sphere.
// In this case Xpix,Ypix correspond to a distance, relative
// to the translation that is planned to be performed on the sphere.
aView->Convert(IPX+Xpix,IPY+Ypix,X,Y,Z);
X = X+X0-XT;
Y = Y+Y0-YT;
@@ -403,8 +402,8 @@ void V3d_PositionLight::Tracking( const Handle(V3d_View)& aView,
case V3d_ExtRADIUSLIGHT :
if (MyType == V3d_DIRECTIONAL)
break;
// on cherche a conserver la direction cible positionnement de la
// source ==> on projette le point sur la direction cible source.
// it is attempted to preserve the target direction position of the
// source ==> the point is projected on the target source direction.
this->Position(Xi,Yi,Zi);
aView->Project(Xi,Yi,Zi,PXP,PYP);
DX = PXP - PXT;
@@ -428,9 +427,8 @@ void V3d_PositionLight::Tracking( const Handle(V3d_View)& aView,
case V3d_IntRADIUSLIGHT :
if (MyType == V3d_DIRECTIONAL)
break;
// on cherche a conserver la direction cible positionnement
// de la source ==> on projette le point sur la direction
// cible source.
// it is attempted to preserve the target direction position of the
// source ==> the point is projected on the target source direction.
Position(Xi,Yi,Zi);
aView->Project(Xi,Yi,Zi,PXP,PYP);
DX = PXP - PXT;
@@ -445,8 +443,8 @@ void V3d_PositionLight::Tracking( const Handle(V3d_View)& aView,
Rap = NewRprj/OldRprj;
Rayon = Radius();
Rayon = Rayon * Rap;
// la source doit rester a une position fixe, seule la cible
// est modifie.
// the source should remain at a fixed position,
// only the target is modified.
Position (xPos, yPos, zPos);
Graphic3d_Vector Dir(Graphic3d_Vertex(xPos,yPos,zPos), MyTarget);
Dir.Normalize();
@@ -454,8 +452,8 @@ void V3d_PositionLight::Tracking( const Handle(V3d_View)& aView,
X = Xi + Rayon*X;
Y = Yi + Rayon*Y;
Z = Zi + Rayon*Z;
// la source doit rester a une position fixe, seule la cible
// est modifie.
// the source should remain at a fixed position,
// only the target is modified.
MyTarget.SetCoord(X,Y,Z);
Display(aView,MyTypeOfRepresentation);
(aView->Viewer())->UpdateLights();

View File

@@ -78,7 +78,7 @@ V3d_PositionalLight::V3d_PositionalLight(const Handle(V3d_Viewer)& VM, const Sta
MyType = V3d_POSITIONAL ;
MyLight = new Visual3d_Light(C,P,A1,A2) ;
MyTarget = T;
// La Structure graphique sera initialisee lors de l'affichage.
// Graphic structure is initialized during the display.
}
@@ -127,18 +127,18 @@ void V3d_PositionalLight::Symbol (const Handle(Graphic3d_Group)& gsymbol, const
Rayon = this->Radius();
aView->Project(Xi,Yi,Zi,PXT,PYT);
aView->Convert(PXT,PYT,IXP,IYP);
// Coord 3d dans le plan de projection de la source.
// 3D Coordinate in the plane of projection of the source.
aView->Convert(IXP,IYP,XT,YT,ZT);
aView->Convert(PXT,PYT+Rayon,IXP,IYP);
aView->Convert(IXP,IYP,X,Y,Z);
X = X+Xi-XT; Y = Y+Yi-YT; Z = Z+Zi-ZT;
Dist = Sqrt( Square(X-Xi) + Square(Y-Yi) + Square(Z-Zi) );
// Axe de rotation.
// Axis of rotation.
A = (X-Xi)/Dist;
B = (Y-Yi)/Dist;
C = (Z-Zi)/Dist;
// On dessine une sphere
// A sphere is drawn
V3d::CircleInPlane(gsymbol,Xi,Yi,Zi,VX,VY,VZ,Rayon/40.);
for( j=1 ; j<=3 ; j++ ) {
Beta = j * Standard_PI/4.;
@@ -157,7 +157,7 @@ void V3d_PositionalLight::Symbol (const Handle(Graphic3d_Group)& gsymbol, const
Xf = Xi * MatRot(0,0) + Yi * MatRot(0,1) + Zi * MatRot(0,2);
Yf = Xi * MatRot(1,0) + Yi * MatRot(1,1) + Zi * MatRot(1,2);
Zf = Xi * MatRot(2,0) + Yi * MatRot(2,1) + Zi * MatRot(2,2);
// Rotation de la normale
// Rotation of the normal
X1 = VX * MatRot(0,0) + VY * MatRot(0,1) + VZ * MatRot(0,2);
Y1 = VX * MatRot(1,0) + VY * MatRot(1,1) + VZ * MatRot(1,2);
Z1 = VX * MatRot(2,0) + VY * MatRot(2,1) + VZ * MatRot(2,2);
@@ -180,10 +180,10 @@ void V3d_PositionalLight::Display( const Handle(V3d_View)& aView,
V3d_TypeOfRepresentation Pres;
V3d_TypeOfUpdate UpdSov;
// Creation d'une structure slight d'elements reperables (la position de
// la light, et le domaine d'eclairage represente par un cercle)
// Creation d'une structure snopick d'elements non reperables ( cible, meridien et
// parallele ).
// Creation of a structure slight of markable elements (position of the
// light, and the domain of lighting represented by a circle)
// Creation of a structure snopick of non-markable elements (target, meridian and
// parallel).
Pres = TPres;
Handle(V3d_Viewer) TheViewer = aView->Viewer();
@@ -222,7 +222,7 @@ void V3d_PositionalLight::Display( const Handle(V3d_View)& aView,
Y0 = MyTarget.Y();
Z0 = MyTarget.Z();
//Affichage de la position de la light.
// Display of the position of the light.
glight->SetPickId(1);
this->Color(Quantity_TOC_RGB,R1,G1,B1);
@@ -232,7 +232,7 @@ void V3d_PositionalLight::Display( const Handle(V3d_View)& aView,
glight->SetPrimitivesAspect(Asp1);
this->Symbol(glight,aView);
//Affichage de la sphere de reperage (limite au cercle).
// Display of the markable sphere (limit at the cercle).
if (Pres == V3d_COMPLETE || Pres == V3d_PARTIAL) {
@@ -241,7 +241,7 @@ void V3d_PositionalLight::Display( const Handle(V3d_View)& aView,
gsphere->SetPickId(2);
V3d::CircleInPlane(gsphere,X0,Y0,Z0,VX,VY,VZ,Rayon);
//Affichage du rayon de la sphere (ligne + texte)
// Display of the radius of the sphere (line + text)
if (Pres == V3d_COMPLETE) {
gradius->SetPickId(3);
@@ -260,14 +260,14 @@ void V3d_PositionalLight::Display( const Handle(V3d_View)& aView,
gradius->Text(ValOfRadius.ToCString(),PText,0.01);
}
//Affichage du meridien
// Display of the meridian
Quantity_Color Col2(Quantity_NOC_GREEN);
Handle(Graphic3d_AspectLine3d) Asp2 = new Graphic3d_AspectLine3d
(Col2,Aspect_TOL_SOLID,1.);
gnopick->SetPrimitivesAspect(Asp2);
// Definition de l'axe du cercle
// Definition of the axis of circle
aView->Up(DXRef,DYRef,DZRef);
this->Position(X,Y,Z);
DXini = X-X0; DYini = Y-Y0; DZini = Z-Z0;
@@ -277,9 +277,9 @@ void V3d_PositionalLight::Display( const Handle(V3d_View)& aView,
V3d::CircleInPlane(gnopick,X0,Y0,Z0,VX,VY,VZ,Rayon);
// Affichage de la parallele
// Display of the parallel
// Definition de l'axe du cercle
// Definition of the axis of circle
aView->Proj(VX,VY,VZ);
aView->Up(X1,Y1,Z1);
DXRef = VY * Z1 - VZ * Y1;

View File

@@ -48,7 +48,7 @@
#define NO_TRACE_MINMAX
#define NO_TRACE_MAKE
#define NO_TRACE_VALUES
#define NO_TRACE_PLANE // Penser a virer du cdl my*GridPlane my*ViewPlane
#define NO_TRACE_PLANE
#define MYMINMAX 25.
#define MYFACTOR 50.
@@ -175,7 +175,7 @@ TColStd_Array2OfReal Trsf (1, 4, 1, 4);
Trsf (1, 4) = xl,
Trsf (2, 4) = yl,
Trsf (3, 4) = zl;
// Transformation de changement de repere
// Transformation of change of marker
Trsf (1, 1) = xdx,
Trsf (2, 1) = xdy,
Trsf (3, 1) = xdz,
@@ -187,11 +187,11 @@ TColStd_Array2OfReal Trsf (1, 4, 1, 4);
Trsf (3, 3) = dz;
myStructure->SetTransform (Trsf, Graphic3d_TOC_REPLACE);
// Translation de l'origine
// Translation of the origin
Trsf (1, 4) = -XOrigin (),
Trsf (2, 4) = -YOrigin (),
Trsf (3, 4) = 0.0;
// Rotation Alpha autour de l'axe -Z
// Rotation Alpha around axis -Z
Trsf (1, 1) = CosAlpha,
Trsf (2, 1) = -SinAlpha,
Trsf (3, 1) = 0.0,
@@ -203,11 +203,6 @@ TColStd_Array2OfReal Trsf (1, 4, 1, 4);
Trsf (3, 3) = 1.0;
myStructure->SetTransform (Trsf,Graphic3d_TOC_POSTCONCATENATE);
// CAL : 19 aout 1998
// Il y avait aussi la possibilite de faire le calcul
// de changement de repere par :
// gp_Trsf::SetTransformation
// (myGridPlane, myViewer->PrivilegedPlane ());
#ifdef TRACE_VALUES
Standard_Integer i, j;
@@ -369,7 +364,7 @@ Standard_Boolean MakeVerticales = Standard_False;
#ifdef TRACE_MAKE
cout << "MakeVerticales" << endl;
#endif
// verticales
// verticals
myGroup1->Clear ();
LineAttrib->SetColor (myTenthColor);
myGroup1->SetGroupPrimitivesAspect (LineAttrib);
@@ -377,7 +372,7 @@ Standard_Boolean MakeVerticales = Standard_False;
P1.SetCoord (0.0, -myYSize, -zl);
P2.SetCoord (0.0, myYSize, -zl);
myGroup1->Polyline (P1, P2, Standard_False);
nblines = 1; // on commence par une ligne gris fonce
nblines = 1; // start with a dark grey line
LineAttrib->SetColor (myColor);
myGroup1->SetPrimitivesAspect (LineAttrib);
for (xl = aXStep; xl < myXSize; xl += aXStep) {
@@ -419,7 +414,7 @@ Standard_Boolean MakeHorizontales = Standard_False;
#ifdef TRACE_MAKE
cout << "MakeHorizontales" << endl;
#endif
// horizontales
// horizontals
myGroup2->Clear ();
LineAttrib->SetColor (myTenthColor);
myGroup2->SetGroupPrimitivesAspect (LineAttrib);
@@ -427,7 +422,7 @@ Standard_Boolean MakeHorizontales = Standard_False;
P1.SetCoord (-myXSize, 0., -zl);
P2.SetCoord (myXSize, 0., -zl);
myGroup2->Polyline (P1, P2, Standard_False);
nblines = 1; // on commence par une ligne gris fonce
nblines = 1; // start with a dark grey line
LineAttrib->SetColor (myColor);
myGroup2->SetPrimitivesAspect (LineAttrib);
for (yl = aYStep; yl < myYSize; yl += aYStep) {
@@ -487,7 +482,7 @@ Standard_Boolean MakeHorizontales = Standard_False;
#ifdef TRACE_MAKE
cout << "MakeHorizontales" << endl;
#endif
// horizontales
// horizontals
myGroup1->Clear ();
myGroup1->SetGroupPrimitivesAspect (MarkerAttrib);
myGroup1->BeginPrimitives ();

View File

@@ -60,7 +60,7 @@ V3d_SpotLight::V3d_SpotLight(const Handle(V3d_Viewer)& VM, const Standard_Real X
MyType = V3d_SPOT ;
MyLight = new Visual3d_Light(C,P,D,CN,A1,A2,AN) ;
// On fixe la cible, a partir de la position de la light et de la direction.
// The target is fixed, starting from the light position and the direction.
T.SetCoord(X + D.X(), Y + D.Y(), Z + D.Z());
MyTarget = T;
}
@@ -207,10 +207,10 @@ void V3d_SpotLight::Display( const Handle(V3d_View)& aView,
V3d_TypeOfRepresentation Pres;
V3d_TypeOfUpdate UpdSov;
// Creation d'une structure slight d'elements reperables (la position de
// la light, et le domaine d'eclairage represente par un cercle)
// Creation d'une structure snopick d'elements non reperables ( cible, meridien et
// parallele ).
// Creation of a structure slight of markable elements (position of the
// light, and the domain of lighting represented by a circle)
// Creation of a structure snopick of non-markable elements (target, meridian and
// parallel).//
Pres = TPres;
Handle(V3d_Viewer) TheViewer = aView->Viewer();
@@ -249,7 +249,7 @@ void V3d_SpotLight::Display( const Handle(V3d_View)& aView,
Y0 = MyTarget.Y();
Z0 = MyTarget.Z();
//Affichage de la position de la light.
//Display of the position of the light.
glight->SetPickId(1);
this->Color(Quantity_TOC_RGB,R1,G1,B1);
@@ -259,7 +259,7 @@ void V3d_SpotLight::Display( const Handle(V3d_View)& aView,
glight->SetPrimitivesAspect(Asp1);
this->Symbol(glight,aView);
//Affichage de la sphere de reperage (limite au cercle).
// Display of the reference sphere (limited by circle).
if (Pres == V3d_COMPLETE || Pres == V3d_PARTIAL) {
@@ -268,7 +268,7 @@ void V3d_SpotLight::Display( const Handle(V3d_View)& aView,
gsphere->SetPickId(2);
V3d::CircleInPlane(gsphere,X0,Y0,Z0,VX,VY,VZ,Rayon);
//Affichage du rayon de la sphere (ligne + texte)
// Display of the radius of the sphere (line + text)
if (Pres == V3d_COMPLETE) {
gradius->SetPickId(3);
@@ -287,14 +287,14 @@ void V3d_SpotLight::Display( const Handle(V3d_View)& aView,
gradius->Text(ValOfRadius.ToCString(),PText,0.01);
}
//Affichage du meridien
// Display of the meridian
Quantity_Color Col2(Quantity_NOC_GREEN);
Handle(Graphic3d_AspectLine3d) Asp2 = new Graphic3d_AspectLine3d
(Col2,Aspect_TOL_SOLID,1.);
gnopick->SetPrimitivesAspect(Asp2);
// Definition de l'axe du cercle
// Definition of the axis of the circle
aView->Up(DXRef,DYRef,DZRef);
this->Position(X,Y,Z);
DXini = X-X0; DYini = Y-Y0; DZini = Z-Z0;
@@ -304,9 +304,9 @@ void V3d_SpotLight::Display( const Handle(V3d_View)& aView,
V3d::CircleInPlane(gnopick,X0,Y0,Z0,VX,VY,VZ,Rayon);
// Affichage de la parallele
// Display of the parallel
// Definition de l'axe du cercle
// Definition of the axis of the circle
aView->Proj(VX,VY,VZ);
aView->Up(X1,Y1,Z1);
DXRef = VY * Z1 - VZ * Y1;

View File

@@ -5,15 +5,6 @@
File V3d_View_1.cxx :
HISTORIQUE DES MODIFICATIONS :
--------------------------------
01-03-92 : NW,JPB,CAL ; Creation.
13-07-97 : FMN: Debug sur le ZClipping BUC40193
Debug sur le ZCueing aussi
24-12-97 : FMN ; Suppression de GEOMLITE
************************************************************************/
/*----------------------------------------------------------------------*/
/*
* Includes

View File

@@ -35,7 +35,7 @@
#include <V3d_RectangularGrid.hxx>
#include <V3d_CircularGrid.hxx>
// Pour l'echo du point choisi
// For the echo of the chosen point
#include <Visual3d_TransientManager.hxx>
/*----------------------------------------------------------------------*/
@@ -43,14 +43,14 @@
* Constant
*/
// en cas NO_TRACE_ECHO et de NO_TRACE_POINTS, dans V3d_View_4.cxx ET dans
// V3d_View.cxx, virer MyGridEchoStructure et MyGridEchoGroup dans le cdl
// in case NO_TRACE_ECHO and NO_TRACE_POINTS, in V3d_View_4.cxx and
// V3d_View.cxx, suspend MyGridEchoStructure and MyGridEchoGroup in cdl
#define TRACE_ECHO
#define NO_TRACE_VALUES
#define NO_TRACE_POINTS
#define MYEPSILON1 0.0001 // Comparaison avec 0.0
#define MYEPSILON2 Standard_PI / 180. // Delta entre 2 angles
#define MYEPSILON1 0.0001 // Comparison with 0.0
#define MYEPSILON2 Standard_PI / 180. // Delta between 2 angles
#ifdef TRACE_POINTS
#include <Graphic3d_AspectLine3d.hxx>
@@ -123,7 +123,7 @@ TColStd_Array2OfReal Trsf1 (1, 4, 1, 4);
Trsf1 (1, 4) = xl,
Trsf1 (2, 4) = yl,
Trsf1 (3, 4) = zl;
// Transformation de changement de repere
// Transformation change of marker
Trsf1 (1, 1) = xdx,
Trsf1 (2, 1) = xdy,
Trsf1 (3, 1) = xdz,
@@ -137,11 +137,11 @@ TColStd_Array2OfReal Trsf1 (1, 4, 1, 4);
TColStd_Array2OfReal Trsf2 (1, 4, 1, 4);
Trsf2 (4, 4) = 1.0;
Trsf2 (4, 1) = Trsf2 (4, 2) = Trsf2 (4, 3) = 0.0;
// Translation de l'origine
// Translation of the origin
Trsf2 (1, 4) = -MyGrid->XOrigin (),
Trsf2 (2, 4) = -MyGrid->YOrigin (),
Trsf2 (3, 4) = 0.0;
// Rotation Alpha autour de l'axe -Z
// Rotation Alpha around axis -Z
Trsf2 (1, 1) = CosAlpha,
Trsf2 (2, 1) = -SinAlpha,
Trsf2 (3, 1) = 0.0,
@@ -156,7 +156,7 @@ Standard_Real valuetrsf;
Standard_Real valueoldtrsf;
Standard_Real valuenewtrsf;
Standard_Integer i, j, k;
// Le calcul de produit de matrices
// Calculation of the product of matrices
for (i=1; i<=4; i++)
for (j=1; j<=4; j++) {
MyTrsf (i, j) = 0.0;
@@ -228,8 +228,8 @@ gp_Dir GPN (X2, Y2, Z2);
cout << "AVertex : " << X1 << ", " << Y1 << ", " << Z1 << endl;
#endif
// Cas ou le plan de la grille et le plan de la vue
// sont perpendiculaires a MYEPSILON2 radians pres
// Casw when the plane of the grid and the plane of the view
// are perpendicular to MYEPSILON2 close radians
if (Abs (VPN.Angle (GPN) - Standard_PI / 2.) < MYEPSILON2) {
NewPoint.SetCoord (X1, Y1, Z1);
#ifdef TRACE_POINTS
@@ -288,7 +288,7 @@ Standard_Real XAp, YAp;
Standard_Real XBp, YBp;
X1 = XO, Y1 = YO, Z1 = 0.0;
// MyTrsf * Point pour se retrouver sur le plan de la grille 3D
// MyTrsf * Point to return to the plane of 3D grid
P1.SetCoord (X1, Y1, Z1);
CurPoint = V3d_View::TrsPoint (P1, MyTrsf);
CurPoint.Coord (X2, Y2, Z2);
@@ -311,7 +311,7 @@ Handle(Aspect_RectangularGrid) theGrid =
XS = theGrid->XStep (), YS = theGrid->YStep ();
X1 = XO + XS, Y1 = YO, Z1 = 0.0;
// MyTrsf * Point pour se retrouver sur le plan de la grille 3D
// MyTrsf * Point to return to the plane of 3D grid
P1.SetCoord (X1, Y1, Z1);
CurPoint = V3d_View::TrsPoint (P1, MyTrsf);
CurPoint.Coord (X2, Y2, Z2);
@@ -323,7 +323,7 @@ Handle(Aspect_RectangularGrid) theGrid =
#endif
X1 = XO, Y1 = YO + YS, Z1 = 0.0;
// MyTrsf * Point pour se retrouver sur le plan de la grille 3D
// MyTrsf * Point to return to the plane of 3D grid
P1.SetCoord (X1, Y1, Z1);
CurPoint = V3d_View::TrsPoint (P1, MyTrsf);
CurPoint.Coord (X2, Y2, Z2);
@@ -352,20 +352,19 @@ Standard_Real Determin = XAp*YBp - XBp*YAp;
Standard_Real (Standard_Integer (Abs (Y1)+0.5)) * YS :
- Standard_Real (Standard_Integer (Abs (Y1)+0.5)) * YS);
#ifdef TRACE_VALUES
cout << "Point choisi : " << X1 << ", " << Y1 << endl;
cout << "Chosen point : " << X1 << ", " << Y1 << endl;
#endif
// MyTrsf * Point pour se retrouver sur le plan
// de la grille 3D
// MyTrsf * Point to return to the plane of 3D grid
P1.SetCoord (X1, Y1, Z1);
CurPoint = V3d_View::TrsPoint (P1, MyTrsf);
CurPoint.Coord (X2, Y2, Z2);
}
else {
cout << "*****************" << endl;
cout << "Determinant nul !" << endl;
cout << "Zero Determinant!" << endl;
cout << "*****************" << endl;
#ifdef TRACE_VALUES
cout << "Determinant nul !" << endl;
cout << "Zero Determinant !" << endl;
#endif
AVertex.Coord (X2, Y2, Z2);
CurPoint.SetCoord (X2, Y2, Z2);
@@ -392,8 +391,7 @@ gp_Dir2d OP (XPp, YPp);
X1 = XO + Cos (Alpha * i) * RS,
Y1 = YO + Sin (Alpha * i) * RS,
Z1 = 0.0;
// MyTrsf * Point pour se retrouver sur le plan
// de la grille 3D
// MyTrsf * Point to return to the plane of 3D grid
P1.SetCoord (X1, Y1, Z1);
CurPoint = V3d_View::TrsPoint (P1, MyTrsf);
CurPoint.Coord (X2, Y2, Z2);
@@ -406,7 +404,7 @@ gp_Dir2d OP (XPp, YPp);
AngleCur = Angle;
XCurp = XAp, YCurp = YAp;
#ifdef TRACE_VALUES
cout << "Angle entre OP et O" << CAR [i-1]
cout << "Angle between OP and O" << CAR [i-1]
<< " : " << Angle << endl;
#endif
}
@@ -418,11 +416,11 @@ gp_Dir2d OP (XPp, YPp);
Standard_Real DistOCur = Sqrt (XCurp*XCurp + YCurp*YCurp);
// Determination du cercle de la grille le plus proche de P
// Determination of the circle of the grid closest to P
Standard_Integer N = Standard_Integer (DistOP / DistOCur + 0.5);
Standard_Real Radius = N * RS;
#ifdef TRACE_VALUES
cout << "Cercle : " << N << " Radius : " << Radius << endl;
cout << "Circle : " << N << " Radius : " << Radius << endl;
#endif
X1 = Cos (Alpha * ICur) * Radius,
@@ -430,9 +428,9 @@ Standard_Real Radius = N * RS;
Z1 = 0.0;
#ifdef TRACE_VALUES
cout << "Point choisi : " << X1 << ", " << Y1 << endl;
cout << "Chosen Point : " << X1 << ", " << Y1 << endl;
#endif
// MyTrsf * Point pour se retrouver sur le plan de la grille 3D
// MyTrsf * Point to return to the plane of 3D grid
P1.SetCoord (X1, Y1, Z1);
CurPoint = V3d_View::TrsPoint (P1, MyTrsf);
CurPoint.Coord (X2, Y2, Z2);