spherecylinder.js
// Fonction permettant la construction du composant entre l'aile et la carlingue
Fonction permettant la construction du composant entre l'aile et la carlingue
Fonction permettant la construction du composant entre l ' aile et la carlingue
function preAileDroit() {
    modelview = initialmodelview;
    modelview = mult(modelview, translate(1.5, -1.2, 4.5));
    modelview = mult(modelview, rotate(270, 1, 0, 0));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(2.7, 0.2, 1));
    trapeze1.render();
    modelview = initialmodelview;
    modelview = mult(modelview, translate(16, -1.2, 4));
    modelview = mult(modelview, rotate(180, 1, 0, 0));
    modelview = mult(modelview, rotate(90, 0, 0, 1));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(0.25, 0.1, 1.2));
    trapeze2.render();
    modelview = initialmodelview;
    modelview = mult(modelview, translate(13, 1, 2.45));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(0.28, 0.25, 0.01));
    cube1.render();
    setColor(0.4,0.4,0.4,0.4,0.4,0.4,0.1,0.1,0.1);
    callTexture(blackTexture, gl.TEXTURE1, 1);
    modelview = initialmodelview;
    modelview = mult(modelview, translate(5, -3.5, 4));
    modelview = mult(modelview, rotate(270, 0, 1, 0));
    modelview = mult(modelview, rotate(25, 0, 0, 1));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(1, 1, 1));
    cylinderQuart.render();
    resetColor();
    resetTexture();
}
function preAileDroit ( ) { modelview = initialmodelview ; modelview = mult ( modelview , translate ( 1.5 , - 1.2 , 4.5 ) ) ; modelview = mult ( modelview , rotate ( 270 , 1 , 0 , 0 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 2.7 , 0.2 , 1 ) ) ; trapeze1 . render ( ) ; modelview = initialmodelview ; modelview = mult ( modelview , translate ( 16 , - 1.2 , 4 ) ) ; modelview = mult ( modelview , rotate ( 180 , 1 , 0 , 0 ) ) ; modelview = mult ( modelview , rotate ( 90 , 0 , 0 , 1 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 0.25 , 0.1 , 1.2 ) ) ; trapeze2 . render ( ) ; modelview = initialmodelview ; modelview = mult ( modelview , translate ( 13 , 1 , 2.45 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 0.28 , 0.25 , 0.01 ) ) ; cube1 . render ( ) ; setColor ( 0.4 , 0.4 , 0.4 , 0.4 , 0.4 , 0.4 , 0.1 , 0.1 , 0.1 ) ; callTexture ( blackTexture , gl . TEXTURE1 , 1 ) ; modelview = initialmodelview ; modelview = mult ( modelview , translate ( 5 , - 3.5 , 4 ) ) ; modelview = mult ( modelview , rotate ( 270 , 0 , 1 , 0 ) ) ; modelview = mult ( modelview , rotate ( 25 , 0 , 0 , 1 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 1 , 1 , 1 ) ) ; cylinderQuart . render ( ) ; resetColor ( ) ; resetTexture ( ) ; }
Fonction permettant la construction du composant entre l'aile et la carlingue
Fonction permettant la construction du composant entre l ' aile et la carlingue
// always extract the normal matrix before scaling // always extract the normal matrix before scaling // always extract the normal matrix before scaling // always extract the normal matrix before scaling