tinypbrt
1.1.1
pbrt-v4 scene file parser for C11 with a header-only C++20 wrapper
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1
#pragma once
2
#ifndef _TINYPBRT_COMMON_H_
3
#define _TINYPBRT_COMMON_H_
4
5
#include <
tinypbrt/detail/fwd.h
>
6
7
#ifdef __cplusplus
8
extern
"C"
{
9
#endif
10
20
typedef
struct
tpbrt_string_t
{
22
const
tpbrt_char_t
*
data
;
24
tpbrt_size_t
size
;
25
}
tpbrt_string_t
;
26
31
typedef
struct
tpbrt_string_array_t
{
33
tpbrt_string_t
*
data
;
35
tpbrt_size_t
count
;
36
}
tpbrt_string_array_t
;
37
42
typedef
struct
tpbrt_name_index_t
{
44
tpbrt_idx_t
*
slots
;
46
tpbrt_uint_t
capacity
;
48
tpbrt_uint_t
count
;
49
}
tpbrt_name_index_t
;
50
51
#ifdef __cplusplus
52
}
53
#endif
54
#endif
// _TINYPBRT_TYPES_H_
fwd.h
tpbrt_char_t
char tpbrt_char_t
Char type.
Definition
fwd.h:51
tpbrt_size_t
size_t tpbrt_size_t
Size type.
Definition
fwd.h:93
tpbrt_idx_t
tpbrt_uint_t tpbrt_idx_t
Index type.
Definition
fwd.h:119
tpbrt_uint_t
uint32_t tpbrt_uint_t
Unsigned int type.
Definition
fwd.h:78
tpbrt_name_index_t
Keeps name indexes for faster lookups.
Definition
common.h:42
tpbrt_name_index_t::count
tpbrt_uint_t count
Slots count.
Definition
common.h:48
tpbrt_name_index_t::slots
tpbrt_idx_t * slots
Indexes.
Definition
common.h:44
tpbrt_name_index_t::capacity
tpbrt_uint_t capacity
Slots capacity.
Definition
common.h:46
tpbrt_string_array_t
Array of strings.
Definition
common.h:31
tpbrt_string_array_t::data
tpbrt_string_t * data
Array data.
Definition
common.h:33
tpbrt_string_array_t::count
tpbrt_size_t count
Array items count.
Definition
common.h:35
tpbrt_string_t
Simple string representation (not always terminated with '\0', the size determines the length of the ...
Definition
common.h:20
tpbrt_string_t::size
tpbrt_size_t size
String size.
Definition
common.h:24
tpbrt_string_t::data
const tpbrt_char_t * data
String characters.
Definition
common.h:22
tinypbrt
detail
common.h
Generated by
1.9.8