27#ifndef EASY3D_RENDERER_CLIPPING_PLANE_H
28#define EASY3D_RENDERER_CLIPPING_PLANE_H
30#include <easy3d/core/types.h>
116 float cross_section_width_;
A perspective or orthographic camera.
Definition: camera.h:116
An implementation of a manipulable clipping plane for visualization of model interiors and cross sect...
Definition: clipping_plane.h:44
void set_discard_primitives(ShaderProgram *program, bool plane_clipping_discard) const
Definition: clipping_plane.cpp:126
void set_cross_section(bool b)
enables/disables cross section.
Definition: clipping_plane.h:84
static ClippingPlane * instance()
Definition: clipping_plane.cpp:61
vec3 center() const
the center of the clipping plane.
Definition: clipping_plane.cpp:84
virtual const Manipulator * manipulator() const
returns the manipulator attached to the clipping plane.
Definition: clipping_plane.h:108
bool is_visible() const
returns whether the clipping plane is visible.
Definition: clipping_plane.h:72
const vec4 & color() const
returns the color of the clipping plane.
Definition: clipping_plane.h:77
vec3 normal() const
the normal direction of the clipping plane.
Definition: clipping_plane.cpp:89
void set_cross_section_width(float w)
sets the thickness of the cross section.
Definition: clipping_plane.h:90
bool is_enabled() const
returns whether the clipping plane has been enabled.
Definition: clipping_plane.h:54
virtual Manipulator * manipulator()
returns the manipulator attached to the clipping plane.
Definition: clipping_plane.h:106
float cross_section_width() const
Definition: clipping_plane.h:88
Plane3 plane0() const
the clipping plane
Definition: clipping_plane.cpp:73
void draw(Camera *cam) const
draws the clipping plane itself.
Definition: clipping_plane.cpp:132
bool cross_section() const
returns whether cross section is enabled.
Definition: clipping_plane.h:82
void set_program(ShaderProgram *program) const
Definition: clipping_plane.cpp:95
void set_visible(bool v)
shows/hides the clipping plane.
Definition: clipping_plane.h:74
Plane3 plane1() const
the other clipping plane. plane0() and plane1() together define a cross section.
Definition: clipping_plane.cpp:78
void set_color(const vec4 &c)
sets the color of the clipping plane.
Definition: clipping_plane.h:79
void set_enabled(bool b)
enables/disables the clipping plane.
Definition: clipping_plane.h:56
void fit_scene(const vec3 ¢er, float radius)
puts the clipping plane at the center of the scene.
Definition: clipping_plane.cpp:67
A manipulator is for manipulation of an object.
Definition: manipulator.h:62
OpenGL Shader Compilation.
Definition: shader_program.h:78
Definition: collider.cpp:182