mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
trying to clean up copyright info
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PApplet - applet base class for the bagel engine
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004- Ben Fry and Casey Reas
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
@@ -37,6 +36,9 @@ import java.util.*;
|
||||
import java.util.zip.*;
|
||||
|
||||
|
||||
/**
|
||||
* Base class for all sketches that use processing.core.
|
||||
*/
|
||||
public class PApplet extends Applet
|
||||
implements PConstants, Runnable,
|
||||
MouseListener, MouseMotionListener, KeyListener, FocusListener
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PConstants - numbers shared throughout processing.core
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
@@ -29,6 +28,9 @@ import java.awt.Cursor;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
|
||||
/**
|
||||
* Numbers shared throughout processing.core.
|
||||
*/
|
||||
public interface PConstants {
|
||||
|
||||
// renderers known to processing.core
|
||||
@@ -357,7 +359,7 @@ public interface PConstants {
|
||||
|
||||
//has this vertex been lit yet
|
||||
static final int BEEN_LIT = 35;
|
||||
|
||||
|
||||
static final int VERTEX_FIELD_COUNT = 36;
|
||||
|
||||
// line & triangle fields (note how these overlap)
|
||||
@@ -372,7 +374,7 @@ public interface PConstants {
|
||||
|
||||
static final int LINE_FIELD_COUNT = 5;
|
||||
static final int TRIANGLE_FIELD_COUNT = 5;
|
||||
|
||||
|
||||
static final int TRI_DIFFUSE_R = 0;
|
||||
static final int TRI_DIFFUSE_G = 1;
|
||||
static final int TRI_DIFFUSE_B = 2;
|
||||
@@ -381,7 +383,7 @@ public interface PConstants {
|
||||
static final int TRI_SPECULAR_G = 5;
|
||||
static final int TRI_SPECULAR_B = 6;
|
||||
static final int TRI_SPECULAR_A = 7;
|
||||
|
||||
|
||||
static final int TRIANGLE_COLOR_COUNT = 8;
|
||||
|
||||
// normal modes for lighting
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PFont - font object for text rendering
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry & Casey Reas
|
||||
@@ -35,7 +34,6 @@ import java.util.*;
|
||||
* Grayscale bitmap font class used by Processing.
|
||||
* <P>
|
||||
* Awful (and by that, I mean awesome) ascii (non)art for how this works:
|
||||
*
|
||||
* <PRE>
|
||||
* |
|
||||
* | height is the full used height of the image
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PGraphics - main graphics and rendering context
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
@@ -32,6 +31,12 @@ import java.awt.image.*;
|
||||
import java.io.*;
|
||||
|
||||
|
||||
/**
|
||||
* Main graphics and rendering context, as well as
|
||||
* the base API implementation for processing "core".
|
||||
* <P>
|
||||
* As of beta, this class is semi-disabled.
|
||||
*/
|
||||
public class PGraphics extends PImage implements PConstants {
|
||||
|
||||
/// width minus one (useful for many calculations)
|
||||
@@ -2546,7 +2551,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
public void ambientLight(float red, float green, float blue) {
|
||||
depthError("ambientLight");
|
||||
}
|
||||
|
||||
|
||||
public void ambientLight(float red, float green, float blue, float x, float y, float z) {
|
||||
depthError("ambientLight");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PGraphics2 - graphics engine implemented via java2d
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
@@ -29,8 +28,10 @@ import java.awt.geom.*;
|
||||
import java.awt.image.*;
|
||||
|
||||
|
||||
// Graphics, GeneralPath, AffineTransform, BasicStroke, Graphics2D
|
||||
|
||||
/**
|
||||
* Subclass for PGraphics that implements the graphics API
|
||||
* in Java 1.3+ using Java 2D.
|
||||
*/
|
||||
public class PGraphics2 extends PGraphics {
|
||||
|
||||
public Graphics2D g2;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PGraphics - main graphics and rendering context
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
@@ -29,6 +28,9 @@ import java.awt.*;
|
||||
import java.awt.image.*;
|
||||
|
||||
|
||||
/**
|
||||
* Subclass of PGraphics that handles 3D rendering.
|
||||
*/
|
||||
public class PGraphics3 extends PGraphics {
|
||||
|
||||
/** The modelview matrix. */
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PImage - storage class for pixel data
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-05
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Additional code contributions from toxi
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@@ -34,42 +31,13 @@ import java.io.*;
|
||||
|
||||
|
||||
/**
|
||||
* image class developed by toxi and fry.
|
||||
*
|
||||
* <PRE>[fry 0407XX]
|
||||
* - get() on RGB images sets the high bits to opaque
|
||||
* - modification of naming for functions
|
||||
* - inclusion of Object.clone()
|
||||
* - make get(), copy(), blend() honor imageMode
|
||||
* - lots of moving things around for new megabucket api
|
||||
*
|
||||
* [toxi 030722]
|
||||
* advanced copying/blitting code
|
||||
*
|
||||
* [fry 030918]
|
||||
* integrated and modified to fit p5 spec
|
||||
*
|
||||
* [toxi 030930]
|
||||
* - target pixel buffer doesn't loose alpha channel anymore
|
||||
* with every blitting operation alpha values are increased now
|
||||
* - resizing by large factors (>250%) doesn't yield any rounding errors
|
||||
* anymore, changed to 16bit precision (=65536% max or 0.000015% min)
|
||||
* - replicate() is now only using REPLACE mode to avoid semantic problems
|
||||
* - added blend() methods to use replicate()'s functionality,
|
||||
* but with blend modes
|
||||
*
|
||||
* [toxi 031006]
|
||||
* blit_resize() is now clipping input coordinates to avoid array
|
||||
* exceptions target dimension can be larger than destination image
|
||||
* object, outside pixels will be skipped
|
||||
*
|
||||
* [toxi 031017]
|
||||
* versions of replicate() and blend() methods which use cross-image
|
||||
* blitting are now called in the destination image and expect a source
|
||||
* image object as parameter. this is to provide an easy syntax for cases
|
||||
* where the main pixel buffer is the destination. as those methods are
|
||||
* overloaded in BApplet, users can call those functions directly without
|
||||
* explicitly giving a reference to PGraphics.</PRE>
|
||||
* Storage class for pixel data.
|
||||
* <P>
|
||||
* Code for copying, resizing, scaling, and blending contributed
|
||||
* by <A HREF="http://www.toxi.co.uk">toxi</A>
|
||||
* <P>
|
||||
* Gaussian blur code contributed by
|
||||
* <A HREF="http://incubator.quasimondo.com">Mario Klingemann</A>
|
||||
*/
|
||||
public class PImage implements PConstants, Cloneable {
|
||||
|
||||
|
||||
+22
-18
@@ -1,34 +1,38 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PLine - code for rendering lines
|
||||
Part of the Processing project - http://processing.org
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-03
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package processing.core;
|
||||
|
||||
|
||||
/**
|
||||
* Code for rendering lines.
|
||||
* <P>
|
||||
* This code will soon be removed.
|
||||
* Written by Carlos Rocha.
|
||||
*/
|
||||
public class PLine implements PConstants
|
||||
{
|
||||
|
||||
private int[] m_pixels;
|
||||
private float[] m_zbuffer;
|
||||
private int[] m_stencil;
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Part of the Processing project - http://Proce55ing.net
|
||||
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package processing.core;
|
||||
|
||||
|
||||
/**
|
||||
* 4x4 matrix implementation.
|
||||
*/
|
||||
public final class PMatrix implements PConstants {
|
||||
|
||||
public float m00, m01, m02, m03;
|
||||
@@ -8,8 +34,6 @@ public final class PMatrix implements PConstants {
|
||||
public float m20, m21, m22, m23;
|
||||
public float m30, m31, m32, m33;
|
||||
|
||||
//float reset[];
|
||||
|
||||
final static int DEFAULT_STACK_DEPTH = 0;
|
||||
int maxStackDepth;
|
||||
int stackPointer = 0;
|
||||
@@ -58,32 +82,6 @@ public final class PMatrix implements PConstants {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public void reset() {
|
||||
if (reset == null) {
|
||||
identity();
|
||||
|
||||
} else {
|
||||
set(reset[0], reset[1], reset[2], reset[3],
|
||||
reset[4], reset[5], reset[6], reset[7],
|
||||
reset[8], reset[9], reset[10], reset[11],
|
||||
reset[12], reset[13], reset[14], reset[15]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void storeResetValue() {
|
||||
if (reset == null) {
|
||||
reset = new float[16];
|
||||
}
|
||||
reset[0] = m00; reset[1] = m01; reset[2] = m02; reset[3] = m03;
|
||||
reset[4] = m10; reset[5] = m11; reset[6] = m12; reset[7] = m13;
|
||||
reset[8] = m20; reset[9] = m21; reset[10] = m22; reset[11] = m23;
|
||||
reset[12] = m30; reset[13] = m31; reset[14] = m32; reset[15] = m33;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
public void clearStack() {
|
||||
stackPointer = 0;
|
||||
}
|
||||
@@ -258,9 +256,9 @@ public final class PMatrix implements PConstants {
|
||||
float t = 1.0f - c;
|
||||
|
||||
apply((t*v0*v0) + c, (t*v0*v1) - (s*v2), (t*v0*v2) + (s*v1), 0,
|
||||
(t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
|
||||
(t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
|
||||
0, 0, 0, 1);
|
||||
(t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
|
||||
(t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
|
||||
0, 0, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -272,9 +270,9 @@ public final class PMatrix implements PConstants {
|
||||
float t = 1.0f - c;
|
||||
|
||||
preApply((t*v0*v0) + c, (t*v0*v1) - (s*v2), (t*v0*v2) + (s*v1), 0,
|
||||
(t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
|
||||
(t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
|
||||
0, 0, 0, 1);
|
||||
(t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
|
||||
(t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
|
||||
0, 0, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PPolygon - zbuffer polygon rendering object for BGraphics
|
||||
Part of the Processing project - http://Proce55ing.net
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-03
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@@ -27,6 +25,11 @@
|
||||
package processing.core;
|
||||
|
||||
|
||||
/**
|
||||
* zbuffer polygon rendering object for PGraphics.
|
||||
* <P>
|
||||
* Likely to be removed before 1.0 as it's no longer particularly used.
|
||||
*/
|
||||
public class PPolygon implements PConstants {
|
||||
static final int DEFAULT_SIZE = 64; // this is needed for spheres
|
||||
float vertices[][] = new float[DEFAULT_SIZE][VERTEX_FIELD_COUNT];
|
||||
@@ -54,7 +57,6 @@ public class PPolygon implements PConstants {
|
||||
int rgba;
|
||||
int r2, g2, b2, a2, a2orig;
|
||||
|
||||
//float zbuffer[];
|
||||
boolean noDepthTest;
|
||||
|
||||
PGraphics parent;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PSound - java 1.1 audio loader and player
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PSound2 - java 1.3 audio loader and player
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PTriangle - handler for tesselated triangle rendering
|
||||
Part of the Processing project - http://processing.org
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-03
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package processing.core;
|
||||
|
||||
/**
|
||||
* written by sami www.sumea.com
|
||||
* Handles rendering of single (tesselated) triangles in 3D.
|
||||
* <P>
|
||||
* Written by sami www.sumea.com
|
||||
*/
|
||||
public class PTriangle implements PConstants
|
||||
{
|
||||
@@ -42,8 +42,6 @@ public class PTriangle implements PConstants
|
||||
private int[] m_stencil;
|
||||
private float[] m_zbuffer;
|
||||
|
||||
//private PImage m_tImage;
|
||||
|
||||
private int SCREEN_WIDTH;
|
||||
private int SCREEN_HEIGHT;
|
||||
private int SCREEN_WIDTH1;
|
||||
|
||||
Reference in New Issue
Block a user