#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Gizmos/GLGizmoMeasure.hpp>
|
| static Vec3d | model_to_world (const Vec3d &model, const Transform3d &world_matrix) |
| static Vec4d | world_to_clip (const Vec3d &world, const Matrix4d &projection_view_matrix) |
| static Vec3d | clip_to_ndc (const Vec4d &clip) |
| static Vec2d | ndc_to_ss (const Vec3d &ndc, const std::array< int, 4 > &viewport) |
| static Vec4d | model_to_clip (const Vec3d &model, const Transform3d &world_matrix, const Matrix4d &projection_view_matrix) |
| static Vec3d | model_to_ndc (const Vec3d &model, const Transform3d &world_matrix, const Matrix4d &projection_view_matrix) |
| static Vec2d | model_to_ss (const Vec3d &model, const Transform3d &world_matrix, const Matrix4d &projection_view_matrix, const std::array< int, 4 > &viewport) |
| static Vec2d | world_to_ss (const Vec3d &world, const Matrix4d &projection_view_matrix, const std::array< int, 4 > &viewport) |
| static const Matrix4d & | ndc_to_ss_matrix (const std::array< int, 4 > &viewport) |
| static const Transform3d | ndc_to_ss_matrix_inverse (const std::array< int, 4 > &viewport) |
|
| static void | update (const std::array< int, 4 > &viewport) |
|
| static Cache | s_cache = { { 0, 0, 0, 0 }, Matrix4d::Identity(), Transform3d::Identity() } |
◆ Slic3r::GUI::TransformHelper::Cache
| struct Slic3r::GUI::TransformHelper::Cache |
| Class Members |
|
Matrix4d |
ndc_to_ss_matrix |
|
|
Transform3d |
ndc_to_ss_matrix_inverse |
|
|
array< int, 4 > |
viewport |
|
◆ clip_to_ndc()
| Vec3d Slic3r::GUI::TransformHelper::clip_to_ndc |
( |
const Vec4d & | clip | ) |
|
|
static |
◆ model_to_clip()
| Vec4d Slic3r::GUI::TransformHelper::model_to_clip |
( |
const Vec3d & | model, |
|
|
const Transform3d & | world_matrix, |
|
|
const Matrix4d & | projection_view_matrix ) |
|
static |
◆ model_to_ndc()
| Vec3d Slic3r::GUI::TransformHelper::model_to_ndc |
( |
const Vec3d & | model, |
|
|
const Transform3d & | world_matrix, |
|
|
const Matrix4d & | projection_view_matrix ) |
|
static |
◆ model_to_ss()
| Vec2d Slic3r::GUI::TransformHelper::model_to_ss |
( |
const Vec3d & | model, |
|
|
const Transform3d & | world_matrix, |
|
|
const Matrix4d & | projection_view_matrix, |
|
|
const std::array< int, 4 > & | viewport ) |
|
static |
◆ model_to_world()
| Vec3d Slic3r::GUI::TransformHelper::model_to_world |
( |
const Vec3d & | model, |
|
|
const Transform3d & | world_matrix ) |
|
static |
◆ ndc_to_ss()
| Vec2d Slic3r::GUI::TransformHelper::ndc_to_ss |
( |
const Vec3d & | ndc, |
|
|
const std::array< int, 4 > & | viewport ) |
|
static |
175{
176 const double half_w = 0.5 * double(viewport[2]);
177 const double half_h = 0.5 * double(viewport[3]);
178 return { half_w * ndc.x() + double(viewport[0]) + half_w, half_h * ndc.y() + double(viewport[1]) + half_h };
179};
Referenced by model_to_ss(), and world_to_ss().
◆ ndc_to_ss_matrix()
| const Matrix4d & Slic3r::GUI::TransformHelper::ndc_to_ss_matrix |
( |
const std::array< int, 4 > & | viewport | ) |
|
|
static |
◆ ndc_to_ss_matrix_inverse()
| const Transform3d Slic3r::GUI::TransformHelper::ndc_to_ss_matrix_inverse |
( |
const std::array< int, 4 > & | viewport | ) |
|
|
static |
◆ update()
| void Slic3r::GUI::TransformHelper::update |
( |
const std::array< int, 4 > & | viewport | ) |
|
|
staticprivate |
214{
215 if (
s_cache.viewport == viewport)
216 return;
217
218 const double half_w = 0.5 * double(viewport[2]);
219 const double half_h = 0.5 * double(viewport[3]);
220 s_cache.ndc_to_ss_matrix << half_w, 0.0, 0.0, double(viewport[0]) + half_w,
221 0.0, half_h, 0.0, double(viewport[1]) + half_h,
222 0.0, 0.0, 1.0, 0.0,
223 0.0, 0.0, 0.0, 1.0;
224
225 s_cache.ndc_to_ss_matrix_inverse =
s_cache.ndc_to_ss_matrix.inverse();
227}
References s_cache.
Referenced by ndc_to_ss_matrix(), and ndc_to_ss_matrix_inverse().
◆ world_to_clip()
| Vec4d Slic3r::GUI::TransformHelper::world_to_clip |
( |
const Vec3d & | world, |
|
|
const Matrix4d & | projection_view_matrix ) |
|
static |
◆ world_to_ss()
| Vec2d Slic3r::GUI::TransformHelper::world_to_ss |
( |
const Vec3d & | world, |
|
|
const Matrix4d & | projection_view_matrix, |
|
|
const std::array< int, 4 > & | viewport ) |
|
static |
◆ s_cache
| TransformHelper::Cache Slic3r::GUI::TransformHelper::s_cache = { { 0, 0, 0, 0 }, Matrix4d::Identity(), Transform3d::Identity() } |
|
staticprivate |
The documentation for this class was generated from the following files: