Package nu3a.math

Examples of nu3a.math.N3Vector3D


                                      render.setCullFacing(true);
                                  else
                                      render.setCullFacing(false);
                                  break;
 
      case KeyEvent.VK_UP:   cubeTrans.translate(new N3Vector3D(0, 0, -.1f));
                  break;
      case KeyEvent.VK_DOWN:  cubeTrans.translate(new N3Vector3D(0, 0, 0.1f));
                  break;
      case KeyEvent.VK_RIGHT:  cubeTrans.rotate(-2f, new N3Vector3D(0, 1, 0));
                  break;
      case KeyEvent.VK_LEFT:  cubeTrans.rotate(2f, new N3Vector3D(0, 1, 0));
                  break;
      case KeyEvent.VK_PLUS:  light01.getLightData().setAngle(spotAngle++);
                  break;
      case KeyEvent.VK_MINUS:  light01.getLightData().setAngle(spotAngle--);
                  break;
View Full Code Here


    lights = new N3SoftwareLight[MAX_LIGHTS];
    for (int i = 0; i < lights.length; i++)
      lights[i] = new N3SoftwareLight();

    // /Optimizaciones
    vect1 = new N3Vector3D();
    vect2 = new N3Vector3D();
    d = new N3Vector3D();
    v1 = new N3Point3D();
    v2 = new N3Point3D();
    v3 = new N3Point3D();
    c1 = new N3ColorRGBA();
    c2 = new N3ColorRGBA();
    c3 = new N3ColorRGBA();
    cV1 = new N3Point3D();
    cV2 = new N3Point3D();
    cV3 = new N3Point3D();
    normal = new N3Vector3D();
    renderContext.setTextureMode(renderContext.N3_SWR_MODULATE);
  }
View Full Code Here

        v3.y = t3.y;
        v3.z = t3.z;
        N3Matrix4D.mult(modelViewMatrix, v1);
        N3Matrix4D.mult(modelViewMatrix, v2);
        N3Matrix4D.mult(modelViewMatrix, v3);
        N3Vector3D n1 = (N3Vector3D) normalData.next();
        N3Vector3D n2 = (N3Vector3D) normalData.next();
        N3Vector3D n3 = (N3Vector3D) normalData.next();
        c1.setData(colorData.next());
        c2.setData(colorData.next());
        c3.setData(colorData.next());
        if (cull_facing) {
          cV1.x = v1.x;
View Full Code Here

        v3.y = t3.y;
        v3.z = t3.z;
        N3Matrix4D.mult(modelViewMatrix, v1);
        N3Matrix4D.mult(modelViewMatrix, v2);
        N3Matrix4D.mult(modelViewMatrix, v3);
        N3Vector3D n1 = (N3Vector3D) normalData.next();
        N3Vector3D n2 = (N3Vector3D) normalData.next();
        N3Vector3D n3 = (N3Vector3D) normalData.next();
        c1.setData(colorData.next());
        c2.setData(colorData.next());
        c3.setData(colorData.next());
        if (cull_facing) {
          cV1.x = v1.x;
View Full Code Here

        cV2.z = v2.z;
        doPerspective(cV1);
        doPerspective(cV2);
        if (!clip) {
          if (lighting) {
            N3Vector3D n1 = (N3Vector3D) normalData.next();
            N3Vector3D n2 = (N3Vector3D) normalData.next();
            applyShading(v1, c1, n1);
            applyShading(v2, c2, n2);
          }
          doScreenCoordinates(cV1);
          doScreenCoordinates(cV2);
View Full Code Here

        cV2.z = v2.z;
        doPerspective(cV1);
        doPerspective(cV2);
        if (!clip) {
          if (lighting) {
            N3Vector3D n1 = (N3Vector3D) normalData.next();
            N3Vector3D n2 = (N3Vector3D) normalData.next();
            applyShading(v1, c1, n1);
            applyShading(v2, c2, n2);
          }
          doScreenCoordinates(cV1);
          doScreenCoordinates(cV2);
View Full Code Here

        N3Matrix4D.mult(modelViewMatrix, v1);
        c1.setData(colorData.next());
        doPerspective(cV1);
        if (!clip) {
          if (lighting) {
            N3Vector3D n1 = (N3Vector3D) normalData.next();
            applyShading(v1, c1, n1);
          }
          doScreenCoordinates(cV1);
          renderContext.setColor(c1);
          renderContext.setVertex(cV1);
View Full Code Here

        N3Matrix4D.mult(modelViewMatrix, v1);
        c1.setData(colorData.next());
        doPerspective(cV1);
        if (!clip) {
          if (lighting) {
            N3Vector3D n1 = (N3Vector3D) normalData.next();
            applyShading(v1, c1, n1);
          }
          doScreenCoordinates(cV1);
          renderContext.setColor(c1);
          renderContext.setUV(coordData.next());
View Full Code Here

   * @return Objeto de datos de luz para una luz puntual.
   */
  public static N3LightData createPointLightData() {
    N3LightData result = new N3LightData();
    result.angle = 180.0f;
    result.direction = new N3Vector3D(0, 0, 1.0f);
    result.positional = true;

    return result;
  }
View Full Code Here

  public static N3LightData createPointLightData(N3ColorRGBA a,
      N3ColorRGBA s, N3ColorRGBA d) {
    N3LightData result = new N3LightData(a, s, d);
    result.angle = 180.0f;
    result.positional = true;
    result.direction = new N3Vector3D(0, 0, 1.0f);

    return result;
  }
View Full Code Here

TOP

Related Classes of nu3a.math.N3Vector3D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.