cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumGeometry Namespace Reference

Basic geometry classes for Cesium. More...

Classes

class  AvailabilityAccessor
 Accessor for use with AvailabilityView in order to safely obtain the contents of the view. More...
 
struct  AvailabilityNode
 Availability nodes wrap AvailabilitySubtree objects and link them together to form a downwardly traversable availability tree. More...
 
struct  AvailabilitySubtree
 The subtree data for an AvailabilityNode, containing information on tile, content, and subtree availability. More...
 
struct  AvailabilityTree
 A downwardly-traversable tree of AvailabilityNode objects. More...
 
struct  AxisAlignedBox
 An Axis-Aligned Bounding Box (AABB), where the axes of the box are aligned with the axes of the coordinate system. More...
 
class  BoundingSphere
 A bounding sphere with a center and a radius. More...
 
struct  ConstantAvailability
 An availability value that is a constant boolean value. More...
 
struct  InterpolatedVertex
 A structure describing a vertex that results from interpolating two other vertices. More...
 
class  IntersectionTests
 Functions for computing the intersection between geometries such as rays, planes, triangles, and ellipsoids. More...
 
class  OctreeAvailability
 An availability tree for an octree, where availability can be stored and computed based on OctreeTileID. More...
 
struct  OctreeTileID
 A structure serving as a unique identifier for a node in an octree. More...
 
class  OctreeTilingScheme
 Defines how an AxisAlignedBox is divided into octree tiles. More...
 
class  OrientedBoundingBox
 A bounding volume defined as a closed and convex cuboid with any orientation. More...
 
class  Plane
 A plane in Hessian Normal Format. More...
 
class  QuadtreeAvailability
 An availability tree for a quadtree, where availability can be stored and computed based on QuadtreeTileID. More...
 
class  QuadtreeRectangleAvailability
 Manages information about the availability of tiles in a quadtree. More...
 
struct  QuadtreeTileID
 Uniquely identifies a node in a quadtree. More...
 
struct  QuadtreeTileRectangularRange
 A rectangular range of tiles at a particular level of a quadtree. More...
 
class  QuadtreeTilingScheme
 Defines how a rectangular region is divided into quadtree tiles. More...
 
class  Ray
 A ray that extends infinitely from the provided origin in the provided direction. More...
 
struct  Rectangle
 A 2D rectangle. More...
 
struct  SubtreeBufferView
 An availability value that needs to be obtained using an offset into a buffer. More...
 
struct  Transforms
 Coordinate system matrix constructions helpers. More...
 
struct  UpsampledQuadtreeNode
 A node of a tile hierarchy that was created by upsampling the tile content of a parent node. More...
 

Typedefs

typedef std::variant< ConstantAvailability, SubtreeBufferViewAvailabilityView
 A view into availability information for part of the availability tree. This could be either a constant boolean value or a descriptor pointing to a buffer in an AvailabilitySubtree where the information will be looked up.
 
using TriangleClipVertex = std::variant<int, InterpolatedVertex>
 A vertex resulting from clipping a triangle against a threshold.
 

Enumerations

enum class  Axis { X , Y , Z }
 An enum describing the x, y, and z axes. More...
 
enum class  CullingResult { Outside = -1 , Intersecting = 0 , Inside = 1 }
 The result of culling an object. More...
 
enum  TileAvailabilityFlags {
  TILE_AVAILABLE = 1U , CONTENT_AVAILABLE = 2U , SUBTREE_AVAILABLE = 4U , SUBTREE_LOADED = 8U ,
  REACHABLE = 16U
}
 A bitmask representing the availability state of a tile. More...
 

Functions

void clipTriangleAtAxisAlignedThreshold (double threshold, bool keepAbove, int i0, int i1, int i2, double u0, double u1, double u2, std::vector< TriangleClipVertex > &result) noexcept
 Splits a 2D triangle at given axis-aligned threshold value and returns the resulting polygon on a given side of the threshold.
 

Detailed Description

Basic geometry classes for Cesium.

