Package javax.vecmath

Examples of javax.vecmath.Color4f


/* 1108 */       this.curR = entry.r;
/* 1109 */       this.curG = entry.g;
/* 1110 */       this.curB = entry.b;
/*      */
/* 1113 */       this.curColor.x = this.curR;
/*      */       Color4f tmp263_260 = this.curColor; tmp263_260.x = ((float)(tmp263_260.x / 32768.0D));
/* 1114 */       this.curColor.y = this.curG;
/*      */       Color4f tmp292_289 = this.curColor; tmp292_289.y = ((float)(tmp292_289.y / 32768.0D));
/* 1115 */       this.curColor.z = this.curB;
/*      */       Color4f tmp321_318 = this.curColor; tmp321_318.z = ((float)(tmp321_318.z / 32768.0D));
/*      */
/* 1117 */       if (this.doingAlpha) {
/* 1118 */         this.curA = entry.a;
/* 1119 */         this.curColor.w = this.curA;
/*      */         Color4f tmp365_362 = this.curColor; tmp365_362.w = ((float)(tmp365_362.w / 32768.0D));
/*      */       }
/*      */
/*      */     }
/*      */
/* 1128 */     this.meshState = 0;
View Full Code Here


/*     */   }
/*     */
/*     */   public void writeObject(DataOutput out) throws IOException {
/*  62 */     super.writeObject(out);
/*  63 */     TextureAttributes attr = (TextureAttributes)this.node;
/*  64 */     Color4f clr = new Color4f();
/*  65 */     Matrix4d mat = new Matrix4d();
/*  66 */     Transform3D trans = new Transform3D();
/*  67 */     int tableComponents = attr.getNumTextureColorTableComponents();
/*  68 */     int tableSize = attr.getTextureColorTableSize();
/*  69 */     int[][] colorTable = new int[tableComponents][tableSize];
View Full Code Here

/*     */   }
/*     */
/*     */   public void writeObject(DataOutput out) throws IOException {
/*  99 */     super.writeObject(out);
/* 100 */     Texture attr = (Texture)this.node;
/* 101 */     Color4f clr = new Color4f();
/* 102 */     attr.getBoundaryColor(clr);
/* 103 */     this.control.writeColor4f(out, clr);
/* 104 */     out.writeInt(attr.getBoundaryModeS());
/* 105 */     out.writeInt(attr.getBoundaryModeT());
/* 106 */     out.writeBoolean(attr.getEnable());
View Full Code Here

/*      */
/* 1381 */     TextureAttributesRetained attr = (TextureAttributesRetained)originalNodeComponent.retained;
/*      */
/* 1383 */     TextureAttributesRetained rt = (TextureAttributesRetained)this.retained;
/*      */
/* 1385 */     Color4f c = new Color4f();
/* 1386 */     attr.getTextureBlendColor(c);
/* 1387 */     Transform3D t = new Transform3D();
/* 1388 */     attr.getTextureTransform(t);
/*      */
/* 1390 */     rt.initTextureMode(attr.getTextureMode());
View Full Code Here

    if (lines == null) throw new IllegalArgumentException("lines must not be null");
      startPrimitive(Primitive.LINE, null);
    GL2 gl = drawable.getGL().getGL2();
    Vector2f p;
    if(useColor) {
      Color4f c;
      for(int i = 0; i < lines.length; i++) {
        Line l = lines[i];
        if(l == null) continue;

        p = l.getPoint(0);
View Full Code Here

    if (triangles == null) throw new IllegalArgumentException("triangles must not be null");
      startPrimitive(Primitive.LINE, null);
    GL2 gl = drawable.getGL().getGL2();
    Vector2f p;
    if(useColors) {
      Color4f c;
      for(int i = 0; i < triangles.length; i++) {
        Triangle t = triangles[i];
        if(t == null) continue;
     
        p = t.getPoint(0);
View Full Code Here

    Vector2f p;
   
    startPrimitive(Primitive.TRIANGLE, null);

    if(useColors) {
      Color4f c = null;
      for(int i = 0; i < triangles.length; i++) {
        Triangle t = triangles[i];
        if(t == null) continue;

        p = t.getPoint(0);
View Full Code Here

    startPrimitive(Primitive.TEXTURED_TRIANGLE, joglImage);

    TextureCoords coords = joglImage.texture.getImageTexCoords();
   
    if(useColors) {
      Color4f c;
        for(int i = 0; i < triangles.length; i++) {
        Triangle t = triangles[i];
        if(t == null) continue;

        Vector2f tc1 = t.getTextureCoordinate(0);
View Full Code Here

    // Cleaning up
    System.gc();

    imageContext.setGraphicsListener(new GraphicsListener() {
      public void draw(View view, Graphics graphics) {
        graphics.setClearColor(new Color4f(1.0f,.0f,.0f, 1f));
        graphics.clear();
        graphics.fillTriangle(80, 80, 180, 80, 130, 180);
      }
      public void init(View view, Graphics renderer) {
        view.setSize(256, 256);
        view.setCamera(0, 0, 0);
      }
      public void sizeChanged(GraphicsContext graphicsContext, View view) {}
    });
    imageContext.draw();
//    dark.updateBuffer();
//    dark.updateBuffer(50, 50, 100, 100);
    dark.updateBuffer(1,1, 255, 255);
    imageContext.setGraphicsListener(new GraphicsListener() {
      public void draw(View view, Graphics graphics) {
        graphics.setClearColor(new Color4f(.0f,.0f,.0f, 1f));
        graphics.clear();
      }
      public void init(View view, Graphics renderer) {
        view.setCamera(0, 0, 0);
        view.setSize(256, 256);
View Full Code Here

      public void draw(View view, Graphics renderer) {
        long elapsedTime = System.nanoTime() - currTime;
        currTime += elapsedTime;

        renderer.clearTransformation();
        renderer.setClearColor(new Color4f(0,1,0,1));
        renderer.clear();
       
        // Draw darkness
       
        renderer.fillTriangle(100, 100, 200, 100, 150, 200);
        renderer.copyToImage(dark, 100, 100, 100, 100);
       
        renderer.setColor(new Color4f(1,0,0,1));
//        renderer.drawLine(201, 100, 201, 200);
        renderer.fillTriangle(201, 100, 501, 100, 201, 400);
        renderer.setColor(new Color4f(1,1,1,1));

        renderer.translate(-202, -100);
        renderer.drawImage(dark, 512, 512);

        // draw frames per second
View Full Code Here

TOP

Related Classes of javax.vecmath.Color4f

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.