Bonjour,

J'essaye de mettre les coordonees d'un poyedre compose de triangles dans deux tableaux.
Le premier contient les coordonees de chaque sommet et le second indique les sommets respectifs pour chaque face.
Je pensais utiliser des pointeurs dans le second tableau pour indiquer quel sont les points a utiliser.
Malheuresement le compilateur (absoft) refuse cette utilisation des pointeurs:
"the pointer-object in a pointer assignment statement must have the pointer attribute."



Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
 
 
real, target, dimension(3,4) :: vertex_1 ! coordonnee des points
real, target, dimension(3,4) :: vertex_2 
 
real, pointer, dimension (3,4) :: face_1 ! points pour chaque face
real, pointer, dimension (3,4) :: face_2
 
!vertex 1 - ployedron 1
Vertex_1 (1,1) = 0
Vertex_1 (2,1) = 5
Vertex_1 (3,1) = 5
 
!vertex 2 - ployedron 1
vertex_1 (1,2) = 0
vertex_1 (2,2) = 0
vertex_1 (3,2) = 7
 
!vertex 3 - ployedron 1
vertex_1 (1,3) = 5
vertex_1 (2,3) = 0
vertex_1 (3,3) = 0
 
!vertex 4 - ployedron 1
vertex_1 (1,4) = 0
vertex_1 (2,4) = 0
vertex_1 (3,4) = 2
 
!vertex 1 - ployedron 2
Vertex_2 (1,1) = 0
Vertex_2 (2,1) = 7
Vertex_2 (3,1) = 5
 
!vertex 2 - ployedron 2
vertex_2 (1,2) = 0
vertex_2 (2,2) = 3
vertex_2 (3,2) = 7
 
!vertex 3 - ployedron 2
vertex_2 (1,3) = 5
vertex_2 (2,3) = 3
vertex_2 (3,3) = 0
 
!vertex 4 - ployedron 2
vertex_2 (1,4) = 0
vertex_2 (2,4) = 3
vertex_2 (3,4) = 2
 
!face 1 - ployedron 1
face_1 (1,1) => Vertex_1 (1,:) ! ca pose probleme a partir d'ici
face_1 (2,1) => vertex_1 (2,:)
face_1 (3,1) => vertex_1 (3,:)
 
!face 2 - ployedron 1
face_1 (1,2) => Vertex_1 (1,:)
face_1 (2,2) => vertex_1 (3,:)
face_1 (3,2) => vertex_1 (4,:)
 
!face 3 - ployedron 1
face_1 (1,3) => Vertex_1 (1,:)
face_1 (2,3) => vertex_1 (2,:)
face_1 (3,3) => vertex_1 (4,:)
 
!face 4 - ployedron 1
face_1 (1,4) => vertex_1 (2,:)
face_1 (2,4) => vertex_1 (3,:)
face_1 (3,4) => vertex_1 (4,:)
 
!face 1 - ployedron 2
face_2 (1,1) => vertex_2 (1,:)
face_2 (2,1) => vertex_2 (2,:)
face_2 (3,1) => vertex_2 (3,:)
 
!face 2 - ployedron 2
face_2 (1,2) => vertex_2 (1,:)
face_2 (2,2) => vertex_2 (3,:)
face_2 (3,2) => vertex_2 (4,:)
 
!face 3 - ployedron 2
face_2 (1,3) => vertex_2 (1,:)
face_2 (2,3) => vertex_2 (2,:)
face_2 (3,3) => vertex_2 (4,:)
 
!face 4 - ployedron 2
face_2 (1,4) => vertex_2 (2,:)
face_2 (2,4) => vertex_2 (3,:)
face_2 (3,4) => vertex_2 (4,:)
 
!pour apres l'utiliser ici:
!tester chaque arrete du premier polyedre avec chaque face du second polyedre
do m = 1, 4 ! 4 est le nombre d'arretes du poly 1
 
	do i = 1, 4 ! 4 est le nombre de faces du poly 2
 
		call ray_intersecting_polygon (face_2 (1,i), face_2 (2,i), face_2 (3,i), face_1 (1,m), face_1(2,m), collision)
		call ray_intersecting_polygon (face_2 (1,i), face_2 (2,i), face_2 (3,i), face_1 (2,m), face_1(3,m), collision)
		call ray_intersecting_polygon (face_2 (1,i), face_2 (2,i), face_2 (3,i), face_1 (1,m), face_1(3,m), collision)
 
	enddo
 
enddo
Comment resoudre mon probleme?

Merci.