cgv
Loading...
Searching...
No Matches
gltf_support.h
1#pragma once
2
3#include <cgv/render/context.h>
4#include <cgv/render/shader_program.h>
5#include <cgv/media/mesh/simple_mesh.h>
6#include "render_info.h"
7#include "fx/gltf.h"
8
9#include "lib_begin.h"
10
11namespace cgv {
12 namespace render {
13
15extern CGV_API bool build_render_info(const std::string& file_name, const fx::gltf::Document& doc,
18extern CGV_API void extract_additional_information(const fx::gltf::Document& doc,
19 box3& box,
20 size_t& vertex_count);
22
28extern CGV_API void extract_mesh(const std::string& file_name, const fx::gltf::Document& doc,
29 cgv::media::mesh::simple_mesh<float>& mesh, int mesh_index = -1, int primitive_index = -1);
31extern CGV_API bool write_gltf(const std::string& file_name, const cgv::render::render_info& R);
32
33 }
34}
35
36#include <cgv/config/lib_end.h>
the simple_mesh class is templated over the coordinate type that defaults to float
base class for all drawables, which is independent of the used rendering API.
Definition context.h:621
the mesh_render_info structure manages vertex buffer objects for attribute and element buffers as wel...
Definition render_info.h:76
bool build_render_info(const std::string &file_name, const fx::gltf::Document &doc, cgv::render::context &ctx, cgv::render::render_info &R)
construct render info from gltf document
void extract_mesh(const std::string &file_name, const fx::gltf::Document &doc, cgv::media::mesh::simple_mesh< float > &mesh, int mesh_index, int primitive_index)
extract simple mesh form gltf document
void extract_additional_information(const fx::gltf::Document &doc, box3 &box, size_t &vertex_count)
extract bounding box and vertex count from gltf document
bool write_gltf(const std::string &file_name, const cgv::render::render_info &R)
NOT IMPLEMENTED YET.
the cgv namespace
Definition print.h:11
cgv::media::axis_aligned_box< float, 3 > box3
declare type of 3d single precision floating point axis-aligned boxes