Shapes 3D
3.0
|
Public Member Functions | |
SkyBox (float size) | |
SkyBox (float size, float zero_pos) | |
SkyBox | getThis () |
SkyBox | texture (PApplet app, String filename) |
SkyBox | texture (PImage texture) |
Public Member Functions inherited from shapes3d.Box | |
Box (float w, float h, float d) | |
Box (float w, float h, float d, Orientation orientation) | |
Public Member Functions inherited from shapes3d.Shape3D | |
Shape3D () | |
void | addPickHandler (Object obj, String methodName) |
Shape3D | pickable (boolean pickable) |
boolean | pickable () |
int | nbrParts () |
Shape3D | use (int parts_to_use) |
Shape3D | tag (String tag) |
Shape3D | tag (String tag, int parts) |
String[] | tags () |
Shape3D | drawMode (int mode) |
Shape3D | drawMode (int mode, int parts) |
int[] | drawModes () |
Shape3D | fill (int col) |
Shape3D | fill (int col, int parts) |
int[] | fills () |
Shape3D | stroke (int col) |
Shape3D | stroke (int col, int parts) |
int[] | strokes () |
Shape3D | strokeWeight (float weight) |
Shape3D | strokeWeight (float weight, int parts) |
float[] | strokeWeights () |
Shape3D | scale (float scale) |
float | scale () |
Shape3D | movie (PApplet pApplet, PImage movie) |
Shape3D | movie (PApplet pApplet, PImage movie, int parts) |
Shape3D | texture (PApplet app, String filename) |
Shape3D | texture (PImage texture) |
Shape3D | texture (PApplet app, String filename, int parts) |
Shape3D | texture (PImage texture, int parts) |
PImage[] | textures () |
Shape3D | uv (float u0, float u1, float v0, float v1) |
Shape3D | uv (float u0, float u1, float v0, float v1, int parts) |
Shape3D | uvt (TransformUV transformer) |
Shape3D | uvt (TransformUV transformer, int parts) |
Shape3D | uvwrap (int wrap) |
Shape3D | uvwrap (int wrap, int parts) |
Shape3D | mesh (int nbrColSlices, int nbrRowSlices) |
Shape3D | mesh (int nbrColSlices, int nbrRowSlices, int parts) |
Shape3D | visible (boolean visible) |
Shape3D | visible (boolean visible, int parts) |
boolean[] | visibles () |
Shape3D | moveTo (PVector pos) |
Shape3D | moveTo (float x, float y, float z) |
Shape3D | moveTo (float[] xyz) |
float | x () |
float | y () |
float | z () |
PVector | getPosVec () |
PVector | getPosVec (PVector target) |
float[] | getPosArray () |
float[] | getPosArray (float[] target) |
PVector | getRotVec () |
PVector | getRotVec (PVector target) |
float[] | getRotArray () |
float[] | getRotArray (float[] target) |
Shape3D | rotateTo (PVector angles) |
Shape3D | rotateTo (float[] angles) |
Shape3D | rotateTo (float x, float y, float z) |
Shape3D | rotateToX (float x) |
Shape3D | rotateToY (float y) |
Shape3D | rotateToZ (float z) |
Shape3D | rotateBy (float x, float y, float z) |
Shape3D | rotateBy (float[] angle) |
Shape3D | rotateBy (PVector angles) |
Shape3D | rotateByX (float x) |
Shape3D | rotateByY (float y) |
Shape3D | rotateByZ (float z) |
void | draw (PGraphics pg) |
void | drawPickBuffer (PGraphics pg) |
Additional Inherited Members | |
Static Public Member Functions inherited from shapes3d.Shape3D | |
static void | showSurfaceNormals () |
static void | showSurfaceNormals (int color, float weight, float length) |
static void | hideSurfaceNormals () |
static int | nextPickColor () |
static Picked | pick (PApplet app, PGraphics canvas, int x, int y) |
static Picked[] | pick (PApplet app, PGraphics canvas, int x0, int y0, int x1, int y1) |
static Picked[] | mergePicks (Picked[] picked) |
static void | keepPickBufferImage (boolean keep) |
static PImage | pickBufferImage () |
static int | nbrShapes3D () |
Public Attributes inherited from shapes3d.Shape3D | |
String | tag |
int | tagNo = 0 |
Public Attributes inherited from shapes3d.utils.SConstants | |
int | WIRE = 0x00000011 |
int | SOLID = 0x00000012 |
int | TEXTURE = 0x00000014 |
int | DRAWALL = WIRE | SOLID | TEXTURE |
int | WHITE = 0xFFFFFFFF |
int | BLACK = 0xFF000000 |
int | GREY = 0xFFC0C0C0 |
int | RED = 0xFFFF0000 |
int | GREEN = 0xFF00FF00 |
int | BLUE = 0xFF0000FF |
int | YELLOW = 0xFFFFFF00 |
int | PURPLE = 0xFFFF00FF |
int | CYAN = 0xFF00FFFF |
int | ORANGE = 0xFFFFC000 |
int | CW = 1 |
int | CCW = 2 |
int | ALL = 0b11111111 |
int | BOTTOM = 0b00000001 |
int | TOP = 0b00000010 |
int | FRONT = 0b00000100 |
int | BACK = 0b00001000 |
int | LEFT = 0b00010000 |
int | RIGHT = 0b00100000 |
int | BODY = 0b00000001 |
int | END0 = 0b00000010 |
int | END1 = 0b00000100 |
float | ONE_DEG_T = (float) (Math.PI / 180.0) |
PathOrthogonal | ORTHO_X = new PathOrthogonal.PathNormalX() |
PathOrthogonal | ORTHO_Y = new PathOrthogonal.PathNormalY() |
PathOrthogonal | ORTHO_Z = new PathOrthogonal.PathNormalZ() |
PathOrthogonal | ORTHO_A = new PathOrthogonal.PathNormalAMC() |
TransformUV | ROT_0 = TransformUV.ROT0 |
TransformUV | ROT_90 = TransformUV.ROT90 |
TransformUV | ROT_180 = TransformUV.ROT180 |
TransformUV | ROT_270 = TransformUV.ROT270 |
TransformUV | FLIP_H = TransformUV.FLIPH |
TransformUV | FLIP_V = TransformUV.FLIPV |
Rotation | ROTATION_ZERO = new Rotation() |
int | T_BOX = 0x1001 |
int | T_DOME = 0x1002 |
int | T_CONE = 0x1003 |
int | T_ELLIPSOID = 0x1004 |
int | T_EXTRUSION = 0x1005 |
int | T_LATHESTOCK = 0x1006 |
int | T_MD2 = 0x1007 |
int | T_SKYBOX = 0x1008 |
int | T_SKYDOME = 0x1009 |
int | T_TERRAIN = 0x100A |
int | T_TUBE = 0x100B |
int | C_LATHESURFACE = 0x2001 |
int | C_OVAL = 0x2002 |
int | C_POLYGON = 0x2003 |
int | P_BCURVE2D = 0x3001 |
int | P_BCURVE3D = 0x3002 |
int | P_BSPLINE2D = 0x3003 |
int | P_BSPLINE3D = 0x3004 |
int | P_LINEAR = 0x3005 |
int | P_LISSAJOUS = 0x3006 |
int | P_RING = 0x3007 |
int | P_SPIRAL = 0x3008 |
Protected Member Functions inherited from shapes3d.Box | |
void | calcShape () |
void | makeParts () |
void | releaseMemory () |
Protected Member Functions inherited from shapes3d.Shape3D | |
void | fireEvent (Object...objects) |
Protected Attributes inherited from shapes3d.Box | |
float | w |
float | h |
float | d |
PVector[] | coord |
PVector[] | normals |
Orientation | orientation |
Protected Attributes inherited from shapes3d.Shape3D | |
PGraphics | on_canvas |
PMatrix | on_canvas_matrix |
PVector | pos = new PVector(0,0,0) |
PVector | rot = new PVector(0,0,0) |
PVector | up = new PVector(0,1,0) |
PVector | centreRot = new PVector(0,0,0) |
float | shapeScale = 1.0f |
_ShapePart[] | shapeParts = new _ShapePart[0] |
int | useParts = ALL |
int | pickColor |
boolean | pickable = true |
Object | eventHandlerObject = null |
Method | eventHandlerMethod = null |
String | eventHandlerMethodName |
Static Protected Attributes inherited from shapes3d.Shape3D | |
static HashMap< Integer, Shape3D > | mapColor2Shape = new HashMap<Integer, Shape3D>() |
static HashMap< PGraphics, PGraphics > | mapCanvas2ColorBuffer = new HashMap<PGraphics, PGraphics>() |
static List< Shape3D > | shapesMade = new ArrayList<Shape3D>() |
static Set< Picked > | marqueeSelection = new HashSet<Picked>() |
static boolean | show_normals = false |
static int | normal_color = 0xFFFF00FF |
static float | normal_weight = 1.0f |
static float | normal_length = 10 |
static int | nextPickColor = 0xFF000000 |
static boolean | keepCopy = false |
static PImage | pbImage = null |
A box where all the sides are of equal length that can be textured to give the appearance of continuous sky.
The shape's orientation has been changed so that the positive Y axis represents the UP direction. This is the default for OpenGL but the opposite of the UP vector set by Processing. This should make working with the terrain class more intuitive since the vertical axis now represents height.
shapes3d.SkyBox.SkyBox | ( | float | size | ) |
Create a skybox of the specified size. The mid-height position will correspond with a terrain height of zero.
The horizon will correspond to
size | the length of the box sides |
shapes3d.SkyBox.SkyBox | ( | float | size, |
float | zero_pos | ||
) |
Unless you specify otherwise the mid-height position on the sky box will correspond to a terrain height of zero. You can change this by passing a non-zero value in the zero_pos parameter. This value is proportional to the size of the skybox so will be in the range -0.5 to +0.5
You may need to experiment with different values for zero_pos for your sketch.
size | the length of the box sides |
zero_pos | controls the level on the box height corresponding to a terrain height = 0 (zero) |
SkyBox shapes3d.SkyBox.texture | ( | PApplet | app, |
String | filename | ||
) |
The image is a composite of all sides sides laid out like
| T | | L | F | R | B | | Bo|
Top, Left, Front, Right, Back and Bottom.
app | the enclosing PApplet object |
filename | the filename of the image containing the composite picture |
SkyBox shapes3d.SkyBox.texture | ( | PImage | texture | ) |
The image is a composite of all sides sides laid out like
| T | | L | F | R | B | | Bo|
Top, Left, Front, Right, Back and Bottom.
texture | the image filename containing the composite picture |