Types

Core Types

AsteroidShapeModels.ShapeModelType
ShapeModel

A polyhedral shape model of an asteroid.

Fields

  • nodes : Vector of node positions
  • faces : Vector of vertex indices of faces
  • face_centers : Center position of each face
  • face_normals : Normal vector of each face
  • face_areas : Area of of each face
  • face_visibility_graph : FaceVisibilityGraph for efficient visibility queries
source
AsteroidShapeModels.RayType
Ray

Structure representing a ray in 3D space.

Fields

  • origin : Ray origin point
  • direction : Ray direction vector (normalized)
source
AsteroidShapeModels.BoundingBoxType
BoundingBox

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)
source

Result Types

AsteroidShapeModels.RayTriangleIntersectionResultType
RayTriangleIntersectionResult

Structure representing the result of ray-triangle intersection test.

Fields

  • hit : true if intersection exists, false otherwise
  • distance : Distance from ray origin to intersection point
  • point : Coordinates of the intersection point
source
AsteroidShapeModels.RayShapeIntersectionResultType
RayShapeIntersectionResult

Structure representing the result of ray-shape intersection test.

Fields

  • hit : true if intersection exists, false otherwise
  • distance : Distance from ray origin to intersection point
  • point : Coordinates of the intersection point
  • face_index : Index of the intersected face
source

Visibility Types

AsteroidShapeModels.FaceVisibilityGraphType
FaceVisibilityGraph

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 pair
  • distances: Distances between each visible face pair
  • directions: Unit direction vectors between each visible face pair
  • nfaces: Total number of faces
  • nnz: 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, ...]
source