@JsType(isNative=true, namespace="Cesium", name="GeometryPipeline") public class GeometryPipeline extends Object
Modifier and Type | Method and Description |
---|---|
static Geometry |
compressVertices(Geometry geometry)
Compresses and packs geometry normal attribute values to save memory.
|
static Geometry |
computeNormal(Geometry geometry)
Computes per-vertex normals for a geometry containing TRIANGLES by averaging the normals of all triangles incident
to the vertex.
|
static Geometry |
computeTangentAndBitangent(Geometry geometry)
Computes per-vertex tangents and bitangents for a geometry containing TRIANGLES.
|
static Object |
createAttributeLocations(Geometry geometry)
Creates an object that maps attribute names to unique locations (indices) for matching vertex attributes and shader programs.
|
static Geometry |
createLineSegmentsForVectors(Geometry geometry)
Creates a new Geometry with LINES representing the provided attribute (attributeName) for the provided geometry.
|
static Geometry |
createLineSegmentsForVectors(Geometry geometry,
String attributeName)
Creates a new Geometry with LINES representing the provided attribute (attributeName) for the provided geometry.
|
static Geometry |
createLineSegmentsForVectors(Geometry geometry,
String attributeName,
double length)
Creates a new Geometry with LINES representing the provided attribute (attributeName) for the provided geometry.
|
static Geometry |
encodeAttribute(Geometry geometry,
String attributeName,
String attributeHighName,
String attributeLowName)
Encodes floating-point geometry attribute values as two separate attributes to improve rendering precision.
|
static Geometry[] |
fitToUnsignedShortIndices(Geometry geometry)
Splits a geometry into multiple geometries, if necessary, to ensure that indices in the indices fit into unsigned shorts.
|
static Geometry |
projectTo2D(String geometry,
String attributeName,
String attributeName3D,
String attributeName2D)
Projects a geometry's 3D position attribute to 2D, replacing the position attribute with separate position3D and
position2D attributes.
|
static Geometry |
projectTo2D(String geometry,
String attributeName,
String attributeName3D,
String attributeName2D,
MapProjection projection)
Projects a geometry's 3D position attribute to 2D, replacing the position attribute with separate position3D and
position2D attributes.
|
static Geometry |
reorderForPostVertexCache(Geometry geometry)
Reorders a geometry's indices to achieve better performance from the GPU's post vertex-shader cache by using the
Tipsify algorithm.
|
static Geometry |
reorderForPostVertexCache(Geometry geometry,
int cacheCapacity)
Reorders a geometry's indices to achieve better performance from the GPU's post vertex-shader cache by using the
Tipsify algorithm.
|
static Geometry |
reorderForPreVertexCache(Geometry geometry)
Reorders a geometry's attributes and indices to achieve better performance from the GPU's pre-vertex-shader cache.
|
static Geometry |
toWireframe(Geometry geometry)
Converts a geometry's triangle indices to line indices.
|
static GeometryInstance |
transformToWorldCoordinates(GeometryInstance instance)
Transforms a geometry instance to world coordinates.
|
@JsMethod public static Geometry compressVertices(Geometry geometry)
geometry
- The geometry to modify.@JsMethod public static Geometry computeTangentAndBitangent(Geometry geometry)
geometry
- The geometry to modify.@JsMethod public static Geometry computeNormal(Geometry geometry)
geometry
- The geometry to modify.@JsMethod public static Object createAttributeLocations(Geometry geometry)
geometry
- The geometry, which is not modified, to create the object for.@JsMethod public static Geometry createLineSegmentsForVectors(Geometry geometry)
geometry
- The Geometry instance with the attribute.@JsMethod public static Geometry createLineSegmentsForVectors(Geometry geometry, String attributeName)
geometry
- The Geometry instance with the attribute.attributeName
- The name of the attribute. Default: 'normal'.@JsMethod public static Geometry createLineSegmentsForVectors(Geometry geometry, String attributeName, double length)
geometry
- The Geometry instance with the attribute.attributeName
- The name of the attribute. Default: 'normal'.length
- The length of each line segment in meters. This can be negative to point the vector in the opposite direction. Default: 10000.0@JsMethod public static Geometry encodeAttribute(Geometry geometry, String attributeName, String attributeHighName, String attributeLowName)
geometry
- The geometry to modify.attributeName
- The name of the attribute.attributeHighName
- The name of the attribute for the encoded high bits.attributeLowName
- The name of the attribute for the encoded low bits.@JsMethod public static Geometry[] fitToUnsignedShortIndices(Geometry geometry)
geometry
- The geometry to be split into multiple geometries.@JsMethod public static Geometry projectTo2D(String geometry, String attributeName, String attributeName3D, String attributeName2D)
geometry
- The geometry to modify.attributeName
- The name of the attribute.attributeName3D
- The name of the attribute in 3D.attributeName2D
- The name of the attribute in 2D.@JsMethod public static Geometry projectTo2D(String geometry, String attributeName, String attributeName3D, String attributeName2D, MapProjection projection)
geometry
- The geometry to modify.attributeName
- The name of the attribute.attributeName3D
- The name of the attribute in 3D.attributeName2D
- The name of the attribute in 2D.projection
- The projection to use.@JsMethod public static Geometry reorderForPostVertexCache(Geometry geometry)
geometry
- The geometry to modify.@JsMethod public static Geometry reorderForPostVertexCache(Geometry geometry, int cacheCapacity)
geometry
- The geometry to modify.cacheCapacity
- The number of vertices that can be held in the GPU's vertex cache. Default: 24.Fast Triangle Reordering for Vertex Locality and Reduced Overdraw by Sander, Nehab, and Barczak
@JsMethod public static Geometry reorderForPreVertexCache(Geometry geometry)
geometry
- The geometry to modify.reorderForPostVertexCache(org.cesiumjs.cs.core.geometry.Geometry)
@JsMethod public static Geometry toWireframe(Geometry geometry)
geometry
- The geometry to modify.@JsMethod public static GeometryInstance transformToWorldCoordinates(GeometryInstance instance)
instance
- The geometry instance to modify.Copyright © 2019. All rights reserved.