--- comment: This file was generated by dep-graph-gen. DO NOT EDIT THIS FILE! title: CesiumGeometry Dependency Graph --- graph TD classDef dependencyNode fill:#fff,stroke:#ccc,color:#666,font-weight:bold,font-size:28px classDef libraryNode fill:#9f9,font-weight:bold,font-size:28px CesiumGeometry[CesiumGeometry] --> CesiumUtility[CesiumUtility] class CesiumUtility,CesiumGeometry libraryNode

Typedef Documentation

◆ AvailabilityView

A view into availability information for part of the availability tree. This could be either a constant boolean value or a descriptor pointing to a buffer in an AvailabilitySubtree where the information will be looked up.

Instead of using this type directly, AvailabilityAccessor can be used to work with it safely.

Definition at line 59 of file Availability.h.

◆ TriangleClipVertex

A vertex resulting from clipping a triangle against a threshold.

It may either be a simple index referring to an existing vertex, or an interpolation between two vertices.

Definition at line 59 of file clipTriangleAtAxisAlignedThreshold.h.

Enumeration Type Documentation

◆ Axis

enum class CesiumGeometry::Axis
strong

An enum describing the x, y, and z axes.

Enumerator

The x-axis.

The y-axis.

The z-axis.

Definition at line 10 of file Axis.h.

◆ CullingResult

enum class CesiumGeometry::CullingResult
strong

The result of culling an object.

Enumerator
Outside 

Indicates that an object lies completely outside the culling volume.

Intersecting 

Indicates that an object intersects with the boundary of the culling volume.

This means that the object is partially inside and partially outside the culling volume.

Inside 

Indicates that an object lies completely inside the culling volume.

Definition at line 10 of file CullingResult.h.

◆ TileAvailabilityFlags

A bitmask representing the availability state of a tile.

Enumerator
TILE_AVAILABLE 

The tile is known to be available.

CONTENT_AVAILABLE 

The tile's content is known to be available.

SUBTREE_AVAILABLE 

This tile has a subtree that is known to be available.

SUBTREE_LOADED 

This tile has a subtree that is loaded.

REACHABLE 

The tile is reachable through the tileset availability tree.

If a tile is not reachable, the above flags being false may simply indicate that a subtree needed to reach this tile has not yet been loaded.

Definition at line 12 of file TileAvailabilityFlags.h.

Function Documentation

◆ clipTriangleAtAxisAlignedThreshold()

void CesiumGeometry::clipTriangleAtAxisAlignedThreshold ( double threshold,
bool keepAbove,
int i0,
int i1,
int i2,
double u0,
double u1,
double u2,
std::vector< TriangleClipVertex > & result )
noexcept

Splits a 2D triangle at given axis-aligned threshold value and returns the resulting polygon on a given side of the threshold.

The resulting polygon may have 0, 1, 2, 3, or 4 vertices.

Parameters
thresholdThe threshold coordinate value at which to clip the triangle.
keepAbovetrue to keep the portion of the triangle above the threshold, or false to keep the portion below.
i0The index of the first vertex in the triangle in counter-clockwise order, used only to construct the TriangleClipVertex result.
i1The index of the second vertex in the triangle in counter-clockwise order, used only to construct the TriangleClipVertex result.
i2The index of the third vertex in the triangle in counter-clockwise order, used only to construct the TriangleClipVertex result.
u0The coordinate of the first vertex in the triangle, in counter-clockwise order.
u1The coordinate of the second vertex in the triangle, in counter-clockwise order.
u2The coordinate of the third vertex in the triangle, in counter-clockwise order.
resultOn return, contains the polygon that results after the clip, specified as a list of vertices. If this vector already contains elements, the result is pushed onto the end of the vector.
TODO port this CesiumJS example to cesium-native
var result = Cesium.Intersections2D.clipTriangleAtAxisAlignedThreshold(0.5,
false, 0.2, 0.6, 0.4);
// result === [2, 0, -1, 1, 0, 0.25, -1, 1, 2, 0.5]