Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
3DScene.hpp File Reference
#include "libslic3r/libslic3r.h"
#include "libslic3r/Point.hpp"
#include "libslic3r/Line.hpp"
#include "libslic3r/TriangleMesh.hpp"
#include "libslic3r/Utils.hpp"
#include "libslic3r/Geometry.hpp"
#include "libslic3r/Color.hpp"
#include "GLModel.hpp"
#include "MeshUtils.hpp"
#include <functional>
#include <optional>
+ Include dependency graph for 3DScene.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Slic3r::GLVolume
 
class  Slic3r::GLVolume::SinkingContours
 
class  Slic3r::GLVolume::NonManifoldEdges
 
struct  Slic3r::GLVolume::CompositeID
 
class  Slic3r::GLVolumeCollection
 
struct  Slic3r::GLVolumeCollection::PrintVolume
 
struct  Slic3r::GLVolumeCollection::Slope
 
struct  Slic3r::_3DScene
 
struct  Slic3r::GLVolume.__unnamed698__
 

Namespaces

namespace  Slic3r
 

Macros

#define HAS_GLSAFE
 
#define glsafe(cmd)   do { cmd; glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); } while (false)
 
#define glcheck()   do { glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); } while (false)
 

Typedefs

using Slic3r::GLVolumePtrs = std::vector< GLVolume * >
 
typedef std::pair< GLVolume *, std::pair< unsigned int, double > > Slic3r::GLVolumeWithIdAndZ
 
typedef std::vector< GLVolumeWithIdAndZSlic3r::GLVolumeWithIdAndZList
 

Functions

void glAssertRecentCallImpl (const char *file_name, unsigned int line, const char *function_name)
 
void glAssertRecentCall ()
 
ColorRGBA Slic3r::color_from_model_volume (const ModelVolume &model_volume)
 
GLVolumeWithIdAndZList Slic3r::volumes_to_render (const GLVolumePtrs &volumes, GLVolumeCollection::ERenderType type, const Transform3d &view_matrix, std::function< bool(const GLVolume &)> filter_func)
 

Class Documentation

◆ Slic3r::GLVolumeCollection::PrintVolume

struct Slic3r::GLVolumeCollection::PrintVolume
+ Collaboration diagram for Slic3r::GLVolumeCollection::PrintVolume:
Class Members
array< float, 4 > data
int type { 0 }
array< float, 2 > zs

◆ Slic3r::GLVolumeCollection::Slope

struct Slic3r::GLVolumeCollection::Slope
Class Members
bool active { false }
float normal_z

◆ Slic3r::GLVolume.__unnamed698__

struct Slic3r::GLVolume.__unnamed698__
Class Members
bool disabled: 1
bool force_native_color: 1
bool force_neutral_color: 1
bool force_sinking_contours: 1
bool is_active: 1
bool is_extrusion_path: 1
bool is_modifier: 1
bool is_outside: 1
bool is_wipe_tower: 1
bool printable: 1
bool selected: 1
bool shader_outside_printer_detection_enabled: 1
bool zoom_to_volumes: 1

Macro Definition Documentation

◆ glcheck

#define glcheck ( )    do { glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); } while (false)

◆ glsafe

#define glsafe (   cmd)    do { cmd; glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); } while (false)

◆ HAS_GLSAFE

#define HAS_GLSAFE

Function Documentation

◆ glAssertRecentCall()

void glAssertRecentCall ( )
inline
24{ glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); }
void glAssertRecentCallImpl(const char *file_name, unsigned int line, const char *function_name)
Definition 3DScene.cpp:38

References glAssertRecentCallImpl().

+ Here is the call graph for this function:

◆ glAssertRecentCallImpl()

void glAssertRecentCallImpl ( const char *  file_name,
unsigned int  line,
const char *  function_name 
)
39{
40#if defined(NDEBUG)
41 // In release mode, only show OpenGL errors if sufficiently high loglevel.
43 return;
44#endif // NDEBUG
45
46 GLenum err = glGetError();
47 if (err == GL_NO_ERROR)
48 return;
49 const char* sErr = 0;
50 switch (err) {
51 case GL_INVALID_ENUM: sErr = "Invalid Enum"; break;
52 case GL_INVALID_VALUE: sErr = "Invalid Value"; break;
53 // be aware that GL_INVALID_OPERATION is generated if glGetError is executed between the execution of glBegin and the corresponding execution of glEnd
54 case GL_INVALID_OPERATION: sErr = "Invalid Operation"; break;
55 case GL_STACK_OVERFLOW: sErr = "Stack Overflow"; break;
56 case GL_STACK_UNDERFLOW: sErr = "Stack Underflow"; break;
57 case GL_OUT_OF_MEMORY: sErr = "Out Of Memory"; break;
58 default: sErr = "Unknown"; break;
59 }
60 BOOST_LOG_TRIVIAL(error) << "OpenGL error in " << file_name << ":" << line << ", function " << function_name << "() : " << (int)err << " - " << sErr;
61 assert(false);
62}
unsigned int GLenum
Definition glu-libtess.h:53
unsigned get_logging_level()
Definition utils.cpp:107
static char error[256]
Definition tga.cpp:50

References error, and Slic3r::get_logging_level().

Referenced by glAssertRecentCall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: