An implementation of a manipulable clipping plane for visualization of model interiors and cross sections.
More...
#include <easy3d/renderer/clipping_plane.h>
|
bool | is_enabled () const |
| returns whether the clipping plane has been enabled.
|
|
void | set_enabled (bool b) |
| enables/disables the clipping plane.
|
|
void | fit_scene (const vec3 ¢er, float radius) |
| puts the clipping plane at the center of the scene.
|
|
vec3 | center () const |
| the center of the clipping plane. More...
|
|
vec3 | normal () const |
| the normal direction of the clipping plane. More...
|
|
Plane3 | plane0 () const |
| the clipping plane
|
|
Plane3 | plane1 () const |
| the other clipping plane. plane0() and plane1() together define a cross section.
|
|
bool | is_visible () const |
| returns whether the clipping plane is visible.
|
|
void | set_visible (bool v) |
| shows/hides the clipping plane.
|
|
const vec4 & | color () const |
| returns the color of the clipping plane.
|
|
void | set_color (const vec4 &c) |
| sets the color of the clipping plane.
|
|
bool | cross_section () const |
| returns whether cross section is enabled.
|
|
void | set_cross_section (bool b) |
| enables/disables cross section.
|
|
float | cross_section_width () const |
|
void | set_cross_section_width (float w) |
| sets the thickness of the cross section.
|
|
void | set_program (ShaderProgram *program) const |
|
void | set_discard_primitives (ShaderProgram *program, bool plane_clipping_discard) const |
|
void | draw (Camera *cam) const |
| draws the clipping plane itself.
|
|
virtual Manipulator * | manipulator () |
| returns the manipulator attached to the clipping plane.
|
|
virtual const Manipulator * | manipulator () const |
| returns the manipulator attached to the clipping plane.
|
|
An implementation of a manipulable clipping plane for visualization of model interiors and cross sections.
It also provides functions for visualizing the clipping plane itself.
◆ center()
the center of the clipping plane.
- See also
- normal()
◆ cross_section_width()
float cross_section_width |
( |
| ) |
const |
|
inline |
returns the thickness of the cross section.
The thickness is defined relative to the scene bounding box. Default value is 0.01.
◆ instance()
◆ normal()
the normal direction of the clipping plane.
- See also
- center().
◆ set_discard_primitives()
void set_discard_primitives |
( |
ShaderProgram * |
program, |
|
|
bool |
plane_clipping_discard |
|
) |
| const |
sets up whether a primitive should be completely discarded if one of its vertices is clipped.
- Parameters
-
program | The shader program. |
plane_clipping_discard | Controls clipping plane behavior.
- true: completely discard a primitive if one of its vertices is clipped by this clipping plane.
- false: standard plane clipping
|
◆ set_program()
sets up the shader program for rendering.
- Parameters
-
program | The shader program. |
The documentation for this class was generated from the following files:
- /Users/lnan/Documents/Projects/Easy3D/easy3d/renderer/clipping_plane.h
- /Users/lnan/Documents/Projects/Easy3D/easy3d/renderer/clipping_plane.cpp