12.07.2015 Views

Universidad de - Escuela Superior de Informática (UCLM ...

Universidad de - Escuela Superior de Informática (UCLM ...

Universidad de - Escuela Superior de Informática (UCLM ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CAPÍTULO 5. ARQUITECTURA DE ATRAVELMódulo <strong>de</strong> procesamientoAlgoritmo 6 Cálculo <strong>de</strong> la fusión <strong>de</strong> dos BB.Entrada: Dos bounding box B1(V 0 ,V 1 ,V 2 ,V 3 ,V 4 ,V 5 ,V 6 ,V 7 ) yB2(V 0 ,V 1 ,V 2 ,V 3 ,V 4 ,V 5 ,V 6 ,V 7 ) <strong>de</strong>finidos por ocho vértices cada uno. Don<strong>de</strong> cadavértice es un punto en el espacio 3D <strong>de</strong> la forma V = V x ,V y ,V z .Salida: Un bounding box <strong>de</strong> la forma B(V 0 ,V 1 ,V 2 ,V 3 ,V 4 ,V 5 ,V 6 ,V 7 ) que engloba a los dosBB <strong>de</strong> entrada.Obtener el máximo valor <strong>de</strong> en el eje X <strong>de</strong> B1.Obtener el mínimo valor <strong>de</strong> en el eje X <strong>de</strong> B1.Obtener el máximo valor <strong>de</strong> en el eje Y <strong>de</strong> B1.Obtener el máximo valor <strong>de</strong> en el eje Y <strong>de</strong> B1.Obtener el máximo valor <strong>de</strong> en el eje Z <strong>de</strong> B1.Obtener el máximo valor <strong>de</strong> en el eje Z <strong>de</strong> B1.Obtener el máximo valor <strong>de</strong> en el eje X <strong>de</strong> B2.Obtener el máximo valor <strong>de</strong> en el eje X <strong>de</strong> B2.Obtener el máximo valor <strong>de</strong> en el eje Y <strong>de</strong> B2.Obtener el máximo valor <strong>de</strong> en el eje Y <strong>de</strong> B2.Obtener el máximo valor <strong>de</strong> en el eje Z <strong>de</strong> B2.Obtener el máximo valor <strong>de</strong> en el eje Z <strong>de</strong> B2.Comparar los valores máximos <strong>de</strong> X y almacenar en max x el máximo valor <strong>de</strong> X <strong>de</strong> losdos BB.Comparar los valores mínimos <strong>de</strong> X y almacenar en min x el mínimo valor <strong>de</strong> X <strong>de</strong> losdos BB.Comparar los valores máximos <strong>de</strong> Y y almacenar en max y el máximo valor <strong>de</strong> Y <strong>de</strong> losdos BB.Comparar los valores mínimos <strong>de</strong> Y y almacenar en min y el mínimo valor <strong>de</strong> Y <strong>de</strong> los dosBB.Comparar los valores máximos <strong>de</strong> Z y almacenar en max z el máximo valor <strong>de</strong> Z <strong>de</strong> losdos BB.Comparar los valores mínimos <strong>de</strong> Z y almacenar en min z el mínimo valor <strong>de</strong> Z <strong>de</strong> los dosBB.Calcular el vértice 0.Calcular el vértice 1.Calcular el vértice 2.Calcular el vértice 3.Calcular el vértice 4.Calcular el vértice 5.Calcular el vértice 6.Calcular el vértice 7.Construir BB resultante utilizando V0,V1,V2,V3,V4,V5,V6,V7.<strong>de</strong>volver BB_resultante.113

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!