public class GeometryBuilder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GeometryBuilder.IndexedTriangleArray |
static class |
GeometryBuilder.IndexedTriangleBuffer |
Modifier and Type | Field and Description |
---|---|
static int |
BOTTOM |
static int |
CLOCKWISE |
static int |
COUNTER_CLOCKWISE |
static int |
INSIDE |
protected static int |
LEADER_LOCATION_BOTTOM
Bit code indicating that the leader's location is below the rectangle.
|
protected static int |
LEADER_LOCATION_INSIDE
Bit code indicating that the leader's location is inside the rectangle.
|
protected static int |
LEADER_LOCATION_LEFT
Bit code indicating that the leader's location is to the left of the rectangle.
|
protected static int |
LEADER_LOCATION_RIGHT
Bit code indicating that the leader's location is to the right of the rectangle.
|
protected static int |
LEADER_LOCATION_TOP
Bit code indicating that the leader's location is above the rectangle.
|
static int |
LEFT |
static int |
OUTSIDE |
static int |
RIGHT |
static int |
TOP |
Constructor and Description |
---|
GeometryBuilder() |
Modifier and Type | Method and Description |
---|---|
protected void |
addRectangleRoundedCorner(float x,
float y,
float radius,
float start,
float sweep,
int slices,
java.nio.FloatBuffer buffer)
Adds the vertices for one rounded corner of a two-dimensional rectangular to the specified
buffer . |
protected int |
computeLeaderLocationCode(float x1,
float y1,
float x2,
float y2,
float leaderX,
float leaderY)
Returns a four bit code indicating the leader's location within the specified rectangle.
|
float |
computePolygonArea2(int pos,
int count,
Vec4[] points) |
int |
computePolygonWindingOrder2(int pos,
int count,
Vec4[] points) |
void |
fixSphereSeam(GeometryBuilder.IndexedTriangleBuffer itb,
float wrapThreshold) |
int |
getBilinearSurfaceFillDrawMode() |
int |
getBilinearSurfaceFillIndexCount(int uStacks,
int vStacks) |
int |
getBilinearSurfaceOutlineDrawMode() |
int |
getBilinearSurfaceOutlineIndexCount(int uStacks,
int vStacks,
int mask) |
int |
getBilinearSurfaceVertexCount(int uStacks,
int vStacks) |
int |
getCylinderDrawMode() |
int |
getCylinderIndexCount(int slices,
int stacks) |
int |
getCylinderOutlineDrawMode() |
int |
getCylinderOutlineIndexCount(int slices,
int stacks) |
int |
getCylinderVertexCount(int slices,
int stacks) |
int |
getDiskDrawMode() |
int |
getDiskIndexCount(int slices,
int loops) |
int |
getDiskVertexCount(int slices,
int loops) |
int |
getIndexedTriangleArrayDrawMode() |
int |
getIndexedTriangleBufferDrawMode() |
int |
getLongCylinderDrawMode() |
int |
getLongCylinderIndexCount(int arcSlices,
int lengthSlices,
int stacks) |
int |
getLongCylinderOutlineDrawMode() |
int |
getLongCylinderOutlineIndexCount(int arcSlices,
int lengthSlices,
int stacks) |
int |
getLongCylinderVertexCount(int arcSlices,
int lengthSlices,
int stacks) |
int |
getLongDiskDrawMode() |
int |
getLongDiskIndexCount(int arcSlices,
int lengthSlices,
int loops) |
int |
getLongDiskVertexCount(int arcSlices,
int lengthSlices,
int loops) |
int |
getOrientation() |
int |
getPartialCylinderDrawMode() |
int |
getPartialCylinderIndexCount(int slices,
int stacks) |
int |
getPartialCylinderOutlineDrawMode() |
int |
getPartialCylinderOutlineIndexCount(int slices,
int stacks) |
int |
getPartialCylinderVertexCount(int slices,
int stacks) |
int |
getPartialDiskDrawMode() |
int |
getPartialDiskIndexCount(int slices,
int loops) |
int |
getPartialDiskVertexCount(int slices,
int loops) |
int |
getRadialWallDrawMode() |
int |
getRadialWallIndexCount(int pillars,
int stacks) |
int |
getRadialWallOutlineDrawMode() |
int |
getRadialWallOutlineIndexCount(int pillars,
int stacks) |
int |
getRadialWallVertexCount(int pillars,
int stacks) |
int |
getSubdivisionPointsVertexCount(int subdivisions) |
void |
makeBilinearSurfaceFillIndices(int vertexPos,
int uStacks,
int vStacks,
int destPos,
int[] dest) |
void |
makeBilinearSurfaceOutlineIndices(int vertexPos,
int uStacks,
int vStacks,
int mask,
int destPos,
int[] dest) |
void |
makeBilinearSurfaceVertexNormals(int srcPos,
int uStacks,
int vStacks,
float[] srcVerts,
int destPos,
float[] dest) |
void |
makeBilinearSurfaceVertices(float[] control,
int destPos,
int uStacks,
int vStacks,
float[] dest) |
void |
makeCylinderIndices(int slices,
int stacks,
int[] dest) |
LatLon[] |
makeCylinderLocations(Globe globe,
LatLon center,
double minorRadius,
double majorRadius,
Angle heading,
int slices) |
LatLon[] |
makeCylinderLocations(Globe globe,
LatLon center,
double radius,
int slices) |
void |
makeCylinderNormals(GeometryBuilder.IndexedTriangleBuffer itb,
java.nio.FloatBuffer dest) |
void |
makeCylinderNormals(int slices,
int stacks,
float[] dest) |
void |
makeCylinderNormals(int indexPos,
int indexCount,
java.nio.IntBuffer indices,
int vertexPos,
int vertexCount,
java.nio.FloatBuffer vertices,
java.nio.FloatBuffer dest) |
void |
makeCylinderOutlineIndices(int slices,
int stacks,
int[] dest) |
void |
makeCylinderVertices(float radius,
float height,
int slices,
int stacks,
float[] dest) |
void |
makeCylinderVertices(Terrain terrain,
LatLon center,
double radius,
double[] altitudes,
boolean[] terrainConformant,
int slices,
int stacks,
Vec4 refPoint,
float[] dest) |
void |
makeCylinderVertices(Terrain terrain,
LatLon center,
double minorRadius,
double majorRadius,
Angle heading,
double[] altitudes,
boolean[] terrainConformant,
int slices,
int stacks,
Vec4 refPoint,
float[] dest) |
void |
makeDiskIndices(int slices,
int loops,
int[] dest) |
LatLon[] |
makeDiskLocations(Globe globe,
LatLon center,
double[] radii,
Angle heading,
int slices,
int loops) |
LatLon[] |
makeDiskLocations(Globe globe,
LatLon center,
double innerRadius,
double outerRadius,
int slices,
int loops) |
void |
makeDiskNormals(int slices,
int loops,
float[] dest) |
void |
makeDiskVertexNormals(double innerMinorRadius,
double outerMinorRadius,
int slices,
int loops,
float[] srcVerts,
float[] dest) |
void |
makeDiskVertices(float innerRadius,
float outerRadius,
int slices,
int loops,
float[] dest) |
void |
makeDiskVertices(Terrain terrain,
LatLon center,
double[] radii,
Angle heading,
double altitude,
boolean terrainConformant,
int slices,
int loops,
Vec4 refPoint,
float[] dest) |
void |
makeDiskVertices(Terrain terrain,
LatLon center,
double innerRadius,
double outerRadius,
double altitude,
boolean terrainConformant,
int slices,
int loops,
Vec4 refPoint,
float[] dest) |
java.nio.FloatBuffer |
makeEllipse(float x,
float y,
float majorRadius,
float minorRadius,
int slices)
Creates a vertex buffer for a two-dimensional ellipse centered at the specified location and with the specified
radii.
|
java.nio.FloatBuffer |
makeEllipseWithLeader(float x,
float y,
float majorRadius,
float minorRadius,
int slices,
float leaderX,
float leaderY,
float leaderWidth)
Creates a vertex buffer for a two-dimensional ellipse centered at the specified location and with the specified
radii.
|
void |
makeEllipsoidNormals(GeometryBuilder.IndexedTriangleBuffer itb,
java.nio.FloatBuffer dest) |
void |
makeEllipsoidNormals(int indexPos,
int indexCount,
java.nio.IntBuffer indices,
int vertexPos,
int vertexCount,
java.nio.FloatBuffer vertices,
java.nio.FloatBuffer dest) |
void |
makeEllipticalCylinderNormals(int slices,
int stacks,
double minorRadius,
double majorRadius,
Angle heading,
float[] dest) |
void |
makeIndexedTriangleArrayNormals(GeometryBuilder.IndexedTriangleArray ita,
float[] dest) |
void |
makeIndexedTriangleArrayNormals(int indexPos,
int indexCount,
int[] indices,
int vertexPos,
int vertexCount,
float[] vertices,
float[] dest) |
void |
makeIndexedTriangleBufferNormals(GeometryBuilder.IndexedTriangleBuffer itb,
java.nio.FloatBuffer dest) |
void |
makeIndexedTriangleBufferNormals(int indexPos,
int indexCount,
java.nio.IntBuffer indices,
int vertexPos,
int vertexCount,
java.nio.FloatBuffer vertices,
java.nio.FloatBuffer dest) |
void |
makeIndexedTriangleStripNormals(int indexPos,
int indexCount,
int[] indices,
int vertexPos,
int vertexCount,
float[] vertices,
float[] dest) |
void |
makeLongCylinderIndices(int arcSlices,
int lengthSlices,
int stacks,
int[] dest) |
LatLon[] |
makeLongCylinderLocations(Globe globe,
LatLon center1,
LatLon center2,
double radius,
int arcSlices,
int lengthSlices) |
void |
makeLongCylinderNormals(int arcSlices,
int lengthSlices,
int stacks,
float[] dest) |
void |
makeLongCylinderOutlineIndices(int arcSlices,
int lengthSlices,
int stacks,
int[] dest) |
void |
makeLongCylinderVertices(float radius,
float length,
float height,
int arcSlices,
int lengthSlices,
int stacks,
float[] dest) |
void |
makeLongCylinderVertices(Terrain terrain,
LatLon center1,
LatLon center2,
double radius,
double[] altitudes,
boolean[] terrainConformant,
int arcSlices,
int lengthSlices,
int stacks,
Vec4 refPoint,
float[] dest) |
void |
makeLongDiskIndices(int arcSlices,
int lengthSlices,
int loops,
int[] dest) |
LatLon[] |
makeLongDiskLocations(Globe globe,
LatLon center1,
LatLon center2,
double innerRadius,
double outerRadius,
int arcSlices,
int lengthSlices,
int loops) |
void |
makeLongDiskNormals(int arcSlices,
int lengthSlices,
int loops,
float[] dest) |
void |
makeLongDiskVertexNormals(float innerRadius,
float outerRadius,
float length,
int arcSlices,
int lengthSlices,
int loops,
float[] srcVerts,
float[] dest) |
void |
makeLongDiskVertices(float innerRadius,
float outerRadius,
float length,
int arcSlices,
int lengthSlices,
int loops,
float[] dest) |
void |
makeLongDiskVertices(Terrain terrain,
LatLon center1,
LatLon center2,
double innerRadius,
double outerRadius,
double altitude,
boolean terrainConformant,
int arcSlices,
int lengthSlices,
int loops,
Vec4 refPoint,
float[] dest) |
void |
makePartialCylinderIndices(int slices,
int stacks,
int[] dest) |
LatLon[] |
makePartialCylinderLocations(Globe globe,
LatLon center,
double radius,
int slices,
double start,
double sweep) |
void |
makePartialCylinderNormals(float radius,
float height,
int slices,
int stacks,
float start,
float sweep,
float[] dest) |
void |
makePartialCylinderOutlineIndices(int slices,
int stacks,
int[] dest) |
void |
makePartialCylinderVertices(float radius,
float height,
int slices,
int stacks,
float start,
float sweep,
float[] dest) |
void |
makePartialCylinderVertices(Terrain terrain,
LatLon center,
double radius,
double[] altitudes,
boolean[] terrainConformant,
int slices,
int stacks,
double start,
double sweep,
Vec4 refPoint,
float[] dest) |
void |
makePartialDiskIndices(int slices,
int loops,
int[] dest) |
LatLon[] |
makePartialDiskLocations(Globe globe,
LatLon center,
double innerRadius,
double outerRadius,
int slices,
int loops,
double start,
double sweep) |
void |
makePartialDiskNormals(int slices,
int loops,
float[] dest) |
void |
makePartialDiskVertexNormals(float innerRadius,
float outerRadius,
int slices,
int loops,
float start,
float sweep,
float[] srcVerts,
float[] dest) |
void |
makePartialDiskVertices(float innerRadius,
float outerRadius,
int slices,
int loops,
float start,
float sweep,
float[] dest) |
void |
makePartialDiskVertices(Terrain terrain,
LatLon center,
double innerRadius,
double outerRadius,
double altitude,
boolean terrainConformant,
int slices,
int loops,
double start,
double sweep,
Vec4 refPoint,
float[] dest) |
void |
makeRadialWallIndices(int pillars,
int stacks,
int[] dest) |
void |
makeRadialWallNormals(float innerRadius,
float outerRadius,
float height,
float angle,
int pillars,
int stacks,
float[] dest) |
void |
makeRadialWallOutlineIndices(int pillars,
int stacks,
int[] dest) |
void |
makeRadialWallVertices(float innerRadius,
float outerRadius,
float height,
float angle,
int pillars,
int stacks,
float[] dest) |
void |
makeRadialWallVertices(Terrain terrain,
LatLon center,
double innerRadius,
double outerRadius,
double angle,
double[] altitudes,
boolean[] terrainConformant,
int pillars,
int stacks,
Vec4 refPoint,
float[] dest) |
java.nio.FloatBuffer |
makeRectangle(float x,
float y,
float width,
float height)
Creates a vertex buffer for a two-dimensional rectangle at the specified location, and with the specified size.
|
java.nio.FloatBuffer |
makeRectangle(float x,
float y,
float width,
float height,
float cornerRadius,
int cornerSlices)
Creates a vertex buffer for a two-dimensional rectangle at the specified location, with the specified size, and
with optionally rounded corners.
|
java.nio.FloatBuffer |
makeRectangleWithLeader(float x,
float y,
float width,
float height,
float leaderX,
float leaderY,
float leaderWidth)
Creates a vertex buffer for a two-dimensional rectangle at the specified location, with the specified size, and
with an optional leader pointing to the specified leader location.
|
java.nio.FloatBuffer |
makeRectangleWithLeader(float x,
float y,
float width,
float height,
float cornerRadius,
int cornerSlices,
float leaderX,
float leaderY,
float leaderWidth)
Creates a vertex buffer for a two-dimensional rectangle at the specified location, with the specified size, and
with optionally rounded corners.
|
void |
makeSubdivisionPoints(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
int subdivisions,
float[] dest) |
void |
makeUnitBoxTextureCoordinates(java.nio.FloatBuffer texCoords,
int vertexCount) |
void |
makeUnitBoxTextureCoordinates(int index,
java.nio.FloatBuffer texCoords,
int vertexCount) |
void |
makeUnitConeTextureCoordinates(java.nio.FloatBuffer texCoords,
int subdivisions) |
void |
makeUnitConeTextureCoordinates(int face,
java.nio.FloatBuffer texCoords,
int subdivisions) |
void |
makeUnitCylinderTextureCoordinates(int face,
java.nio.FloatBuffer texCoords,
int subdivisions) |
void |
makeUnitPyramidTextureCoordinates(java.nio.FloatBuffer texCoords,
int vertexCount) |
void |
makeUnitPyramidTextureCoordinates(int index,
java.nio.FloatBuffer texCoords,
int vertexCount) |
void |
makeUnitSphereTextureCoordinates(GeometryBuilder.IndexedTriangleBuffer itb,
java.nio.FloatBuffer texCoords) |
void |
makeUnitSphereTextureCoordinates(GeometryBuilder.IndexedTriangleBuffer itb,
java.nio.FloatBuffer texCoords,
int seamVerticesIndex) |
void |
makeUnitSphereTextureCoordinates(int vertexCount,
java.nio.FloatBuffer vertices,
java.nio.FloatBuffer texCoords,
int seamVerticesIndex) |
void |
makeUnitWedgeTextureCoordinates(int face,
java.nio.FloatBuffer texCoords,
int subdivisions,
Angle angle) |
void |
makeWedgeTextureCoordinates(java.nio.FloatBuffer texCoords,
int subdivisions,
Angle angle) |
<T> void |
reversePoints(int pos,
int count,
T[] points) |
void |
setOrientation(int orientation) |
void |
subdivideIndexedTriangleArray(GeometryBuilder.IndexedTriangleArray ita) |
void |
subdivideIndexedTriangleBuffer(GeometryBuilder.IndexedTriangleBuffer itb) |
GeometryBuilder.IndexedTriangleArray |
subdivideIndexedTriangles(int indexCount,
int[] indices,
int vertexCount,
float[] vertices) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateBoxBuffer(float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateBoxBuffer(int face,
float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateConeBuffer(float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateConeBuffer(int face,
float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateCylinderBuffer(float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateCylinderBuffer(int face,
float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateEllipsoidBuffer(float a,
float b,
float c,
int subdivisions) |
GeometryBuilder.IndexedTriangleArray |
tessellatePolygon(int pos,
int count,
float[] vertices,
Vec4 normal) |
GeometryBuilder.IndexedTriangleArray |
tessellatePolygon2(int pos,
int count,
float[] vertices) |
GeometryBuilder.IndexedTriangleBuffer |
tessellatePyramidBuffer(float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellatePyramidBuffer(int face,
float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleArray |
tessellateSphere(float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateSphereBuffer(float radius,
int subdivisions) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateWedgeBuffer(float radius,
int subdivisions,
Angle angle) |
GeometryBuilder.IndexedTriangleBuffer |
tessellateWedgeBuffer(int face,
float radius,
int subdivisions,
Angle angle) |
public static final int BOTTOM
public static final int CLOCKWISE
public static final int COUNTER_CLOCKWISE
public static final int INSIDE
protected static final int LEADER_LOCATION_BOTTOM
computeLeaderLocationCode(float, float, float, float, float, float)
.protected static final int LEADER_LOCATION_INSIDE
computeLeaderLocationCode(float, float, float, float, float, float)
.protected static final int LEADER_LOCATION_LEFT
computeLeaderLocationCode(float, float, float, float, float, float)
.protected static final int LEADER_LOCATION_RIGHT
computeLeaderLocationCode(float, float, float, float, float, float)
.protected static final int LEADER_LOCATION_TOP
computeLeaderLocationCode(float, float, float, float, float, float)
.public static final int LEFT
public static final int OUTSIDE
public static final int RIGHT
public static final int TOP
protected void addRectangleRoundedCorner(float x, float y, float radius, float start, float sweep, int slices, java.nio.FloatBuffer buffer)
buffer
.
This assumes that the first and last vertices of each corner are created by the caller, so this adds only the
intermediate vertices. The number of intermediate vertices is equal to slices - 2
. This does nothing
if slices
is one or zero.x
- the x-coordinate of the corner's origin.y
- the y-coordinate of the corner's origin.radius
- the corner's radius.start
- the corner's starting angle, in radians.sweep
- the corner's angular distance, in radians.slices
- the number of slices in the corner.buffer
- the buffer the corner's xy coordinates are added to.protected int computeLeaderLocationCode(float x1, float y1, float x2, float y2, float leaderX, float leaderY)
(x1, y1)
and its upper right corner is located at (x2, y2)
.
The returned code includes the bit for any of LEADER_LOCATION_LEFT
,
LEADER_LOCATION_RIGHT
, LEADER_LOCATION_BOTTOM
, and LEADER_LOCATION_TOP
,
depending on whether the leader is located to the left, right, bottom, or top of the rectangle. If the leader is
inside the rectangle, this returns LEADER_LOCATION_INSIDE
.x1
- the rectangle's minimum x-coordinate.y1
- the rectangle's maximum x-coordinate.x2
- the rectangle's minimum y-coordinate.y2
- the rectangle's maximum y-coordinate.leaderX
- the leader's x-coordinate.leaderY
- the leader's y-coordinate.public float computePolygonArea2(int pos, int count, Vec4[] points)
public int computePolygonWindingOrder2(int pos, int count, Vec4[] points)
public void fixSphereSeam(GeometryBuilder.IndexedTriangleBuffer itb, float wrapThreshold)
public int getBilinearSurfaceFillDrawMode()
public int getBilinearSurfaceFillIndexCount(int uStacks, int vStacks)
public int getBilinearSurfaceOutlineDrawMode()
public int getBilinearSurfaceOutlineIndexCount(int uStacks, int vStacks, int mask)
public int getBilinearSurfaceVertexCount(int uStacks, int vStacks)
public int getCylinderDrawMode()
public int getCylinderIndexCount(int slices, int stacks)
public int getCylinderOutlineDrawMode()
public int getCylinderOutlineIndexCount(int slices, int stacks)
public int getCylinderVertexCount(int slices, int stacks)
public int getDiskDrawMode()
public int getDiskIndexCount(int slices, int loops)
public int getDiskVertexCount(int slices, int loops)
public int getIndexedTriangleArrayDrawMode()
public int getIndexedTriangleBufferDrawMode()
public int getLongCylinderDrawMode()
public int getLongCylinderIndexCount(int arcSlices, int lengthSlices, int stacks)
public int getLongCylinderOutlineDrawMode()
public int getLongCylinderOutlineIndexCount(int arcSlices, int lengthSlices, int stacks)
public int getLongCylinderVertexCount(int arcSlices, int lengthSlices, int stacks)
public int getLongDiskDrawMode()
public int getLongDiskIndexCount(int arcSlices, int lengthSlices, int loops)
public int getLongDiskVertexCount(int arcSlices, int lengthSlices, int loops)
public int getOrientation()
public int getPartialCylinderDrawMode()
public int getPartialCylinderIndexCount(int slices, int stacks)
public int getPartialCylinderOutlineDrawMode()
public int getPartialCylinderOutlineIndexCount(int slices, int stacks)
public int getPartialCylinderVertexCount(int slices, int stacks)
public int getPartialDiskDrawMode()
public int getPartialDiskIndexCount(int slices, int loops)
public int getPartialDiskVertexCount(int slices, int loops)
public int getRadialWallDrawMode()
public int getRadialWallIndexCount(int pillars, int stacks)
public int getRadialWallOutlineDrawMode()
public int getRadialWallOutlineIndexCount(int pillars, int stacks)
public int getRadialWallVertexCount(int pillars, int stacks)
public int getSubdivisionPointsVertexCount(int subdivisions)
public void makeBilinearSurfaceFillIndices(int vertexPos, int uStacks, int vStacks, int destPos, int[] dest)
public void makeBilinearSurfaceOutlineIndices(int vertexPos, int uStacks, int vStacks, int mask, int destPos, int[] dest)
public void makeBilinearSurfaceVertexNormals(int srcPos, int uStacks, int vStacks, float[] srcVerts, int destPos, float[] dest)
public void makeBilinearSurfaceVertices(float[] control, int destPos, int uStacks, int vStacks, float[] dest)
public void makeCylinderIndices(int slices, int stacks, int[] dest)
public LatLon[] makeCylinderLocations(Globe globe, LatLon center, double minorRadius, double majorRadius, Angle heading, int slices)
public LatLon[] makeCylinderLocations(Globe globe, LatLon center, double radius, int slices)
public void makeCylinderNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)
public void makeCylinderNormals(int slices, int stacks, float[] dest)
public void makeCylinderNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)
public void makeCylinderOutlineIndices(int slices, int stacks, int[] dest)
public void makeCylinderVertices(float radius, float height, int slices, int stacks, float[] dest)
public void makeCylinderVertices(Terrain terrain, LatLon center, double radius, double[] altitudes, boolean[] terrainConformant, int slices, int stacks, Vec4 refPoint, float[] dest)
public void makeCylinderVertices(Terrain terrain, LatLon center, double minorRadius, double majorRadius, Angle heading, double[] altitudes, boolean[] terrainConformant, int slices, int stacks, Vec4 refPoint, float[] dest)
public void makeDiskIndices(int slices, int loops, int[] dest)
public LatLon[] makeDiskLocations(Globe globe, LatLon center, double[] radii, Angle heading, int slices, int loops)
public LatLon[] makeDiskLocations(Globe globe, LatLon center, double innerRadius, double outerRadius, int slices, int loops)
public void makeDiskNormals(int slices, int loops, float[] dest)
public void makeDiskVertexNormals(double innerMinorRadius, double outerMinorRadius, int slices, int loops, float[] srcVerts, float[] dest)
public void makeDiskVertices(float innerRadius, float outerRadius, int slices, int loops, float[] dest)
public void makeDiskVertices(Terrain terrain, LatLon center, double[] radii, Angle heading, double altitude, boolean terrainConformant, int slices, int loops, Vec4 refPoint, float[] dest)
public void makeDiskVertices(Terrain terrain, LatLon center, double innerRadius, double outerRadius, double altitude, boolean terrainConformant, int slices, int loops, Vec4 refPoint, float[] dest)
public java.nio.FloatBuffer makeEllipse(float x, float y, float majorRadius, float minorRadius, int slices)
(x, y)
, it has a width of 2 * majorRadius
, and
a height of 2 * minorRadius
.
If the specified slices
is greater than 1 this returns a buffer with vertices evenly spaced along
the circumference of the ellipse. Otherwise this returns a buffer with one vertex.
The returned buffer contains pairs of xy coordinates representing the location of each vertex in the ellipse in a
counter-clockwise winding order relative to the z axis. The buffer may be rendered in OpenGL as either a triangle
fan or a line loop.x
- the x-coordinate of the ellipse's center.y
- the y-coordinate of the ellipse's center.majorRadius
- the ellipse's radius along the x axis.minorRadius
- the ellipse's radius along the y axis.slices
- the number of slices in the ellipse.java.lang.IllegalArgumentException
- if any of majorRadius
, minorRadius
, or
slices
are less than zero.public java.nio.FloatBuffer makeEllipseWithLeader(float x, float y, float majorRadius, float minorRadius, int slices, float leaderX, float leaderY, float leaderWidth)
(x, y)
, it has a width of 2 * majorRadius
, and
a height of 2 * minorRadius
.
If the specified slices
is greater than 1 this returns a buffer with vertices evenly spaced along
the circumference of the ellipse. Otherwise this returns a buffer with one vertex.
If the specified leaderWidth
is greater than zero and the location (leaderX, leaderY)
is outside of the rectangle that encloses the ellipse, the ellipse has a triangle attached to one side with with
its top pointing at (leaderX, leaderY)
. Otherwise this returns an ellipse with no leader and is
equivalent to calling makeEllipse(float, float, float, float, int)
. The leader is attached
at the center of either the top, bottom, left, or right side, depending on the leader's location relative to the
ellipse. The leader width is limited in size by the side it is attached to. For example, if the leader is
attached to the ellipse's bottom, its width is limited by the ellipse's major radius.x
- the x-coordinate of the ellipse's center.y
- the y-coordinate of the ellipse's center.majorRadius
- the ellipse's radius along the x axis.minorRadius
- the ellipse's radius along the y axis.slices
- the number of slices in the ellipse.leaderX
- the x-coordinate the leader points to.leaderY
- the y-coordinate the leader points to.leaderWidth
- the leader triangle's width.java.lang.IllegalArgumentException
- if any of majorRadius
, minorRadius
,
slices
, or leaderWidth
are less than zero.public void makeEllipsoidNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)
public void makeEllipsoidNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)
public void makeEllipticalCylinderNormals(int slices, int stacks, double minorRadius, double majorRadius, Angle heading, float[] dest)
public void makeIndexedTriangleArrayNormals(GeometryBuilder.IndexedTriangleArray ita, float[] dest)
public void makeIndexedTriangleArrayNormals(int indexPos, int indexCount, int[] indices, int vertexPos, int vertexCount, float[] vertices, float[] dest)
public void makeIndexedTriangleBufferNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)
public void makeIndexedTriangleBufferNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)
public void makeIndexedTriangleStripNormals(int indexPos, int indexCount, int[] indices, int vertexPos, int vertexCount, float[] vertices, float[] dest)
public void makeLongCylinderIndices(int arcSlices, int lengthSlices, int stacks, int[] dest)
public LatLon[] makeLongCylinderLocations(Globe globe, LatLon center1, LatLon center2, double radius, int arcSlices, int lengthSlices)
public void makeLongCylinderNormals(int arcSlices, int lengthSlices, int stacks, float[] dest)
public void makeLongCylinderOutlineIndices(int arcSlices, int lengthSlices, int stacks, int[] dest)
public void makeLongCylinderVertices(float radius, float length, float height, int arcSlices, int lengthSlices, int stacks, float[] dest)
public void makeLongCylinderVertices(Terrain terrain, LatLon center1, LatLon center2, double radius, double[] altitudes, boolean[] terrainConformant, int arcSlices, int lengthSlices, int stacks, Vec4 refPoint, float[] dest)
public void makeLongDiskIndices(int arcSlices, int lengthSlices, int loops, int[] dest)
public LatLon[] makeLongDiskLocations(Globe globe, LatLon center1, LatLon center2, double innerRadius, double outerRadius, int arcSlices, int lengthSlices, int loops)
public void makeLongDiskNormals(int arcSlices, int lengthSlices, int loops, float[] dest)
public void makeLongDiskVertexNormals(float innerRadius, float outerRadius, float length, int arcSlices, int lengthSlices, int loops, float[] srcVerts, float[] dest)
public void makeLongDiskVertices(float innerRadius, float outerRadius, float length, int arcSlices, int lengthSlices, int loops, float[] dest)
public void makeLongDiskVertices(Terrain terrain, LatLon center1, LatLon center2, double innerRadius, double outerRadius, double altitude, boolean terrainConformant, int arcSlices, int lengthSlices, int loops, Vec4 refPoint, float[] dest)
public void makePartialCylinderIndices(int slices, int stacks, int[] dest)
public LatLon[] makePartialCylinderLocations(Globe globe, LatLon center, double radius, int slices, double start, double sweep)
public void makePartialCylinderNormals(float radius, float height, int slices, int stacks, float start, float sweep, float[] dest)
public void makePartialCylinderOutlineIndices(int slices, int stacks, int[] dest)
public void makePartialCylinderVertices(float radius, float height, int slices, int stacks, float start, float sweep, float[] dest)
public void makePartialCylinderVertices(Terrain terrain, LatLon center, double radius, double[] altitudes, boolean[] terrainConformant, int slices, int stacks, double start, double sweep, Vec4 refPoint, float[] dest)
public void makePartialDiskIndices(int slices, int loops, int[] dest)
public LatLon[] makePartialDiskLocations(Globe globe, LatLon center, double innerRadius, double outerRadius, int slices, int loops, double start, double sweep)
public void makePartialDiskNormals(int slices, int loops, float[] dest)
public void makePartialDiskVertexNormals(float innerRadius, float outerRadius, int slices, int loops, float start, float sweep, float[] srcVerts, float[] dest)
public void makePartialDiskVertices(float innerRadius, float outerRadius, int slices, int loops, float start, float sweep, float[] dest)
public void makePartialDiskVertices(Terrain terrain, LatLon center, double innerRadius, double outerRadius, double altitude, boolean terrainConformant, int slices, int loops, double start, double sweep, Vec4 refPoint, float[] dest)
public void makeRadialWallIndices(int pillars, int stacks, int[] dest)
public void makeRadialWallNormals(float innerRadius, float outerRadius, float height, float angle, int pillars, int stacks, float[] dest)
public void makeRadialWallOutlineIndices(int pillars, int stacks, int[] dest)
public void makeRadialWallVertices(float innerRadius, float outerRadius, float height, float angle, int pillars, int stacks, float[] dest)
public void makeRadialWallVertices(Terrain terrain, LatLon center, double innerRadius, double outerRadius, double angle, double[] altitudes, boolean[] terrainConformant, int pillars, int stacks, Vec4 refPoint, float[] dest)
public java.nio.FloatBuffer makeRectangle(float x, float y, float width, float height)
(x, y)
, and its upper right corner is placed at
(x + width, y + height)
.
The returned buffer contains pairs of xy coordinates representing the location of each vertex in the rectangle in
a counter-clockwise winding order relative to the z axis. The buffer may be rendered in OpenGL as either a
triangle fan or a line loop.x
- the x-coordinate of the rectangle's lower left corner.y
- the y-coordinate of the rectangle's lower left corner.width
- the rectangle's width.height
- the rectangle's height.java.lang.IllegalArgumentException
- if either width
or height
are less than zero.public java.nio.FloatBuffer makeRectangle(float x, float y, float width, float height, float cornerRadius, int cornerSlices)
(x, y)
, and its
upper right corner is placed at (x + width, y + height)
.
If the specified cornerRadius
and cornerSlices
are greater than 0, the rectangle's
corners have a rounded appearance. The radius specifies the size of a rounded corner, and the slices specifies
the number of segments that make a rounded corner. If either cornerRadius
or
cornerSlices
are 0, this returns a rectangle with sharp corners and is equivalent to calling
makeRectangle(float, float, float, float)
. The cornerRadius
is limited by the
rectangle's width and height. For example, if the corner radius is 100 and the width and height are 50 and 100,
the actual corner radius used is 25 - half of the rectangle's smallest dimension.
The returned buffer contains pairs of xy coordinates representing the location of each vertex in the rectangle in
a counter-clockwise winding order relative to the z axis. The buffer may be rendered in OpenGL as either a
triangle fan or a line loop.x
- the x-coordinate of the rectangle's lower left corner.y
- the y-coordinate of the rectangle's lower left corner.width
- the rectangle's width.height
- the rectangle's height.cornerRadius
- the rectangle's rounded corner radius, or 0 to disable rounded corners.cornerSlices
- the number of slices in each rounded corner, or 0 to disable rounded corners.java.lang.IllegalArgumentException
- if any of width
, height
, cornerRadius
, or
cornerSlices
are less than zero.public java.nio.FloatBuffer makeRectangleWithLeader(float x, float y, float width, float height, float leaderX, float leaderY, float leaderWidth)
(x, y)
, and its upper right corner is placed at (x + width, y + height)
.
If the specified leaderWidth
is greater than zero and the location (leaderX, leaderY)
is outside of the rectangle, the rectangle has a triangle attached to one side with with its top pointing at
(leaderX, leaderY)
. Otherwise this returns a rectangle with no leader and is equivalent to calling
makeRectangle(float, float, float, float)
. The leader is attached at the center of either
the top, bottom, left, or right side, depending on the leader's location relative to the rectangle. The leader
width is limited in size by the side it is attached to. For example, if the leader is attached to the rectangle's
bottom, its width is limited by the rectangle's width.
The returned buffer contains pairs of xy coordinates representing the location of each vertex in the rectangle in
a counter-clockwise winding order relative to the z axis. The buffer may be rendered in OpenGL as either a
triangle fan or a line loop.x
- the x-coordinate of the rectangle's lower left corner.y
- the y-coordinate of the rectangle's lower left corner.width
- the rectangle's width.height
- the rectangle's height.leaderX
- the x-coordinate the leader points to.leaderY
- the y-coordinate the leader points to.leaderWidth
- the leader triangle's width.java.lang.IllegalArgumentException
- if any of width
, height
, or leaderWidth
are less than zero.public java.nio.FloatBuffer makeRectangleWithLeader(float x, float y, float width, float height, float cornerRadius, int cornerSlices, float leaderX, float leaderY, float leaderWidth)
(x, y)
, and its
upper right corner is placed at (x + width, y + height)
.
If the specified cornerRadius
and cornerSlices
are greater than 0, the rectangle's
corners have a rounded appearance. The radius specifies the size of a rounded corner, and the slices specifies
the number of segments that make a rounded corner. If either cornerRadius
or
cornerSlices
are 0, this returns a rectangle with sharp corners and is equivalent to calling
makeRectangleWithLeader(float, float, float, float, float, float, float)
. The
cornerRadius
is limited by the rectangle's width and height. For example, if the corner radius is
100 and the width and height are 50 and 100, the actual corner radius used is 25 - half of the rectangle's
smallest dimension.
If the specified leaderWidth
is greater than zero and the location (leaderX, leaderY)
is outside of the rectangle, the rectangle has a triangle attached to one side with with its top pointing at
(leaderX, leaderY)
. Otherwise this returns a rectangle with no leader and is equivalent to calling
makeRectangle(float, float, float, float, float, int)
. The leader is attached at the center
of either the top, bottom, left, or right side, depending on the leader's location relative to the rectangle. The
leader width is limited in size by the side it is attached to. For example, if the leader is attached to the
rectangle's bottom, its width is limited by the rectangle's width minus any area used by the rounded corners.
The returned buffer contains pairs of xy coordinates representing the location of each vertex in the rectangle in
a counter-clockwise winding order relative to the z axis. The buffer may be rendered in OpenGL as either a
triangle fan or a line loop.x
- the x-coordinate of the rectangle's lower left corner.y
- the y-coordinate of the rectangle's lower left corner.width
- the rectangle's width.height
- the rectangle's height.cornerRadius
- the rectangle's rounded corner radius, or 0 to disable rounded corners.cornerSlices
- the number of slices in each rounded corner, or 0 to disable rounded corners.leaderX
- the x-coordinate the leader points to.leaderY
- the y-coordinate the leader points to.leaderWidth
- the leader triangle's width.java.lang.IllegalArgumentException
- if any of width
, height
, cornerRadius
,
cornerSlices
, or leaderWidth
are less than zero.public void makeSubdivisionPoints(float x1, float y1, float z1, float x2, float y2, float z2, int subdivisions, float[] dest)
public void makeUnitBoxTextureCoordinates(java.nio.FloatBuffer texCoords, int vertexCount)
public void makeUnitBoxTextureCoordinates(int index, java.nio.FloatBuffer texCoords, int vertexCount)
public void makeUnitConeTextureCoordinates(java.nio.FloatBuffer texCoords, int subdivisions)
public void makeUnitConeTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions)
public void makeUnitCylinderTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions)
public void makeUnitPyramidTextureCoordinates(java.nio.FloatBuffer texCoords, int vertexCount)
public void makeUnitPyramidTextureCoordinates(int index, java.nio.FloatBuffer texCoords, int vertexCount)
public void makeUnitSphereTextureCoordinates(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer texCoords)
public void makeUnitSphereTextureCoordinates(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer texCoords, int seamVerticesIndex)
public void makeUnitSphereTextureCoordinates(int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer texCoords, int seamVerticesIndex)
public void makeUnitWedgeTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions, Angle angle)
public void makeWedgeTextureCoordinates(java.nio.FloatBuffer texCoords, int subdivisions, Angle angle)
public <T> void reversePoints(int pos, int count, T[] points)
public void setOrientation(int orientation)
public void subdivideIndexedTriangleArray(GeometryBuilder.IndexedTriangleArray ita)
public void subdivideIndexedTriangleBuffer(GeometryBuilder.IndexedTriangleBuffer itb)
public GeometryBuilder.IndexedTriangleArray subdivideIndexedTriangles(int indexCount, int[] indices, int vertexCount, float[] vertices)
public GeometryBuilder.IndexedTriangleBuffer tessellateBoxBuffer(float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellateBoxBuffer(int face, float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellateConeBuffer(float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellateConeBuffer(int face, float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellateCylinderBuffer(float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellateCylinderBuffer(int face, float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellateEllipsoidBuffer(float a, float b, float c, int subdivisions)
public GeometryBuilder.IndexedTriangleArray tessellatePolygon(int pos, int count, float[] vertices, Vec4 normal)
public GeometryBuilder.IndexedTriangleArray tessellatePolygon2(int pos, int count, float[] vertices)
public GeometryBuilder.IndexedTriangleBuffer tessellatePyramidBuffer(float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellatePyramidBuffer(int face, float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleArray tessellateSphere(float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellateSphereBuffer(float radius, int subdivisions)
public GeometryBuilder.IndexedTriangleBuffer tessellateWedgeBuffer(float radius, int subdivisions, Angle angle)
public GeometryBuilder.IndexedTriangleBuffer tessellateWedgeBuffer(int face, float radius, int subdivisions, Angle angle)