3#include <cgv/render/textured_material.h>
4#include <cgv/render/vertex_buffer.h>
5#include <cgv/render/attribute_array_binding.h>
6#include <cgv/media/mesh/simple_mesh.h>
7#include <cgv/media/axis_aligned_box.h>
8#include <cgv/render/drawable.h>
9#include "mesh_render_info.h"
36 bool rebuild_mesh_info;
67#include <cgv/config/lib_end.h>
base class for all drawables, which is independent of the used rendering API.
base class for all drawables, which is independent of the used rendering API.
const box3 & get_box() const
return the axis aligned bounding box
void center_view()
call this to center the view after loading the mesh.
void draw_mesh_primitive(cgv::render::context &ctx, unsigned pi, bool opaque, bool use_materials=true)
draw all faces belonging to the given primitive, optionally turn off the specification of materials
void init_frame(cgv::render::context &ctx)
init textures if the mesh has been newly loaded
void clear(context &ctx)
clear all objects living in the context like textures or display lists
virtual bool read_mesh(const std::string &file_name)
read mesh from the given file_name which is extended by model path if it does not exist
void finish_draw(context &ctx)
default finish drawing implementation calls draw_mesh(ctx, false) to render transparent part
mesh_drawable()
construct from name which is necessary construction argument to node
std::string file_name
currently loaded file name
void draw_mesh(cgv::render::context &ctx, bool opaque, bool use_materials=true)
draw the complete mesh, optionally turn off the specification of materials
void draw(cgv::render::context &ctx)
default drawing implementation calls draw_mesh(ctx, true) to render opaque part
std::string model_path
default path to file names
cgv::media::mesh::simple_mesh< float > mesh_type
type of mesh
box3 box
the bounding box of the mesh is computed in the read_mesh method
the mesh_render_info structure manages vertex buffer objects for attribute and element buffers as wel...
namespace for opengl specific GPU programming
namespace for api independent GPU programming
this header is dependency free
cgv::media::axis_aligned_box< float, 3 > box3
declare type of 3d single precision floating point axis-aligned boxes