class Pointeur3D{ float rayonSphere; public Pointeur3D(){ rayonSphere=50; } public void dessiner(){ //dessiner le pointeur au point d'impact pushMatrix(); translate(vectImpact.x,vectImpact.y,vectImpact.z); fill(185,180,255); noStroke(); beginShape(TRIANGLES); for(int i=0;i<=12;i++){ float a1=PI/6*i,a2=PI/6*(i+1); vertex(0,0,0); vertex(10*cos(a1),10*sin(a1),cote/3*doInverse); vertex(10*cos(a2),10*sin(a2),cote/3*doInverse); } endShape(); beginShape(TRIANGLE_STRIP); for(int i=0;i<=12;i++){ float a1=PI/6*i; if(i%2==0){ vertex(4*cos(a1),4*sin(a1),cote/3*doInverse); vertex(4*cos(a1),4*sin(a1),cote*doInverse); } } endShape(); translate(0,0,-rayonSphere); fill(255,0,0); sphere(rayonSphere); popMatrix(); } }