![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <LightDirectionInteractorLogic.h>


Public Member Functions | |
| LightDirectionInteractorLogic (Scene *scene, Camera *camera) | |
| void | Rotate (int dx, int dy) override |
| void | StartMouseDrag () |
| void | UpdateMouseDragUI () |
| void | EndMouseDrag () |
| Eigen::Vector3f | GetCurrentDirection () const |
Public Member Functions inherited from cloudViewer::visualization::rendering::MatrixInteractorLogic | |
| virtual | ~MatrixInteractorLogic () |
| void | SetViewSize (int width, int height) |
| int | GetViewWidth () const |
| int | GetViewHeight () const |
| const ccBBox & | GetBoundingBox () const |
| virtual void | SetBoundingBox (const ccBBox &bounds) |
| Eigen::Vector3f | GetCenterOfRotation () const |
| void | SetMouseDownInfo (const Camera::Transform &matrix, const Eigen::Vector3f ¢er_of_rotation) |
| const Camera::Transform & | GetMatrix () const |
| virtual void | RotateWorld (int dx, int dy, const Eigen::Vector3f &x_axis, const Eigen::Vector3f &y_axis) |
| virtual void | RotateZ (int dx, int dy) |
| Rotates about the forward axis of the matrix. More... | |
| virtual void | RotateZWorld (int dx, int dy, const Eigen::Vector3f &forward) |
| virtual void | Dolly (float dy, DragType drag_type) |
| virtual void | Dolly (float z_dist, Camera::Transform matrix) |
Additional Inherited Members | |
Public Types inherited from cloudViewer::visualization::rendering::MatrixInteractorLogic | |
| enum class | DragType { MOUSE , WHEEL , TWO_FINGER } |
Protected Member Functions inherited from cloudViewer::visualization::rendering::MatrixInteractorLogic | |
| void | SetMatrix (const Camera::Transform &matrix) |
| float | CalcRotateRadians (int dx, int dy) |
| float | CalcRotateZRadians (int dx, int dy) |
| float | CalcDollyDist (float dy, DragType drag_type, const Camera::Transform &matrix) |
Protected Attributes inherited from cloudViewer::visualization::rendering::MatrixInteractorLogic | |
| int | view_width_ = 1 |
| int | view_height_ = 1 |
| double | model_size_ = 20.0 |
| ccBBox | model_bounds_ |
| Eigen::Vector3f | center_of_rotation_ |
| Camera::Transform | matrix_at_mouse_down_ |
| Eigen::Vector3f | center_of_rotation_at_mouse_down_ |
Definition at line 20 of file LightDirectionInteractorLogic.h.
| cloudViewer::visualization::rendering::LightDirectionInteractorLogic::LightDirectionInteractorLogic | ( | Scene * | scene, |
| Camera * | camera | ||
| ) |
Definition at line 125 of file LightDirectionInteractorLogic.cpp.
| void cloudViewer::visualization::rendering::LightDirectionInteractorLogic::EndMouseDrag | ( | ) |
Definition at line 203 of file LightDirectionInteractorLogic.cpp.
| Eigen::Vector3f cloudViewer::visualization::rendering::LightDirectionInteractorLogic::GetCurrentDirection | ( | ) | const |
Definition at line 212 of file LightDirectionInteractorLogic.cpp.
References cloudViewer::visualization::rendering::MatrixInteractorLogic::GetMatrix().
|
overridevirtual |
Rotates about an axis defined by dx * matrixLeft, dy * matrixUp. dy is assumed to be in window-style coordinates, that is, going up produces a negative dy. The axis goes through the center of rotation.
Reimplemented from cloudViewer::visualization::rendering::MatrixInteractorLogic.
Definition at line 129 of file LightDirectionInteractorLogic.cpp.
References cloudViewer::visualization::rendering::Camera::GetLeftVector(), cloudViewer::visualization::rendering::Camera::GetUpVector(), cloudViewer::visualization::rendering::MatrixInteractorLogic::RotateWorld(), and UpdateMouseDragUI().
| void cloudViewer::visualization::rendering::LightDirectionInteractorLogic::StartMouseDrag | ( | ) |
Definition at line 136 of file LightDirectionInteractorLogic.cpp.
References cloudViewer::visualization::rendering::Scene::AddGeometry(), cloudViewer::geometry::LineSet::CreateFromTriangleMesh(), ccMesh::CreateSphere(), cloudViewer::visualization::rendering::Scene::GeometryShadows(), cloudViewer::visualization::rendering::Scene::GetSunLightDirection(), cloudViewer::visualization::rendering::kSkyColor(), cloudViewer::visualization::rendering::kSunColor(), cloudViewer::visualization::rendering::MatrixInteractorLogic::model_size_, cloudViewer::visualization::rendering::Scene::SetGeometryTransform(), cloudViewer::visualization::rendering::MatrixInteractorLogic::SetMouseDownInfo(), cloudViewer::visualization::rendering::MaterialRecord::shader, size, and UpdateMouseDragUI().
| void cloudViewer::visualization::rendering::LightDirectionInteractorLogic::UpdateMouseDragUI | ( | ) |
Definition at line 194 of file LightDirectionInteractorLogic.cpp.
References ccBBox::GetCenter(), cloudViewer::visualization::rendering::MatrixInteractorLogic::GetMatrix(), cloudViewer::visualization::rendering::MatrixInteractorLogic::model_bounds_, and cloudViewer::visualization::rendering::Scene::SetGeometryTransform().
Referenced by Rotate(), and StartMouseDrag().