Types
Core Types
AsteroidShapeModels.ShapeModel
— TypeShapeModel
A polyhedral shape model of an asteroid.
Fields
nodes
: Vector of node positionsfaces
: Vector of vertex indices of facesface_centers
: Center position of each faceface_normals
: Normal vector of each faceface_areas
: Area of of each faceface_visibility_graph
:FaceVisibilityGraph
for efficient visibility queries
AsteroidShapeModels.Ray
— TypeRay
Structure representing a ray in 3D space.
Fields
origin
: Ray origin pointdirection
: Ray direction vector (normalized)
AsteroidShapeModels.BoundingBox
— TypeBoundingBox
Structure representing a bounding box for shape models.
Fields
min_point
: Minimum point of the bounding box (minimum x, y, z values)max_point
: Maximum point of the bounding box (maximum x, y, z values)
Result Types
AsteroidShapeModels.RayTriangleIntersectionResult
— TypeRayTriangleIntersectionResult
Structure representing the result of ray-triangle intersection test.
Fields
hit
: true if intersection exists, false otherwisedistance
: Distance from ray origin to intersection pointpoint
: Coordinates of the intersection point
AsteroidShapeModels.RayShapeIntersectionResult
— TypeRayShapeIntersectionResult
Structure representing the result of ray-shape intersection test.
Fields
hit
: true if intersection exists, false otherwisedistance
: Distance from ray origin to intersection pointpoint
: Coordinates of the intersection pointface_index
: Index of the intersected face
Visibility Types
AsteroidShapeModels.FaceVisibilityGraph
— TypeFaceVisibilityGraph
Efficient visible face graph structure using CSR (Compressed Sparse Row) format. Provides better memory efficiency and cache locality compared to adjacency list format.
Fields
row_ptr
: Start index of visible face data for each face (length: nfaces + 1)col_idx
: Indices of visible faces (column indices in CSR format)view_factors
: View factors for each visible face pairdistances
: Distances between each visible face pairdirections
: Unit direction vectors between each visible face pairnfaces
: Total number of facesnnz
: Number of non-zero elements (total number of visible face pairs)
Example
If face 1 is visible to faces 2,3 and face 2 is visible to faces 1,3,4:
- row_ptr = [1, 3, 6, 7]
- col_idx = [2, 3, 1, 3, 4, ...]