@twinfinity/geometry
Index
Classes
- ArrayBufferReader
- GeometryComputationError
- GeometryRepository
- GeometryTransform
- InvalidInputError
- InvalidOptionsError
- MemoryBlock
- OcclusionBVH
- SlabSectionError
- T8GIEntityMeshLookup
- T8GIMeshDescriptor
- T8GIMeshDescriptorDTO
- T8GIRegion
- T8GIRegionDTO
- T8GIStyle
- T8GIStyleDTO
- T8GITransformDTO
- T8LDFormatError
- T8gdReader
- VertexDataReaderV1
- VertexDataReaderV2
- WasmGeometryProcessor
Enumerations
Functions
- aabbIntersectsPlane
- addEdgeNormal
- addTriangleToSoA
- buildAndSimplifyPolylines
- buildFeatureEdgesFromPositions
- buildKeySet
- buildPlaneBasis
- buildPlaneSectionFillGeometry
- buildPolygonFromEdges
- buildSegmentKeySetFromPolylines
- buildSegmentKeySetFromSegments
- calculatePathLength
- classifyHiddenLinesOcclusion
- classifyTrianglePlane
- cleanupSegments
- clipSegmentToSlab
- computeBoundingBox2D
- computeConvexHull2D
- computeMeshPlaneSegments
- computeSegmentKeys
- createOcclusionRay
- createPrefixedLogger
- createT8GITransform
- createTriangleSoA
- cullHiddenSegments
- decodeBase64Hash
- depthAlong
- disableLogging
- edgeKeyStr
- enableConsoleLogging
- encodePackedNormal
- faceNormal
- filterByPrecomputedKeys
- filterSegmentsByKeySet
- filterSegmentsByMinLength
- findEdgeEdgesIntersections
- findEdgeTriangleIntersections
- formatArea
- formatElevation
- formatLength
- generateBentArrow
- generateRampCenterlineArrow
- generateSimpleRampArrow
- generateStraightArrow
- getLogger
- groupConnectedFlights
- groupPlaneSectionPolylines
- hash52
- intersectTriangleWithPlane
- isValidEdge
- isValidNumber
- isValidPoint
- loadMeshStore
- nthElement
- pad
- planeClassifyPoint
- planeFromPointAndNormal
- planeSignedDistance
- pointInBoundingBox
- pointInPolygon2D
- pointInTriangle2D
- pointInsideEdges2D
- pointInsideTriangles2D
- preDedupSegments
- project3DTo2D
- quantizePointStr
- readT8GIData
- readT8GIModel
- readT8GIModelWithFactories
- readT8LDData
- readTypedArray
- segmentIntersection2D
- segmentsToPolylines
- setLogger
- simplifyPath
- simplifySegments
- splitEdgeByEdges
- splitEdgeByTriangles
- unproject2DTo3D
- validateNonEmptyArray
- validateNumber
- validateRequired
- validateSectionState
- vec2
- vec2Add
- vec2Cross
- vec2Distance
- vec2DistanceSq
- vec2Dot
- vec2Equals
- vec2Length
- vec2LengthSq
- vec2Normalize
- vec2Scale
- vec2Sub
- vec3
- vec3Add
- vec3ClosestPointOnSegment
- vec3Copy
- vec3Cross
- vec3Distance
- vec3DistanceSq
- vec3Dot
- vec3Equals
- vec3IsFinite
- vec3Length
- vec3LengthSq
- vec3Lerp
- vec3Max
- vec3Mid
- vec3Min
- vec3Negate
- vec3Normalize
- vec3ProjectOnLine
- vec3Scale
- vec3ScaleAndAdd
- vec3Sub
- vec3Zero
- vertexHash3
- wrapError
Interfaces
- BuildInfo
- ComplexityDetectionOptions
- CullingOptions
- FeatureEdgeOptions
- GeometryInfoArrays
- GeometryRepositoryOptions
- Logger
- MemoryBlockOptions
- MergeRequest
- MergeResult
- MeshDescriptor
- MeshDescriptorV1
- MeshReference
- MeshStoreLoadResult
- MeshStoreLoaderOptions
- MeshStoreModuleOptions
- OcclusionQualityOptions
- Plane
- PlaneSectionFillGeometry
- PlaneSectionOptions
- PlaneSectionPolygon
- PlaneSectionPolyline
- ProcessBatchDestination
- ProcessBatchIntoResult
- SectionLabel
- SectionPath
- SectionRenderState
- SimplificationOptions
- SlabSectionAlgorithmOptions
- SlabSectionGeometry
- SlabSectionLineOptions
- SlabSectionStairArrowOptions
- StairGroupingOptions
- T8GIData
- T8GIEntityGeometryMap
- T8GIEntityMesh
- T8GIGeometryInfo
- T8GIHeader
- T8GIModelGeneric
- T8GITransform
- T8LDData
- T8LDEntityBounds
- T8LDEntityLineMap
- T8LDHeader
- T8LDLayerData
- T8LDLinetypeData
- T8LDPolylineData
- T8LDReadOptions
- T8LDStyleData
- T8LDVersion
- T8LDVertexData
- TransformData
- TransformInfo
- TwinfinityMeshStore
- TypedArrayConstructorArgs
- Vertex3
- VertexData
- VertexDataReaderV1Descriptor
- ViewWindow
Type Aliases
- ArrowLengthLimits
- BuildType
- CreateMeshStoreModule
- EdgeNormalEntry
- FlatSegment3
- FlightData
- HiddenCullOptions
- HiddenLineOcclusionOptions
- HiddenLineResult
- MeasurementUnitFormat
- MutableArrayLike
- OcclusionOptions
- OcclusionRay
- PackedIndices
- PackedMeshHash
- PackedNormals
- PackedPositions
- PlaneBasis
- PlaneProjection
- PlaneSectionSegment
- Point2D
- Polyline3
- RenderMode
- SamplePoint
- SectionStateValidationResult
- Segment3
- SegmentSimplifyOptions
- T8GIModel
- TaggedSegment
- Triangle2D
- TriangleSoA
- TypedArray
- UintArray
- Vec2
- Vec3
Variables
- ARROW_EXTENT_RATIO
- ARROW_HEAD_LENGTH_RATIO
- ARROW_HEAD_WIDTH_RATIO
- CELL_SIZE_AVG_RATIO
- CELL_SIZE_EPS_MULTIPLIER
- CLIP_EPSILON
- CROSS_PRODUCT_THRESHOLD
- DEFAULT_ALIGNMENT
- DEFAULT_BINARY_STEPS
- DEFAULT_CULL_ANGLE_DOT
- DEFAULT_CULL_EPSILON
- DEFAULT_DEPTH_EPS
- DEFAULT_EPS
- DEFAULT_SAMPLES
- DEFAULT_SLAB_SECTION_OPTIONS
- EQUALITY_EPSILON
- FACE_EPSILON
- FALLBACK_UP_THRESHOLD
- HEIGHT_THRESHOLD_RATIO
- INITIAL_BEST_DOT
- LANDING_EXTENSION
- MAX_ARROW_LENGTH
- MAX_SAMPLES
- MAX_SIMPLIFY_ITERATIONS
- MIN_ARROW_LENGTH
- MIN_CELL_SIZE
- MIN_EDGE_LENGTH
- MIN_EXTENT
- MIN_HEIGHT_RANGE
- MIN_POLYLINE_POINTS
- MIN_RAMP_HEIGHT
- MIN_RAY_T
- MIN_SAMPLES
- MIN_SEGMENT_T
- MIN_STAIR_SAMPLES
- MIN_TRIANGLE_COUNT
- MIN_VERTEX_COUNT
- NORMALIZE_EPSILON
- OCCLUSION_BIAS
- OPPOSITE_DIRECTION_DOT
- PARALLEL_THRESHOLD
- RAMP_CLASSES
- RAMP_HEAD_LENGTH_RATIO
- RAMP_HEAD_WIDTH_RATIO
- RAMP_LONG_EDGE_ITERATIONS
- RAMP_NUM_LAYERS
- RAMP_PARALLEL_DOT
- RAY_PARALLEL_EPSILON
- SEQUENTIAL_THRESHOLD
- SLAB_EPSILON
- STAIRS_CATEGORY
- STAIR_AND_RAMP_CLASSES
- STAIR_FLIGHT_CLASSES
- STAIR_PARENT_CLASSES
- TRIANGLE_DET_EPSILON
- WELD_EPSILON
- ZERO_EPSILON
- buildInfo
- decodePackedNormal
- packedNormalPackSize
Type Aliases
ArrowLengthLimits
Type declaration
optionallandingExtension?: number
optionalmaxLength?: number
optionalminLength?: number
BuildType
CreateMeshStoreModule
Type declaration
Parameters
moduleInfo: MeshStoreModuleOptions
Returns Promise<TwinfinityMeshStore>
EdgeNormalEntry
FlatSegment3
FlightData
Data for a single stair flight
Type declaration
avgHeight: number
bottomCenter: { x: number; y: number; z: number }
x: number
y: number
z: number
product: unknown
samples: SamplePoint[]
topCenter: { x: number; y: number; z: number }
x: number
y: number
z: number
HiddenCullOptions
Type declaration
optionalangleDot?: number
optionalepsilon?: number
HiddenLineOcclusionOptions
Type declaration
optionalbinarySearchSteps?: number
optionaldepthBias?: number
optionaldepthEps?: number
optionalmaxSamples?: number
optionalsampleSpacing?: number
optionalsamplesPerSegment?: number
HiddenLineResult
Type declaration
hidden: TaggedSegment[]
visible: TaggedSegment[]
MeasurementUnitFormat
Unit format for length/area display. "mm" = millimeters, "m" = meters with decimals.
MutableArrayLike
Type parameters
- T
OcclusionOptions
OcclusionRay
PackedIndices
PackedMeshHash
PackedNormals
PackedPositions
PlaneBasis
PlaneProjection
Type declaration
depth: number
x: number
y: number
PlaneSectionSegment
Plane section segment — a line segment from plane-mesh intersection.
Point2D
2D point for path calculations.
Type declaration
x: number
z: number
Polyline3
RenderMode
Render mode for a product — determines which line types are generated.
SamplePoint
2D sample point (projected onto XZ plane).
Type declaration
x: number
y: number
z: number
SectionStateValidationResult
Segment3
A 3D line segment defined by two endpoints.
SegmentSimplifyOptions
Type declaration
optionalcollinearAngleDeg?: number
optionalmaxIterations?: number
optionalminSegmentLength?: number
optionalweldEps?: number
T8GIModel
TaggedSegment
Triangle2D
2D Triangle for occlusion testing (projected to XZ plane).
Type declaration
minY: number
v0: { x: number; z: number }
x: number
z: number
v1: { x: number; z: number }
x: number
z: number
v2: { x: number; z: number }
x: number
z: number
TriangleSoA
Structure-of-Arrays layout for triangles — eliminates V8 per-object overhead.
Type declaration
ax: Float64Array
ay: Float64Array
az: Float64Array
bx: Float64Array
by: Float64Array
bz: Float64Array
count: number
cx: Float64Array
cy: Float64Array
cz: Float64Array
maxX: Float64Array
maxY: Float64Array
maxZ: Float64Array
minX: Float64Array
minY: Float64Array
minZ: Float64Array
normalDotView: Float64Array
productId: Int32Array
TypedArray
UintArray
Vec2
Vec3
Variables
constARROW_EXTENT_RATIO
constARROW_HEAD_LENGTH_RATIO
constARROW_HEAD_WIDTH_RATIO
constCELL_SIZE_AVG_RATIO
constCELL_SIZE_EPS_MULTIPLIER
constCLIP_EPSILON
Geometric clipping and intersection tolerance.
constCROSS_PRODUCT_THRESHOLD
constDEFAULT_ALIGNMENT
constDEFAULT_BINARY_STEPS
constDEFAULT_CULL_ANGLE_DOT
constDEFAULT_CULL_EPSILON
constDEFAULT_DEPTH_EPS
constDEFAULT_EPS
constDEFAULT_SAMPLES
constDEFAULT_SLAB_SECTION_OPTIONS
Default values for slab section algorithm options.
constEQUALITY_EPSILON
Vector/angle equality comparison.
constFACE_EPSILON
Face normal tolerance.
constFALLBACK_UP_THRESHOLD
constHEIGHT_THRESHOLD_RATIO
constINITIAL_BEST_DOT
constLANDING_EXTENSION
constMAX_ARROW_LENGTH
constMAX_SAMPLES
constMAX_SIMPLIFY_ITERATIONS
constMIN_ARROW_LENGTH
constMIN_CELL_SIZE
Minimum cell size for spatial hashing.
constMIN_EDGE_LENGTH
constMIN_EXTENT
constMIN_HEIGHT_RANGE
constMIN_POLYLINE_POINTS
constMIN_RAMP_HEIGHT
constMIN_RAY_T
Minimum ray t for occlusion testing.
constMIN_SAMPLES
constMIN_SEGMENT_T
Minimum parametric t for segment subdivision.
constMIN_STAIR_SAMPLES
constMIN_TRIANGLE_COUNT
constMIN_VERTEX_COUNT
constNORMALIZE_EPSILON
Near-zero guard for normalization and division safety.
constOCCLUSION_BIAS
Occlusion depth bias.
constOPPOSITE_DIRECTION_DOT
constPARALLEL_THRESHOLD
constRAMP_CLASSES
constRAMP_HEAD_LENGTH_RATIO
constRAMP_HEAD_WIDTH_RATIO
constRAMP_LONG_EDGE_ITERATIONS
constRAMP_NUM_LAYERS
constRAMP_PARALLEL_DOT
constRAY_PARALLEL_EPSILON
Ray parallel detection.
constSEQUENTIAL_THRESHOLD
constSLAB_EPSILON
Slab clipping tolerance.
constSTAIRS_CATEGORY
constSTAIR_AND_RAMP_CLASSES
constSTAIR_FLIGHT_CLASSES
constSTAIR_PARENT_CLASSES
constTRIANGLE_DET_EPSILON
Triangle determinant tolerance.
constWELD_EPSILON
Vertex welding tolerance.
constZERO_EPSILON
Numeric zero guard for determinants, ray tests, direction lengths.
A 3D line segment as a flat 6-number tuple
[x1, y1, z1, x2, y2, z2].