faogenlib3
faogenlib3.h
1 
4 #ifndef faogenlib3_h
5 #define faogenlib3_h
6 
31 
32 #include <cstddef>
33 
34 #define FAOGEN_API extern "C"
35 
37 namespace faogenlib3
38 {
40  typedef int obj_handle;
41 
44  FAOGEN_API bool __stdcall initialize();
45 
48  FAOGEN_API void __stdcall shutdown();
49 
52  {
55  };
56 
69  FAOGEN_API obj_handle __stdcall create_object_v(
70  float const * vertices3f, size_t vertices_stride,
71  size_t num_vertices,
72  e_index_type index_type,
73  void const * triangle_indices, size_t num_indices );
74 
91  FAOGEN_API obj_handle __stdcall create_object_vn(
92  float const * vertices3f, size_t vertices_stride,
93  float const * normals3f, size_t normals_stride,
94  size_t num_vertices,
95  e_index_type index_type,
96  void const * triangle_indices, size_t num_indices );
97 
118  FAOGEN_API obj_handle __stdcall create_object_vnt(
119  float const * vertices3f, size_t vertices_stride,
120  float const * normals3f, size_t normals_stride,
121  float const * texcoords2f, size_t texcoords_stride,
122  size_t num_vertices,
123  e_index_type index_type,
124  void const * triangle_indices, size_t num_indices );
125 
130  FAOGEN_API void __stdcall set_object_matrix( obj_handle object_id, float const * matrix );
131 
137  FAOGEN_API bool __stdcall start_ao_gen_vert( obj_handle object_id,
138  unsigned quality, int hemisphere_mode );
139 
147  FAOGEN_API bool __stdcall start_ao_gen_tex( obj_handle object_id,
148  unsigned quality,
149  unsigned width, unsigned height, int hemisphere_mode );
150 
153  inline unsigned num_iterations( unsigned quality )
154  {
155  return quality*quality*10 + 2;
156  }
157 
160  FAOGEN_API void __stdcall ao_vert_generate( size_t iterations );
161 
164  FAOGEN_API void __stdcall ao_tex_generate( size_t iterations );
165 
168  FAOGEN_API bool __stdcall results_ready();
169 
175  FAOGEN_API float const * __stdcall get_vert_results();
176 
182  FAOGEN_API float const * __stdcall get_tex_results();
183 
187  FAOGEN_API void __stdcall destroy_object( obj_handle object_id );
188 }
189 
190 #endif //faogenlib3_h
bool start_ao_gen_vert(obj_handle object_id, unsigned quality, int hemisphere_mode)
32-bit unsigned integer
Definition: faogenlib3.h:54
unsigned num_iterations(unsigned quality)
Definition: faogenlib3.h:153
obj_handle create_object_vn(float const *vertices3f, size_t vertices_stride, float const *normals3f, size_t normals_stride, size_t num_vertices, e_index_type index_type, void const *triangle_indices, size_t num_indices)
void shutdown()
float const * get_vert_results()
void ao_tex_generate(size_t iterations)
bool results_ready()
void destroy_object(obj_handle object_id)
obj_handle create_object_vnt(float const *vertices3f, size_t vertices_stride, float const *normals3f, size_t normals_stride, float const *texcoords2f, size_t texcoords_stride, size_t num_vertices, e_index_type index_type, void const *triangle_indices, size_t num_indices)
void ao_vert_generate(size_t iterations)
bool start_ao_gen_tex(obj_handle object_id, unsigned quality, unsigned width, unsigned height, int hemisphere_mode)
void set_object_matrix(obj_handle object_id, float const *matrix)
int obj_handle
A type that represents object handle.
Definition: faogenlib3.h:40
fast ambient occlusion generator library
Definition: faogenlib3.h:37
16-bit unsigned integer
Definition: faogenlib3.h:53
e_index_type
Selects index type.
Definition: faogenlib3.h:51
bool initialize()
float const * get_tex_results()
obj_handle create_object_v(float const *vertices3f, size_t vertices_stride, size_t num_vertices, e_index_type index_type, void const *triangle_indices, size_t num_indices)