![]() |
Open CASCADE Technology Reference Manual 8.0.1
|
State and geometry model of the OpenGl shader-rendered grid. More...
#include <OpenGl_ShaderGrid.hxx>
Public Member Functions | |
| bool | IsShown () const |
| Return TRUE if the grid is currently shown. | |
| bool | IsBackground () const |
| Return TRUE if the grid is rendered as a background. | |
| const Aspect_GridParams & | Params () const |
| Return current parameters. | |
| bool | Display (const Aspect_GridParams &theParams, const gp_Ax3 &thePlane, const occ::handle< Graphic3d_Camera > &theCamera, const occ::handle< OpenGl_Context > &theContext) |
| Store grid state. Returns FALSE when parameters cannot produce a shader grid. | |
| void | Erase () |
| Clear grid state. | |
| void | AddZFitBounds (Bnd_Box &theGraphicBox, const occ::handle< Graphic3d_Camera > &theCamera) const |
| Add helper bounds required by camera Z fitting. | |
| bool | Echo (const occ::handle< Graphic3d_Camera > &theCamera, const int theWidth, const int theHeight, const int theX, const int theY, Graphic3d_Vertex &thePoint, Graphic3d_Vertex &theDisplayPoint) const |
| Return snapped point for the grid under the window pixel. | |
| bool | SnapPoint (const occ::handle< Graphic3d_Camera > &theCamera, const Graphic3d_Vertex &thePoint, Graphic3d_Vertex &theGridPoint) const |
| Return snapped point for an arbitrary world point. | |
| void | SetUniforms (const occ::handle< OpenGl_Context > &theContext, const occ::handle< OpenGl_ShaderProgram > &theProgram, const occ::handle< Graphic3d_Camera > &theCamera, const NCollection_Mat4< float > &theWorldView) const |
| Upload shader uniforms for current grid state. | |
| NCollection_Mat4< float > | DrawWorldView (const NCollection_Mat4< float > &theCurrentWorldView) const |
| Return worldview matrix to use for drawing. | |
State and geometry model of the OpenGl shader-rendered grid.
| void OpenGl_ShaderGrid::AddZFitBounds | ( | Bnd_Box & | theGraphicBox, |
| const occ::handle< Graphic3d_Camera > & | theCamera ) const |
Add helper bounds required by camera Z fitting.
| bool OpenGl_ShaderGrid::Display | ( | const Aspect_GridParams & | theParams, |
| const gp_Ax3 & | thePlane, | ||
| const occ::handle< Graphic3d_Camera > & | theCamera, | ||
| const occ::handle< OpenGl_Context > & | theContext ) |
Store grid state. Returns FALSE when parameters cannot produce a shader grid.
| NCollection_Mat4< float > OpenGl_ShaderGrid::DrawWorldView | ( | const NCollection_Mat4< float > & | theCurrentWorldView | ) | const |
Return worldview matrix to use for drawing.
| bool OpenGl_ShaderGrid::Echo | ( | const occ::handle< Graphic3d_Camera > & | theCamera, |
| const int | theWidth, | ||
| const int | theHeight, | ||
| const int | theX, | ||
| const int | theY, | ||
| Graphic3d_Vertex & | thePoint, | ||
| Graphic3d_Vertex & | theDisplayPoint ) const |
Return snapped point for the grid under the window pixel.
| void OpenGl_ShaderGrid::Erase | ( | ) |
Clear grid state.
|
inline |
Return TRUE if the grid is rendered as a background.
|
inline |
Return TRUE if the grid is currently shown.
|
inline |
Return current parameters.
| void OpenGl_ShaderGrid::SetUniforms | ( | const occ::handle< OpenGl_Context > & | theContext, |
| const occ::handle< OpenGl_ShaderProgram > & | theProgram, | ||
| const occ::handle< Graphic3d_Camera > & | theCamera, | ||
| const NCollection_Mat4< float > & | theWorldView ) const |
Upload shader uniforms for current grid state.
| bool OpenGl_ShaderGrid::SnapPoint | ( | const occ::handle< Graphic3d_Camera > & | theCamera, |
| const Graphic3d_Vertex & | thePoint, | ||
| Graphic3d_Vertex & | theGridPoint ) const |
Return snapped point for an arbitrary world point.