|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.processing.ToxiclibsSupport
public class ToxiclibsSupport
In addition to providing new drawing commands, this class provides wrappers for using datatypes of the toxiclibs core package directly with Processing's drawing commands. The class can be configured to work with any PGraphics instance (incl. offscreen buffers).
Constructor Summary | |
---|---|
ToxiclibsSupport(processing.core.PApplet app)
|
|
ToxiclibsSupport(processing.core.PApplet app,
processing.core.PGraphics gfx)
|
Method Summary | |
---|---|
void |
box(toxi.geom.AABB box)
|
void |
box(toxi.geom.AABB box,
boolean smooth)
|
void |
circle(toxi.geom.Vec2D p,
float radius)
|
void |
cone(toxi.geom.Cone cone)
|
void |
cone(toxi.geom.Cone cone,
boolean topClosed,
boolean bottomClosed)
|
void |
cone(toxi.geom.Cone cone,
int res,
boolean smooth)
|
void |
cone(toxi.geom.Cone cone,
int res,
boolean topClosed,
boolean bottomClosed,
boolean smooth)
|
void |
cylinder(toxi.geom.AxisAlignedCylinder cylinder)
|
void |
cylinder(toxi.geom.AxisAlignedCylinder cylinder,
int res,
boolean smooth)
|
void |
ellipse(toxi.geom.Ellipse e)
|
processing.core.PGraphics |
getGraphics()
|
void |
line(toxi.geom.Line2D line)
|
void |
line(toxi.geom.Line3D line)
|
void |
line(toxi.geom.ReadonlyVec2D a,
toxi.geom.ReadonlyVec2D b)
|
void |
line(toxi.geom.ReadonlyVec3D a,
toxi.geom.ReadonlyVec3D b)
|
void |
line(toxi.geom.Vec2D a,
toxi.geom.Vec2D b)
|
void |
line(toxi.geom.Vec3D a,
toxi.geom.Vec3D b)
|
void |
lineStrip2D(java.util.List<? extends toxi.geom.Vec2D> points)
Draws a 2D line strip using all points in the given list of vectors. |
void |
lineStrip3D(java.util.List<? extends toxi.geom.Vec3D> points)
Draws a 3D line strip using all points in the given list of vectors. |
void |
mesh(toxi.geom.mesh.Mesh3D mesh)
Draws a mesh instance using flat shading. |
void |
mesh(toxi.geom.mesh.Mesh3D mesh,
boolean smooth)
Draws a mesh instance. |
void |
mesh(toxi.geom.mesh.Mesh3D mesh,
boolean smooth,
float normalLength)
Draws a mesh instance. |
void |
meshNormalMapped(toxi.geom.mesh.Mesh3D mesh,
boolean vertexNormals,
float normalLength)
Draws the given mesh with each face or vertex tinted using its related normal vector as RGB color. |
void |
origin(float len)
|
void |
origin(toxi.geom.ReadonlyVec3D o,
float len)
Draws the major axes from the given point. |
void |
plane(toxi.geom.Plane plane,
float size)
Draws a square section of a plane at the given size. |
void |
point(toxi.geom.ReadonlyVec2D v)
|
void |
point(toxi.geom.ReadonlyVec3D v)
|
void |
point(toxi.geom.Vec2D v)
Draws a 2D point at the given position. |
void |
point(toxi.geom.Vec3D v)
Draws a 3D point at the given position. |
void |
points2D(java.util.Iterator<? extends toxi.geom.Vec2D> iterator)
|
void |
points2D(java.util.List<? extends toxi.geom.Vec2D> points)
|
void |
points3D(java.util.Iterator<? extends toxi.geom.Vec3D> iterator)
|
void |
points3D(java.util.List<? extends toxi.geom.Vec3D> points)
|
void |
polygon2D(toxi.geom.Polygon2D poly)
|
void |
processVertices2D(java.util.Iterator<? extends toxi.geom.Vec2D> iterator,
int shapeID,
boolean closed)
|
void |
processVertices3D(java.util.Iterator<? extends toxi.geom.Vec3D> iterator,
int shapeID,
boolean closed)
|
void |
ray(toxi.geom.Ray2D ray,
float length)
|
void |
ray(toxi.geom.Ray3D ray,
float length)
|
void |
rect(toxi.geom.Rect r)
|
void |
rotate(float theta,
toxi.geom.ReadonlyVec3D v)
|
void |
scale(toxi.geom.ReadonlyVec2D v)
|
void |
scale(toxi.geom.ReadonlyVec3D v)
|
void |
scale(toxi.geom.Vec2D v)
|
void |
scale(toxi.geom.Vec3D v)
|
void |
setGraphics(processing.core.PGraphics gfx)
|
void |
sphere(toxi.geom.Sphere sphere,
int res)
|
void |
sphere(toxi.geom.Sphere sphere,
int res,
boolean smooth)
|
void |
texturedMesh(toxi.geom.mesh.TriangleMesh mesh,
processing.core.PImage tex,
boolean smooth)
|
void |
translate(toxi.geom.ReadonlyVec2D v)
|
void |
translate(toxi.geom.ReadonlyVec3D v)
|
void |
translate(toxi.geom.Vec2D v)
|
void |
translate(toxi.geom.Vec3D v)
|
void |
triangle(toxi.geom.Triangle2D tri)
|
void |
triangle(toxi.geom.Triangle2D tri,
boolean isFullShape)
|
void |
triangle(toxi.geom.Triangle3D tri)
|
void |
triangle(toxi.geom.Triangle3D tri,
boolean isFullShape)
|
void |
vertex(toxi.geom.ReadonlyVec2D v)
|
void |
vertex(toxi.geom.ReadonlyVec3D v)
|
void |
vertex(toxi.geom.Vec2D v)
|
void |
vertex(toxi.geom.Vec3D v)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToxiclibsSupport(processing.core.PApplet app)
public ToxiclibsSupport(processing.core.PApplet app, processing.core.PGraphics gfx)
Method Detail |
---|
public final void box(toxi.geom.AABB box)
public final void box(toxi.geom.AABB box, boolean smooth)
public final void circle(toxi.geom.Vec2D p, float radius)
public final void cone(toxi.geom.Cone cone)
public final void cone(toxi.geom.Cone cone, boolean topClosed, boolean bottomClosed)
public final void cone(toxi.geom.Cone cone, int res, boolean smooth)
public final void cone(toxi.geom.Cone cone, int res, boolean topClosed, boolean bottomClosed, boolean smooth)
public final void cylinder(toxi.geom.AxisAlignedCylinder cylinder)
public final void cylinder(toxi.geom.AxisAlignedCylinder cylinder, int res, boolean smooth)
public final void ellipse(toxi.geom.Ellipse e)
public final processing.core.PGraphics getGraphics()
public final void line(toxi.geom.Line2D line)
public final void line(toxi.geom.Line3D line)
public final void line(toxi.geom.ReadonlyVec2D a, toxi.geom.ReadonlyVec2D b)
public final void line(toxi.geom.ReadonlyVec3D a, toxi.geom.ReadonlyVec3D b)
public final void line(toxi.geom.Vec2D a, toxi.geom.Vec2D b)
public final void line(toxi.geom.Vec3D a, toxi.geom.Vec3D b)
public final void lineStrip2D(java.util.List<? extends toxi.geom.Vec2D> points)
points
- point listpublic final void lineStrip3D(java.util.List<? extends toxi.geom.Vec3D> points)
points
- point listpublic final void mesh(toxi.geom.mesh.Mesh3D mesh)
mesh
- public final void mesh(toxi.geom.mesh.Mesh3D mesh, boolean smooth)
mesh
- smooth
- true to enable gouroud shading (uses vertex normals, which
should have been computed beforehand) or false for flat
shadingpublic final void mesh(toxi.geom.mesh.Mesh3D mesh, boolean smooth, float normalLength)
mesh
- smooth
- true to enable gouroud shading (uses vertex normals, which
should have been computed beforehand) or false for flat
shadingnormalLength
- if >0 then face (or vertex) normals are rendered at this
lengthpublic final void meshNormalMapped(toxi.geom.mesh.Mesh3D mesh, boolean vertexNormals, float normalLength)
mesh
- vertexNormals
- true, if using vertex normals (else face normals only)normalLength
- public void origin(float len)
public final void origin(toxi.geom.ReadonlyVec3D o, float len)
o
- origin pointlen
- axis lengthpublic final void plane(toxi.geom.Plane plane, float size)
plane
- plane to drawsize
- edge lengthpublic final void point(toxi.geom.ReadonlyVec2D v)
public final void point(toxi.geom.ReadonlyVec3D v)
public final void point(toxi.geom.Vec2D v)
v
- public final void point(toxi.geom.Vec3D v)
v
- public final void points2D(java.util.Iterator<? extends toxi.geom.Vec2D> iterator)
public final void points2D(java.util.List<? extends toxi.geom.Vec2D> points)
public final void points3D(java.util.Iterator<? extends toxi.geom.Vec3D> iterator)
public final void points3D(java.util.List<? extends toxi.geom.Vec3D> points)
public final void polygon2D(toxi.geom.Polygon2D poly)
public final void processVertices2D(java.util.Iterator<? extends toxi.geom.Vec2D> iterator, int shapeID, boolean closed)
public final void processVertices3D(java.util.Iterator<? extends toxi.geom.Vec3D> iterator, int shapeID, boolean closed)
public final void ray(toxi.geom.Ray2D ray, float length)
public final void ray(toxi.geom.Ray3D ray, float length)
public final void rect(toxi.geom.Rect r)
public final void rotate(float theta, toxi.geom.ReadonlyVec3D v)
public final void scale(toxi.geom.ReadonlyVec2D v)
public final void scale(toxi.geom.ReadonlyVec3D v)
public final void scale(toxi.geom.Vec2D v)
public final void scale(toxi.geom.Vec3D v)
public final void setGraphics(processing.core.PGraphics gfx)
gfx
- the gfx to setpublic final void sphere(toxi.geom.Sphere sphere, int res)
public final void sphere(toxi.geom.Sphere sphere, int res, boolean smooth)
public final void texturedMesh(toxi.geom.mesh.TriangleMesh mesh, processing.core.PImage tex, boolean smooth)
public final void translate(toxi.geom.ReadonlyVec2D v)
public final void translate(toxi.geom.ReadonlyVec3D v)
public final void translate(toxi.geom.Vec2D v)
public final void translate(toxi.geom.Vec3D v)
public final void triangle(toxi.geom.Triangle2D tri)
public final void triangle(toxi.geom.Triangle2D tri, boolean isFullShape)
public final void triangle(toxi.geom.Triangle3D tri)
public final void triangle(toxi.geom.Triangle3D tri, boolean isFullShape)
public final void vertex(toxi.geom.ReadonlyVec2D v)
public final void vertex(toxi.geom.ReadonlyVec3D v)
public final void vertex(toxi.geom.Vec2D v)
public final void vertex(toxi.geom.Vec3D v)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |