Class GeometryBuilder
- java.lang.Object
-
- gov.nasa.worldwind.util.GeometryBuilder
-
public class GeometryBuilder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeometryBuilder.IndexedTriangleArraystatic classGeometryBuilder.IndexedTriangleBuffer
-
Field Summary
Fields Modifier and Type Field Description static intBOTTOMstatic intCLOCKWISEstatic intCOUNTER_CLOCKWISEstatic intINSIDEprotected static intLEADER_LOCATION_BOTTOMBit code indicating that the leader's location is below the rectangle.protected static intLEADER_LOCATION_INSIDEBit code indicating that the leader's location is inside the rectangle.protected static intLEADER_LOCATION_LEFTBit code indicating that the leader's location is to the left of the rectangle.protected static intLEADER_LOCATION_RIGHTBit code indicating that the leader's location is to the right of the rectangle.protected static intLEADER_LOCATION_TOPBit code indicating that the leader's location is above the rectangle.static intLEFTstatic intOUTSIDEstatic intRIGHTstatic intTOP
-
Constructor Summary
Constructors Constructor Description GeometryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRectangleRoundedCorner(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 specifiedbuffer.protected intcomputeLeaderLocationCode(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.floatcomputePolygonArea2(int pos, int count, Vec4[] points)intcomputePolygonWindingOrder2(int pos, int count, Vec4[] points)voidfixSphereSeam(GeometryBuilder.IndexedTriangleBuffer itb, float wrapThreshold)intgetBilinearSurfaceFillDrawMode()intgetBilinearSurfaceFillIndexCount(int uStacks, int vStacks)intgetBilinearSurfaceOutlineDrawMode()intgetBilinearSurfaceOutlineIndexCount(int uStacks, int vStacks, int mask)intgetBilinearSurfaceVertexCount(int uStacks, int vStacks)intgetCylinderDrawMode()intgetCylinderIndexCount(int slices, int stacks)intgetCylinderOutlineDrawMode()intgetCylinderOutlineIndexCount(int slices, int stacks)intgetCylinderVertexCount(int slices, int stacks)intgetDiskDrawMode()intgetDiskIndexCount(int slices, int loops)intgetDiskVertexCount(int slices, int loops)intgetIndexedTriangleArrayDrawMode()intgetIndexedTriangleBufferDrawMode()intgetLongCylinderDrawMode()intgetLongCylinderIndexCount(int arcSlices, int lengthSlices, int stacks)intgetLongCylinderOutlineDrawMode()intgetLongCylinderOutlineIndexCount(int arcSlices, int lengthSlices, int stacks)intgetLongCylinderVertexCount(int arcSlices, int lengthSlices, int stacks)intgetLongDiskDrawMode()intgetLongDiskIndexCount(int arcSlices, int lengthSlices, int loops)intgetLongDiskVertexCount(int arcSlices, int lengthSlices, int loops)intgetOrientation()intgetPartialCylinderDrawMode()intgetPartialCylinderIndexCount(int slices, int stacks)intgetPartialCylinderOutlineDrawMode()intgetPartialCylinderOutlineIndexCount(int slices, int stacks)intgetPartialCylinderVertexCount(int slices, int stacks)intgetPartialDiskDrawMode()intgetPartialDiskIndexCount(int slices, int loops)intgetPartialDiskVertexCount(int slices, int loops)intgetRadialWallDrawMode()intgetRadialWallIndexCount(int pillars, int stacks)intgetRadialWallOutlineDrawMode()intgetRadialWallOutlineIndexCount(int pillars, int stacks)intgetRadialWallVertexCount(int pillars, int stacks)intgetSubdivisionPointsVertexCount(int subdivisions)voidmakeBilinearSurfaceFillIndices(int vertexPos, int uStacks, int vStacks, int destPos, int[] dest)voidmakeBilinearSurfaceOutlineIndices(int vertexPos, int uStacks, int vStacks, int mask, int destPos, int[] dest)voidmakeBilinearSurfaceVertexNormals(int srcPos, int uStacks, int vStacks, float[] srcVerts, int destPos, float[] dest)voidmakeBilinearSurfaceVertices(float[] control, int destPos, int uStacks, int vStacks, float[] dest)voidmakeCylinderIndices(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)voidmakeCylinderNormals(int slices, int stacks, float[] dest)voidmakeCylinderNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)voidmakeCylinderNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)voidmakeCylinderOutlineIndices(int slices, int stacks, int[] dest)voidmakeCylinderVertices(float radius, float height, int slices, int stacks, float[] dest)voidmakeCylinderVertices(Terrain terrain, LatLon center, double radius, double[] altitudes, boolean[] terrainConformant, int slices, int stacks, Vec4 refPoint, float[] dest)voidmakeCylinderVertices(Terrain terrain, LatLon center, double minorRadius, double majorRadius, Angle heading, double[] altitudes, boolean[] terrainConformant, int slices, int stacks, Vec4 refPoint, float[] dest)voidmakeDiskIndices(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)voidmakeDiskNormals(int slices, int loops, float[] dest)voidmakeDiskVertexNormals(double innerMinorRadius, double outerMinorRadius, int slices, int loops, float[] srcVerts, float[] dest)voidmakeDiskVertices(float innerRadius, float outerRadius, int slices, int loops, float[] dest)voidmakeDiskVertices(Terrain terrain, LatLon center, double[] radii, Angle heading, double altitude, boolean terrainConformant, int slices, int loops, Vec4 refPoint, float[] dest)voidmakeDiskVertices(Terrain terrain, LatLon center, double innerRadius, double outerRadius, double altitude, boolean terrainConformant, int slices, int loops, Vec4 refPoint, float[] dest)java.nio.FloatBuffermakeEllipse(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.FloatBuffermakeEllipseWithLeader(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.voidmakeEllipsoidNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)voidmakeEllipsoidNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)voidmakeEllipticalCylinderNormals(int slices, int stacks, double minorRadius, double majorRadius, Angle heading, float[] dest)voidmakeIndexedTriangleArrayNormals(int indexPos, int indexCount, int[] indices, int vertexPos, int vertexCount, float[] vertices, float[] dest)voidmakeIndexedTriangleArrayNormals(GeometryBuilder.IndexedTriangleArray ita, float[] dest)voidmakeIndexedTriangleBufferNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)voidmakeIndexedTriangleBufferNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)voidmakeIndexedTriangleStripNormals(int indexPos, int indexCount, int[] indices, int vertexPos, int vertexCount, float[] vertices, float[] dest)voidmakeLongCylinderIndices(int arcSlices, int lengthSlices, int stacks, int[] dest)LatLon[]makeLongCylinderLocations(Globe globe, LatLon center1, LatLon center2, double radius, int arcSlices, int lengthSlices)voidmakeLongCylinderNormals(int arcSlices, int lengthSlices, int stacks, float[] dest)voidmakeLongCylinderOutlineIndices(int arcSlices, int lengthSlices, int stacks, int[] dest)voidmakeLongCylinderVertices(float radius, float length, float height, int arcSlices, int lengthSlices, int stacks, float[] dest)voidmakeLongCylinderVertices(Terrain terrain, LatLon center1, LatLon center2, double radius, double[] altitudes, boolean[] terrainConformant, int arcSlices, int lengthSlices, int stacks, Vec4 refPoint, float[] dest)voidmakeLongDiskIndices(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)voidmakeLongDiskNormals(int arcSlices, int lengthSlices, int loops, float[] dest)voidmakeLongDiskVertexNormals(float innerRadius, float outerRadius, float length, int arcSlices, int lengthSlices, int loops, float[] srcVerts, float[] dest)voidmakeLongDiskVertices(float innerRadius, float outerRadius, float length, int arcSlices, int lengthSlices, int loops, float[] dest)voidmakeLongDiskVertices(Terrain terrain, LatLon center1, LatLon center2, double innerRadius, double outerRadius, double altitude, boolean terrainConformant, int arcSlices, int lengthSlices, int loops, Vec4 refPoint, float[] dest)voidmakePartialCylinderIndices(int slices, int stacks, int[] dest)LatLon[]makePartialCylinderLocations(Globe globe, LatLon center, double radius, int slices, double start, double sweep)voidmakePartialCylinderNormals(float radius, float height, int slices, int stacks, float start, float sweep, float[] dest)voidmakePartialCylinderOutlineIndices(int slices, int stacks, int[] dest)voidmakePartialCylinderVertices(float radius, float height, int slices, int stacks, float start, float sweep, float[] dest)voidmakePartialCylinderVertices(Terrain terrain, LatLon center, double radius, double[] altitudes, boolean[] terrainConformant, int slices, int stacks, double start, double sweep, Vec4 refPoint, float[] dest)voidmakePartialDiskIndices(int slices, int loops, int[] dest)LatLon[]makePartialDiskLocations(Globe globe, LatLon center, double innerRadius, double outerRadius, int slices, int loops, double start, double sweep)voidmakePartialDiskNormals(int slices, int loops, float[] dest)voidmakePartialDiskVertexNormals(float innerRadius, float outerRadius, int slices, int loops, float start, float sweep, float[] srcVerts, float[] dest)voidmakePartialDiskVertices(float innerRadius, float outerRadius, int slices, int loops, float start, float sweep, float[] dest)voidmakePartialDiskVertices(Terrain terrain, LatLon center, double innerRadius, double outerRadius, double altitude, boolean terrainConformant, int slices, int loops, double start, double sweep, Vec4 refPoint, float[] dest)voidmakeRadialWallIndices(int pillars, int stacks, int[] dest)voidmakeRadialWallNormals(float innerRadius, float outerRadius, float height, float angle, int pillars, int stacks, float[] dest)voidmakeRadialWallOutlineIndices(int pillars, int stacks, int[] dest)voidmakeRadialWallVertices(float innerRadius, float outerRadius, float height, float angle, int pillars, int stacks, float[] dest)voidmakeRadialWallVertices(Terrain terrain, LatLon center, double innerRadius, double outerRadius, double angle, double[] altitudes, boolean[] terrainConformant, int pillars, int stacks, Vec4 refPoint, float[] dest)java.nio.FloatBuffermakeRectangle(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.FloatBuffermakeRectangle(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.FloatBuffermakeRectangleWithLeader(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.FloatBuffermakeRectangleWithLeader(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.voidmakeSubdivisionPoints(float x1, float y1, float z1, float x2, float y2, float z2, int subdivisions, float[] dest)voidmakeUnitBoxTextureCoordinates(int index, java.nio.FloatBuffer texCoords, int vertexCount)voidmakeUnitBoxTextureCoordinates(java.nio.FloatBuffer texCoords, int vertexCount)voidmakeUnitConeTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions)voidmakeUnitConeTextureCoordinates(java.nio.FloatBuffer texCoords, int subdivisions)voidmakeUnitCylinderTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions)voidmakeUnitPyramidTextureCoordinates(int index, java.nio.FloatBuffer texCoords, int vertexCount)voidmakeUnitPyramidTextureCoordinates(java.nio.FloatBuffer texCoords, int vertexCount)voidmakeUnitSphereTextureCoordinates(int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer texCoords, int seamVerticesIndex)voidmakeUnitSphereTextureCoordinates(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer texCoords)voidmakeUnitSphereTextureCoordinates(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer texCoords, int seamVerticesIndex)voidmakeUnitWedgeTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions, Angle angle)voidmakeWedgeTextureCoordinates(java.nio.FloatBuffer texCoords, int subdivisions, Angle angle)<T> voidreversePoints(int pos, int count, T[] points)voidsetOrientation(int orientation)voidsubdivideIndexedTriangleArray(GeometryBuilder.IndexedTriangleArray ita)voidsubdivideIndexedTriangleBuffer(GeometryBuilder.IndexedTriangleBuffer itb)GeometryBuilder.IndexedTriangleArraysubdivideIndexedTriangles(int indexCount, int[] indices, int vertexCount, float[] vertices)GeometryBuilder.IndexedTriangleBuffertessellateBoxBuffer(float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellateBoxBuffer(int face, float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellateConeBuffer(float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellateConeBuffer(int face, float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellateCylinderBuffer(float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellateCylinderBuffer(int face, float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellateEllipsoidBuffer(float a, float b, float c, int subdivisions)GeometryBuilder.IndexedTriangleArraytessellatePolygon(int pos, int count, float[] vertices, Vec4 normal)GeometryBuilder.IndexedTriangleArraytessellatePolygon2(int pos, int count, float[] vertices)GeometryBuilder.IndexedTriangleBuffertessellatePyramidBuffer(float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellatePyramidBuffer(int face, float radius, int subdivisions)GeometryBuilder.IndexedTriangleArraytessellateSphere(float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellateSphereBuffer(float radius, int subdivisions)GeometryBuilder.IndexedTriangleBuffertessellateWedgeBuffer(float radius, int subdivisions, Angle angle)GeometryBuilder.IndexedTriangleBuffertessellateWedgeBuffer(int face, float radius, int subdivisions, Angle angle)
-
-
-
Field Detail
-
OUTSIDE
public static final int OUTSIDE
- See Also:
- Constant Field Values
-
INSIDE
public static final int INSIDE
- See Also:
- Constant Field Values
-
COUNTER_CLOCKWISE
public static final int COUNTER_CLOCKWISE
- See Also:
- Constant Field Values
-
CLOCKWISE
public static final int CLOCKWISE
- See Also:
- Constant Field Values
-
TOP
public static final int TOP
- See Also:
- Constant Field Values
-
BOTTOM
public static final int BOTTOM
- See Also:
- Constant Field Values
-
LEFT
public static final int LEFT
- See Also:
- Constant Field Values
-
RIGHT
public static final int RIGHT
- See Also:
- Constant Field Values
-
LEADER_LOCATION_INSIDE
protected static final int LEADER_LOCATION_INSIDE
Bit code indicating that the leader's location is inside the rectangle. Used by.computeLeaderLocationCode(float, float, float, float, float, float)- See Also:
- Constant Field Values
-
LEADER_LOCATION_TOP
protected static final int LEADER_LOCATION_TOP
Bit code indicating that the leader's location is above the rectangle. Used by.computeLeaderLocationCode(float, float, float, float, float, float)- See Also:
- Constant Field Values
-
LEADER_LOCATION_BOTTOM
protected static final int LEADER_LOCATION_BOTTOM
Bit code indicating that the leader's location is below the rectangle. Used by.computeLeaderLocationCode(float, float, float, float, float, float)- See Also:
- Constant Field Values
-
LEADER_LOCATION_RIGHT
protected static final int LEADER_LOCATION_RIGHT
Bit code indicating that the leader's location is to the right of the rectangle. Used by.computeLeaderLocationCode(float, float, float, float, float, float)- See Also:
- Constant Field Values
-
LEADER_LOCATION_LEFT
protected static final int LEADER_LOCATION_LEFT
Bit code indicating that the leader's location is to the left of the rectangle. Used by.computeLeaderLocationCode(float, float, float, float, float, float)- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrientation
public int getOrientation()
-
setOrientation
public void setOrientation(int orientation)
-
tessellateSphere
public GeometryBuilder.IndexedTriangleArray tessellateSphere(float radius, int subdivisions)
-
tessellateSphereBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateSphereBuffer(float radius, int subdivisions)
-
tessellateEllipsoidBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateEllipsoidBuffer(float a, float b, float c, int subdivisions)
-
tessellateBoxBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateBoxBuffer(float radius, int subdivisions)
-
tessellateBoxBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateBoxBuffer(int face, float radius, int subdivisions)
-
tessellatePyramidBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellatePyramidBuffer(float radius, int subdivisions)
-
tessellatePyramidBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellatePyramidBuffer(int face, float radius, int subdivisions)
-
tessellateCylinderBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateCylinderBuffer(float radius, int subdivisions)
-
tessellateCylinderBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateCylinderBuffer(int face, float radius, int subdivisions)
-
tessellateWedgeBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateWedgeBuffer(float radius, int subdivisions, Angle angle)
-
tessellateWedgeBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateWedgeBuffer(int face, float radius, int subdivisions, Angle angle)
-
tessellateConeBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateConeBuffer(float radius, int subdivisions)
-
tessellateConeBuffer
public GeometryBuilder.IndexedTriangleBuffer tessellateConeBuffer(int face, float radius, int subdivisions)
-
getCylinderVertexCount
public int getCylinderVertexCount(int slices, int stacks)
-
getCylinderIndexCount
public int getCylinderIndexCount(int slices, int stacks)
-
getCylinderOutlineIndexCount
public int getCylinderOutlineIndexCount(int slices, int stacks)
-
getCylinderDrawMode
public int getCylinderDrawMode()
-
getCylinderOutlineDrawMode
public int getCylinderOutlineDrawMode()
-
makeCylinderLocations
public LatLon[] makeCylinderLocations(Globe globe, LatLon center, double radius, int slices)
-
makeCylinderLocations
public LatLon[] makeCylinderLocations(Globe globe, LatLon center, double minorRadius, double majorRadius, Angle heading, int slices)
-
makeCylinderVertices
public void makeCylinderVertices(Terrain terrain, LatLon center, double radius, double[] altitudes, boolean[] terrainConformant, int slices, int stacks, Vec4 refPoint, float[] dest)
-
makeCylinderVertices
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)
-
makeCylinderVertices
public void makeCylinderVertices(float radius, float height, int slices, int stacks, float[] dest)
-
makeCylinderNormals
public void makeCylinderNormals(int slices, int stacks, float[] dest)
-
makeEllipticalCylinderNormals
public void makeEllipticalCylinderNormals(int slices, int stacks, double minorRadius, double majorRadius, Angle heading, float[] dest)
-
makeCylinderIndices
public void makeCylinderIndices(int slices, int stacks, int[] dest)
-
makeCylinderOutlineIndices
public void makeCylinderOutlineIndices(int slices, int stacks, int[] dest)
-
getPartialCylinderVertexCount
public int getPartialCylinderVertexCount(int slices, int stacks)
-
getPartialCylinderIndexCount
public int getPartialCylinderIndexCount(int slices, int stacks)
-
getPartialCylinderOutlineIndexCount
public int getPartialCylinderOutlineIndexCount(int slices, int stacks)
-
getPartialCylinderDrawMode
public int getPartialCylinderDrawMode()
-
getPartialCylinderOutlineDrawMode
public int getPartialCylinderOutlineDrawMode()
-
makePartialCylinderLocations
public LatLon[] makePartialCylinderLocations(Globe globe, LatLon center, double radius, int slices, double start, double sweep)
-
makePartialCylinderVertices
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)
-
makePartialCylinderVertices
public void makePartialCylinderVertices(float radius, float height, int slices, int stacks, float start, float sweep, float[] dest)
-
makePartialCylinderNormals
public void makePartialCylinderNormals(float radius, float height, int slices, int stacks, float start, float sweep, float[] dest)
-
makePartialCylinderIndices
public void makePartialCylinderIndices(int slices, int stacks, int[] dest)
-
makePartialCylinderOutlineIndices
public void makePartialCylinderOutlineIndices(int slices, int stacks, int[] dest)
-
getDiskVertexCount
public int getDiskVertexCount(int slices, int loops)
-
getDiskIndexCount
public int getDiskIndexCount(int slices, int loops)
-
getDiskDrawMode
public int getDiskDrawMode()
-
makeDiskLocations
public LatLon[] makeDiskLocations(Globe globe, LatLon center, double innerRadius, double outerRadius, int slices, int loops)
-
makeDiskLocations
public LatLon[] makeDiskLocations(Globe globe, LatLon center, double[] radii, Angle heading, int slices, int loops)
-
makeDiskVertices
public void makeDiskVertices(Terrain terrain, LatLon center, double innerRadius, double outerRadius, double altitude, boolean terrainConformant, int slices, int loops, Vec4 refPoint, float[] dest)
-
makeDiskVertices
public void makeDiskVertices(Terrain terrain, LatLon center, double[] radii, Angle heading, double altitude, boolean terrainConformant, int slices, int loops, Vec4 refPoint, float[] dest)
-
makeDiskVertices
public void makeDiskVertices(float innerRadius, float outerRadius, int slices, int loops, float[] dest)
-
makeDiskNormals
public void makeDiskNormals(int slices, int loops, float[] dest)
-
makeDiskVertexNormals
public void makeDiskVertexNormals(double innerMinorRadius, double outerMinorRadius, int slices, int loops, float[] srcVerts, float[] dest)
-
makeDiskIndices
public void makeDiskIndices(int slices, int loops, int[] dest)
-
getPartialDiskVertexCount
public int getPartialDiskVertexCount(int slices, int loops)
-
getPartialDiskIndexCount
public int getPartialDiskIndexCount(int slices, int loops)
-
getPartialDiskDrawMode
public int getPartialDiskDrawMode()
-
makePartialDiskLocations
public LatLon[] makePartialDiskLocations(Globe globe, LatLon center, double innerRadius, double outerRadius, int slices, int loops, double start, double sweep)
-
makePartialDiskVertices
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)
-
makePartialDiskVertices
public void makePartialDiskVertices(float innerRadius, float outerRadius, int slices, int loops, float start, float sweep, float[] dest)
-
makePartialDiskNormals
public void makePartialDiskNormals(int slices, int loops, float[] dest)
-
makePartialDiskVertexNormals
public void makePartialDiskVertexNormals(float innerRadius, float outerRadius, int slices, int loops, float start, float sweep, float[] srcVerts, float[] dest)
-
makePartialDiskIndices
public void makePartialDiskIndices(int slices, int loops, int[] dest)
-
getRadialWallVertexCount
public int getRadialWallVertexCount(int pillars, int stacks)
-
getRadialWallIndexCount
public int getRadialWallIndexCount(int pillars, int stacks)
-
getRadialWallOutlineIndexCount
public int getRadialWallOutlineIndexCount(int pillars, int stacks)
-
getRadialWallDrawMode
public int getRadialWallDrawMode()
-
getRadialWallOutlineDrawMode
public int getRadialWallOutlineDrawMode()
-
makeRadialWallVertices
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)
-
makeRadialWallVertices
public void makeRadialWallVertices(float innerRadius, float outerRadius, float height, float angle, int pillars, int stacks, float[] dest)
-
makeRadialWallNormals
public void makeRadialWallNormals(float innerRadius, float outerRadius, float height, float angle, int pillars, int stacks, float[] dest)
-
makeRadialWallIndices
public void makeRadialWallIndices(int pillars, int stacks, int[] dest)
-
makeRadialWallOutlineIndices
public void makeRadialWallOutlineIndices(int pillars, int stacks, int[] dest)
-
getLongCylinderVertexCount
public int getLongCylinderVertexCount(int arcSlices, int lengthSlices, int stacks)
-
getLongCylinderIndexCount
public int getLongCylinderIndexCount(int arcSlices, int lengthSlices, int stacks)
-
getLongCylinderOutlineIndexCount
public int getLongCylinderOutlineIndexCount(int arcSlices, int lengthSlices, int stacks)
-
getLongCylinderDrawMode
public int getLongCylinderDrawMode()
-
getLongCylinderOutlineDrawMode
public int getLongCylinderOutlineDrawMode()
-
makeLongCylinderLocations
public LatLon[] makeLongCylinderLocations(Globe globe, LatLon center1, LatLon center2, double radius, int arcSlices, int lengthSlices)
-
makeLongCylinderVertices
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)
-
makeLongCylinderVertices
public void makeLongCylinderVertices(float radius, float length, float height, int arcSlices, int lengthSlices, int stacks, float[] dest)
-
makeLongCylinderNormals
public void makeLongCylinderNormals(int arcSlices, int lengthSlices, int stacks, float[] dest)
-
makeLongCylinderIndices
public void makeLongCylinderIndices(int arcSlices, int lengthSlices, int stacks, int[] dest)
-
makeLongCylinderOutlineIndices
public void makeLongCylinderOutlineIndices(int arcSlices, int lengthSlices, int stacks, int[] dest)
-
getLongDiskVertexCount
public int getLongDiskVertexCount(int arcSlices, int lengthSlices, int loops)
-
getLongDiskIndexCount
public int getLongDiskIndexCount(int arcSlices, int lengthSlices, int loops)
-
getLongDiskDrawMode
public int getLongDiskDrawMode()
-
makeLongDiskLocations
public LatLon[] makeLongDiskLocations(Globe globe, LatLon center1, LatLon center2, double innerRadius, double outerRadius, int arcSlices, int lengthSlices, int loops)
-
makeLongDiskVertices
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)
-
makeLongDiskVertices
public void makeLongDiskVertices(float innerRadius, float outerRadius, float length, int arcSlices, int lengthSlices, int loops, float[] dest)
-
makeLongDiskNormals
public void makeLongDiskNormals(int arcSlices, int lengthSlices, int loops, float[] dest)
-
makeLongDiskVertexNormals
public void makeLongDiskVertexNormals(float innerRadius, float outerRadius, float length, int arcSlices, int lengthSlices, int loops, float[] srcVerts, float[] dest)
-
makeLongDiskIndices
public void makeLongDiskIndices(int arcSlices, int lengthSlices, int loops, int[] dest)
-
computePolygonWindingOrder2
public int computePolygonWindingOrder2(int pos, int count, Vec4[] points)
-
computePolygonArea2
public float computePolygonArea2(int pos, int count, Vec4[] points)
-
tessellatePolygon
public GeometryBuilder.IndexedTriangleArray tessellatePolygon(int pos, int count, float[] vertices, Vec4 normal)
-
tessellatePolygon2
public GeometryBuilder.IndexedTriangleArray tessellatePolygon2(int pos, int count, float[] vertices)
-
getIndexedTriangleBufferDrawMode
public int getIndexedTriangleBufferDrawMode()
-
subdivideIndexedTriangleBuffer
public void subdivideIndexedTriangleBuffer(GeometryBuilder.IndexedTriangleBuffer itb)
-
makeIndexedTriangleBufferNormals
public void makeIndexedTriangleBufferNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)
-
makeIndexedTriangleBufferNormals
public void makeIndexedTriangleBufferNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)
-
makeEllipsoidNormals
public void makeEllipsoidNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)
-
makeEllipsoidNormals
public void makeEllipsoidNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)
-
makeCylinderNormals
public void makeCylinderNormals(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer dest)
-
makeCylinderNormals
public void makeCylinderNormals(int indexPos, int indexCount, java.nio.IntBuffer indices, int vertexPos, int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer dest)
-
fixSphereSeam
public void fixSphereSeam(GeometryBuilder.IndexedTriangleBuffer itb, float wrapThreshold)
-
makeUnitSphereTextureCoordinates
public void makeUnitSphereTextureCoordinates(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer texCoords)
-
makeUnitSphereTextureCoordinates
public void makeUnitSphereTextureCoordinates(GeometryBuilder.IndexedTriangleBuffer itb, java.nio.FloatBuffer texCoords, int seamVerticesIndex)
-
makeUnitSphereTextureCoordinates
public void makeUnitSphereTextureCoordinates(int vertexCount, java.nio.FloatBuffer vertices, java.nio.FloatBuffer texCoords, int seamVerticesIndex)
-
makeUnitBoxTextureCoordinates
public void makeUnitBoxTextureCoordinates(java.nio.FloatBuffer texCoords, int vertexCount)
-
makeUnitBoxTextureCoordinates
public void makeUnitBoxTextureCoordinates(int index, java.nio.FloatBuffer texCoords, int vertexCount)
-
makeUnitPyramidTextureCoordinates
public void makeUnitPyramidTextureCoordinates(java.nio.FloatBuffer texCoords, int vertexCount)
-
makeUnitPyramidTextureCoordinates
public void makeUnitPyramidTextureCoordinates(int index, java.nio.FloatBuffer texCoords, int vertexCount)
-
makeUnitCylinderTextureCoordinates
public void makeUnitCylinderTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions)
-
makeWedgeTextureCoordinates
public void makeWedgeTextureCoordinates(java.nio.FloatBuffer texCoords, int subdivisions, Angle angle)
-
makeUnitWedgeTextureCoordinates
public void makeUnitWedgeTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions, Angle angle)
-
makeUnitConeTextureCoordinates
public void makeUnitConeTextureCoordinates(java.nio.FloatBuffer texCoords, int subdivisions)
-
makeUnitConeTextureCoordinates
public void makeUnitConeTextureCoordinates(int face, java.nio.FloatBuffer texCoords, int subdivisions)
-
getIndexedTriangleArrayDrawMode
public int getIndexedTriangleArrayDrawMode()
-
subdivideIndexedTriangleArray
public void subdivideIndexedTriangleArray(GeometryBuilder.IndexedTriangleArray ita)
-
subdivideIndexedTriangles
public GeometryBuilder.IndexedTriangleArray subdivideIndexedTriangles(int indexCount, int[] indices, int vertexCount, float[] vertices)
-
makeIndexedTriangleArrayNormals
public void makeIndexedTriangleArrayNormals(GeometryBuilder.IndexedTriangleArray ita, float[] dest)
-
makeIndexedTriangleArrayNormals
public void makeIndexedTriangleArrayNormals(int indexPos, int indexCount, int[] indices, int vertexPos, int vertexCount, float[] vertices, float[] dest)
-
makeIndexedTriangleStripNormals
public void makeIndexedTriangleStripNormals(int indexPos, int indexCount, int[] indices, int vertexPos, int vertexCount, float[] vertices, float[] dest)
-
getSubdivisionPointsVertexCount
public int getSubdivisionPointsVertexCount(int subdivisions)
-
makeSubdivisionPoints
public void makeSubdivisionPoints(float x1, float y1, float z1, float x2, float y2, float z2, int subdivisions, float[] dest)
-
getBilinearSurfaceFillIndexCount
public int getBilinearSurfaceFillIndexCount(int uStacks, int vStacks)
-
getBilinearSurfaceOutlineIndexCount
public int getBilinearSurfaceOutlineIndexCount(int uStacks, int vStacks, int mask)
-
getBilinearSurfaceVertexCount
public int getBilinearSurfaceVertexCount(int uStacks, int vStacks)
-
getBilinearSurfaceFillDrawMode
public int getBilinearSurfaceFillDrawMode()
-
getBilinearSurfaceOutlineDrawMode
public int getBilinearSurfaceOutlineDrawMode()
-
makeBilinearSurfaceFillIndices
public void makeBilinearSurfaceFillIndices(int vertexPos, int uStacks, int vStacks, int destPos, int[] dest)
-
makeBilinearSurfaceOutlineIndices
public void makeBilinearSurfaceOutlineIndices(int vertexPos, int uStacks, int vStacks, int mask, int destPos, int[] dest)
-
makeBilinearSurfaceVertices
public void makeBilinearSurfaceVertices(float[] control, int destPos, int uStacks, int vStacks, float[] dest)
-
makeBilinearSurfaceVertexNormals
public void makeBilinearSurfaceVertexNormals(int srcPos, int uStacks, int vStacks, float[] srcVerts, int destPos, float[] dest)
-
makeEllipse
public 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. The ellipse's center is placed at(x, y), it has a width of2 * majorRadius, and a height of2 * minorRadius.If the specified
slicesis 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.
- Parameters:
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.- Returns:
- a buffer containing the ellipse's x and y locations.
- Throws:
java.lang.IllegalArgumentException- if any ofmajorRadius,minorRadius, orslicesare less than zero.
-
makeEllipseWithLeader
public 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. The ellipse's center is placed at(x, y), it has a width of2 * majorRadius, and a height of2 * minorRadius.If the specified
slicesis 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
leaderWidthis 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. 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.makeEllipse(float, float, float, float, int)- Parameters:
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.- Returns:
- a buffer containing the ellipse's x and y locations.
- Throws:
java.lang.IllegalArgumentException- if any ofmajorRadius,minorRadius,slices, orleaderWidthare less than zero.
-
makeRectangle
public 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. The rectangle's lower left corner is placed at(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.
- Parameters:
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.- Returns:
- a buffer containing the rectangle's x and y locations.
- Throws:
java.lang.IllegalArgumentException- if eitherwidthorheightare less than zero.
-
makeRectangle
public 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. The rectangle's lower left corner is placed at the(x, y), and its upper right corner is placed at(x + width, y + height).If the specified
cornerRadiusandcornerSlicesare 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 eithercornerRadiusorcornerSlicesare 0, this returns a rectangle with sharp corners and is equivalent to calling. ThemakeRectangle(float, float, float, float)cornerRadiusis 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.
- Parameters:
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.- Returns:
- a buffer containing the rectangle's x and y locations.
- Throws:
java.lang.IllegalArgumentException- if any ofwidth,height,cornerRadius, orcornerSlicesare less than zero.
-
makeRectangleWithLeader
public 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. The rectangle's lower left corner is placed at(x, y), and its upper right corner is placed at(x + width, y + height).If the specified
leaderWidthis 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. 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.makeRectangle(float, float, float, float)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.
- Parameters:
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.- Returns:
- a buffer containing the rectangle's x and y locations.
- Throws:
java.lang.IllegalArgumentException- if any ofwidth,height, orleaderWidthare less than zero.
-
makeRectangleWithLeader
public 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. The rectangle's lower left corner is placed at the(x, y), and its upper right corner is placed at(x + width, y + height).If the specified
cornerRadiusandcornerSlicesare 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 eithercornerRadiusorcornerSlicesare 0, this returns a rectangle with sharp corners and is equivalent to calling. ThemakeRectangleWithLeader(float, float, float, float, float, float, float)cornerRadiusis 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
leaderWidthis 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. 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.makeRectangle(float, float, float, float, float, int)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.
- Parameters:
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.- Returns:
- a buffer containing the rectangle's x and y locations.
- Throws:
java.lang.IllegalArgumentException- if any ofwidth,height,cornerRadius,cornerSlices, orleaderWidthare less than zero.
-
addRectangleRoundedCorner
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 specifiedbuffer. 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 toslices - 2. This does nothing ifslicesis one or zero.- Parameters:
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.
-
computeLeaderLocationCode
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. The rectangle's lower left corner is located at(x1, y1)and its upper right corner is located at(x2, y2). The returned code includes the bit for any ofLEADER_LOCATION_LEFT,LEADER_LOCATION_RIGHT,LEADER_LOCATION_BOTTOM, andLEADER_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 returnsLEADER_LOCATION_INSIDE.- Parameters:
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.- Returns:
- a four bit code indicating the leader's location relative to the rectangle.
-
reversePoints
public <T> void reversePoints(int pos, int count, T[] points)
-
-