boinor.render.data_loader

This module provides functionality to load 3D model data from a file.

The load_data function reads a file containing 3D model data, extracts the vertex and face information, and returns them as numpy arrays. The file is expected to be in a specific format where each line represents either a vertex or a face. Vertices are denoted by lines starting with ‘v’ and faces by lines starting with ‘f’.

The function uses pandas to read the file and process the data. The vertices and faces are extracted based on their respective identifiers and returned as numpy arrays.

Functions

load_data(file_path)

Load 3D model data from a file.

Module Contents

boinor.render.data_loader.load_data(file_path)

Load 3D model data from a file.

Parameters:

file_path (str) – Path to the file containing the 3D model data.

Returns:

  • vertices (numpy.ndarray) – Array of vertex coordinates.

  • faces (numpy.ndarray) – Array of face indices.