tinypbrt 1.1.1
pbrt-v4 scene file parser for C11 with a header-only C++20 wrapper
Loading...
Searching...
No Matches
Object

Data Structures

struct  tpbrt_object_t
 PBRT object representation. More...
 
struct  tpbrt_objects_list_t
 List of objects. More...
 
struct  tpbrt_object_handle_t
 Object handle. More...
 

Macros

#define TPBRT_OBJECT_IDX_INVALID   TPBRT_IDX_INVALID
 Invalid object index.
 

Typedefs

typedef tpbrt_idx_t tpbrt_object_idx_t
 Object index type.
 

Functions

tpbrt_error_t tpbrt_get_object_by_name (const tpbrt_objects_list_t *objects, tpbrt_string_t name, const tpbrt_object_t **object)
 Returns pointer to object with given name.
 
tpbrt_error_t tpbrt_get_object_by_handle (const tpbrt_objects_list_t *objects, tpbrt_object_handle_t handle, const tpbrt_object_t **object)
 Returns pointer to object to which handle is provided.
 

Detailed Description

Macro Definition Documentation

◆ TPBRT_OBJECT_IDX_INVALID

#define TPBRT_OBJECT_IDX_INVALID   TPBRT_IDX_INVALID

Invalid object index.

Typedef Documentation

◆ tpbrt_object_idx_t

Object index type.

Function Documentation

◆ tpbrt_get_object_by_name()

tpbrt_error_t tpbrt_get_object_by_name ( const tpbrt_objects_list_t *  objects,
tpbrt_string_t  name,
const tpbrt_object_t **  object 
)

Returns pointer to object with given name.

Parameters
objectsList of objects in which searched object should be.
nameName of the searched object.
objectPointer in which pointer to object will be stored (if not found this will be TPBRT_NULL).
Returns
Returns error code (most possible TPBRT_ERROR_NOT_FOUND, TPBRT_ERROR_NONE).

◆ tpbrt_get_object_by_handle()

tpbrt_error_t tpbrt_get_object_by_handle ( const tpbrt_objects_list_t *  objects,
tpbrt_object_handle_t  handle,
const tpbrt_object_t **  object 
)

Returns pointer to object to which handle is provided.

Parameters
objectsList of objects in which object given by handle should be.
handleHandle to object.
objectPointer in which pointer to object will be stored (if not found this will be TPBRT_NULL).
Returns
Returns error code (most possible TPBRT_ERROR_NOT_FOUND, TPBRT_ERROR_NONE).
Examples
examples/export_obj/main.c.