8 #include <pybind11/pybind11.h>
9 #include <pybind11/stl.h>
10 #include <pybind11/stl_bind.h>
16 #include "../casters.h"
19 using namespace pybind11::literals;
23 py::class_<ecvViewportParameters>(m,
"ccViewportParameters")
43 .def(
"computeScaleMatrix",
46 const QRect vp(glViewPort[0].cast<int>(),
47 glViewPort[1].cast<int>(),
48 glViewPort[2].cast<int>(),
49 glViewPort[3].cast<int>());
50 return self.computeScaleMatrix(vp);
55 .def(
"computeDistanceToHalfWidthRation",
void define_ccViewPortParameters(py::module &m)
Standard parameters for GL displays/viewports.
double zNearCoef
Theoretical perspective 'zNear' relative position.
float defaultLineWidth
Line width.
bool perspectiveView
Perspective view state.
float fov_deg
Camera F.O.V. (field of view) in degrees.
CCVector3d getViewDir() const
Returns the viewing direction.
double computeWidthAtFocalDist() const
Computes the object 'width' at the 'focal' distance.
double computePixelSize(int glWidth) const
Computes the pixel size at the 'focal' distance.
float cameraAspectRatio
Camera aspect ratio.
double zFar
Actual perspective 'zFar' value.
ccGLMatrixd computeViewMatrix() const
Computes the view matrix.
double getFocalDistance() const
Computes the 'focal' distance.
const CCVector3d & getCameraCenter() const
Returns the camera center.
float defaultPointSize
Point size.
void setPivotPoint(const CCVector3d &P, bool autoUpdateFocal=true)
Sets the pivot point (for object-centered view mode)
const CCVector3d & getPivotPoint() const
Returns the pivot point (for object-centered view mode)
double computeDistanceToHalfWidthRatio() const
Computes the ratio 'distance to half width' (based on the current FOV)
ccGLMatrixd viewMat
Visualization matrix (rotation only)
void setCameraCenter(const CCVector3d &C, bool autoUpdateFocal=true)
Sets the camera center.
double computeDistanceToWidthRatio() const
Computes the ratio 'distance to width' (based on the current FOV)
void setFocalDistance(double distance)
Sets the 'focal' distance.
double zNear
Actual perspective 'zNear' value.
CCVector3d getUpDir() const
Returns the up direction.
const CCVector3d & getRotationCenter() const
Returns the view rotation 'center'.