-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathobj_load.hpp
30 lines (18 loc) · 975 Bytes
/
obj_load.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef INCLUDED_HPP_OBJ_LOAD
#define INCLUDED_HPP_OBJ_LOAD
#include <string>
#include "object.hpp"
#include "objects_container.hpp"
#include <vec/vec.hpp>
struct texture;
void obj_load(objects_container* obj);
void obj_rect(objects_container* obj, texture& tex, cl_float2 dim);
void obj_rect_tessellated(objects_container* obj, texture& tex, cl_float2 dim, float tessellate_dim);
void obj_cube_by_extents(objects_container* pobj, texture& tex, cl_float4 dim);
///size is half of the width
void load_object_cube(objects_container* obj, vec3f start, vec3f fin, float size, std::string tex_name, bool center = false);
void load_object_cube_tex(objects_container* obj, vec3f start, vec3f fin, float size, texture& tex, bool center = false);
///calls f for every num
void obj_polygon(objects_container* obj, texture& tex, struct triangle (*f)(int), int num);
std::vector<triangle> subdivide_tris(const std::vector<triangle>& in);
#endif