public final class Shapes
extends java.lang.Object
renderOnce(gl, createBox(null, box, true, Vec3.one, lightsOrNull), lightsOrNull)
drawCapsule(gl, capsule, 10, true, false, Color4.white, lightsOrNull)
Batch can be used with create*** methods to render
multiple times a shape, apply advanced material and more.Batch| Modifier and Type | Method and Description |
|---|---|
static Batch |
createAxis(Batch dstBatchOrNull,
float length)
Draw an axis system made of 3 lines :
red line: x axis green line: y axis blue line: z axis |
static Batch |
createBoundingVolume(Batch dstBatchOrNull,
IVolume<?> bv,
boolean line,
int subdivisions,
Lights<?> lights) |
static Batch |
createBox(Batch dstBatchOrNull,
Box bb,
boolean fill,
Vec3 uvArea,
Lights<?> lights)
Draw a box
|
static Batch |
createCapsule(Batch dstBatchOrNull,
Capsule capsule,
int slices,
boolean fill,
boolean hasUv,
Lights<?> lights)
Draw a capsule
|
static Batch |
createCircle(Batch dstBatchOrNull,
float radius,
int slices,
boolean fill,
int dir,
Vec3 center,
boolean hasUv,
Lights<?> lights)
Draw a circle wit axis along y
|
static Batch |
createCylinder(Batch dstBatchOrNull,
Cylinder cylinder,
int slices,
boolean fill,
boolean closed,
boolean hasUv,
Lights<?> lights) |
static Batch |
createCylinder(Batch dstBatchOrNull,
Vec3 position,
float baseRadius,
float topRadius,
float height,
int slices,
boolean fill,
boolean closed,
boolean hasUv,
Lights<?> lights)
Draw a cylinder with axis along Y
=========================================================================
Copyright (c) 2002-2008 LWJGL Project
All rights reserved.
|
static Batch |
createEllipse(Batch dstBatchOrNull,
float radiusX,
float radiusY,
int slices,
boolean fill,
Vec3 center,
boolean hasUv,
Lights<?> lights)
Draw an Ellipse along z plane
Num indices: fill ?
|
static Batch |
createFrustum(Mat4x4 proj,
Mat4x4 view) |
static Batch |
createGridY(Batch dstBatchOrNull,
float sizeX,
float sizeZ,
int numX,
int numZ,
float uRepeat,
float vRepeat,
Vec3 position,
boolean fill)
Num indices: (numX * numZ * 4) + (numX * 2) + (numZ * 2)
Num vertices: (numX + 1) * (numZ + 1) |
static Batch |
createLine(Batch dstBatchOrNull,
Vec3 pos1,
Vec3 pos2) |
static Batch |
createPoint(Batch dstBatchOrNull,
Vec3 pos) |
static Batch |
createQuadY(Batch dstBatchOrNull,
float sizeX,
float sizeZ,
float uRepeat,
float vRepeat,
Vec3 position,
boolean hasUv,
Lights<?> lights)
Draw a Rectangle on the z plane at the (x, y, z) position
Texture is repeted on the rectangle nbTextRepetition times. |
static Batch |
createQuadYLine(Batch dstBatchOrNull,
float sizeX,
float sizeZ,
Vec3 position)
Num indices: 5
Num vertices: 4 |
static Batch |
createQuadZ(Batch dstBatchOrNull,
float sizeX,
float sizeY,
float uRepeat,
float vRepeat,
Vec3 position,
boolean hasUv,
Lights<?> lights)
Draw a Rectangle on the z plane at the (x, y, z) position
Texture is repeated on the rectangle nbTextRepetition times. |
static Batch |
createQuadZLine(Batch dstBatchOrNull,
float sizeX,
float sizeY,
Vec3 position)
Num indices: 5
Num vertices: 4 |
static Batch |
createSphere(Batch dstBatchOrNull,
Sphere sphere,
int slices,
int stacks,
boolean fill,
boolean hasUv,
Lights<?> lights)
Draw a sphere with texture coordinates and normals
|
static void |
drawSkybox(IGL gl,
float size,
Vec3 position,
TextureID skyboxTexID)
Draw a skybox.
|
static void |
putBox(Batch batch,
Box bb,
boolean fill,
Vec3 uvArea,
byte[] color,
Lights<?> lights) |
static void |
putCircle(Batch batch,
float radius,
int slices,
boolean fill,
int dir,
Vec3 center) |
static void |
putCylinder(Batch batch,
Vec3 position,
float baseRadius,
float topRadius,
float height,
int slices,
boolean fill,
boolean closed) |
static void |
putLine(Batch batch,
Vec3 pos1,
Vec3 pos2,
byte[] color) |
static void |
putSphere(Batch batch,
Vec3 position,
float radius,
int slices,
int stacks,
boolean fill,
boolean half,
boolean halfBot,
byte[] color) |
static void |
renderOnce(IGL gl,
Batch batch,
Color4 color,
Lights<?> lights) |
static void |
renderOnce(IGL gl,
Batch batch,
Lights<?> lights) |
static void |
renderOnce(Renderer renderer,
Batch batch) |
static void |
renderOnce(Renderer renderer,
Batch batch,
Lights<?> lights) |
static void |
reserveBox(Batch batch,
boolean fill,
Vec3 uvArea,
Lights<?> lights) |
static void |
reserveCircle(Batch batch,
int slices,
boolean fill) |
static void |
reserveCylinder(Batch batch,
int slices,
boolean fill,
boolean closed) |
static void |
reserveLine(Batch batch) |
static void |
reserveSphere(Batch batch,
int slices,
int stacks,
boolean fill,
boolean half) |
public static Batch createQuadZ(Batch dstBatchOrNull, float sizeX, float sizeY, float uRepeat, float vRepeat, Vec3 position, boolean hasUv, Lights<?> lights)
sizeX - width of the rectanglesizeY - height of the rectangleuRepeat - number of repetition of the texture on the u axisvRepeat - number of repetition of the texture on the v axisposition - optional (can be null)public static Batch createQuadZLine(Batch dstBatchOrNull, float sizeX, float sizeY, Vec3 position)
public static Batch createQuadY(Batch dstBatchOrNull, float sizeX, float sizeZ, float uRepeat, float vRepeat, Vec3 position, boolean hasUv, Lights<?> lights)
sizeX - width of the rectanglesizeZ - height of the rectangleuRepeat - number of repetition of the texture on the u axisvRepeat - number of repetition of the texture on the v axisposition - optional (can be null)public static Batch createQuadYLine(Batch dstBatchOrNull, float sizeX, float sizeZ, Vec3 position)
public static Batch createGridY(Batch dstBatchOrNull, float sizeX, float sizeZ, int numX, int numZ, float uRepeat, float vRepeat, Vec3 position, boolean fill)
public static void reserveLine(Batch batch)
public static Batch createBoundingVolume(Batch dstBatchOrNull, IVolume<?> bv, boolean line, int subdivisions, Lights<?> lights)
public static Batch createBox(Batch dstBatchOrNull, Box bb, boolean fill, Vec3 uvArea, Lights<?> lights)
public static void putBox(Batch batch, Box bb, boolean fill, Vec3 uvArea, byte[] color, Lights<?> lights)
public static void drawSkybox(IGL gl, float size, Vec3 position, TextureID skyboxTexID)
size - size of the skyboxskyboxTexID - texture ID of a cub map texture
Num indices:36public static Batch createAxis(Batch dstBatchOrNull, float length)
public static Batch createSphere(Batch dstBatchOrNull, Sphere sphere, int slices, int stacks, boolean fill, boolean hasUv, Lights<?> lights)
public static void reserveSphere(Batch batch, int slices, int stacks, boolean fill, boolean half)
public static void putSphere(Batch batch, Vec3 position, float radius, int slices, int stacks, boolean fill, boolean half, boolean halfBot, byte[] color)
public static Batch createCircle(Batch dstBatchOrNull, float radius, int slices, boolean fill, int dir, Vec3 center, boolean hasUv, Lights<?> lights)
public static void reserveCircle(Batch batch, int slices, boolean fill)
public static void putCircle(Batch batch, float radius, int slices, boolean fill, int dir, Vec3 center)
public static Batch createEllipse(Batch dstBatchOrNull, float radiusX, float radiusY, int slices, boolean fill, Vec3 center, boolean hasUv, Lights<?> lights)
public static Batch createCylinder(Batch dstBatchOrNull, Cylinder cylinder, int slices, boolean fill, boolean closed, boolean hasUv, Lights<?> lights)
public static Batch createCylinder(Batch dstBatchOrNull, Vec3 position, float baseRadius, float topRadius, float height, int slices, boolean fill, boolean closed, boolean hasUv, Lights<?> lights)
public static void reserveCylinder(Batch batch, int slices, boolean fill, boolean closed)
public static void putCylinder(Batch batch, Vec3 position, float baseRadius, float topRadius, float height, int slices, boolean fill, boolean closed)
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com