28 bool toFile(QFile& out,
short dataVersion)
const override;
33 LoadedIDMap& oldToNewIDMap)
override;
36 void setPivotPoint(
const CCVector3d& P,
bool autoUpdateFocal =
true);
43 void setCameraCenter(
const CCVector3d& C,
bool autoUpdateFocal =
true);
51 void setFocalDistance(
double distance);
58 static double IncrementToZNearCoef(
int i,
int iMax);
62 static int ZNearCoefToIncrement(
double coef,
int iMax);
68 ccGLMatrixd computeScaleMatrix(
const QRect& glViewport)
const;
92 double computeDistanceToHalfWidthRatio()
const;
97 double computeDistanceToWidthRatio()
const;
100 double computeWidthAtFocalDist()
const;
103 double computePixelSize(
int glWidth)
const;
Double version of ccGLMatrixTpl.
Serializable object interface.
virtual short minimumFileVersion() const =0
Returns the minimum file version required to save this instance.
virtual bool toFile(QFile &out, short dataVersion) const
Saves data to binary stream.
virtual bool fromFile(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
Loads data from binary stream.
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.
float pixelSize
Current pixel size (in 'current unit'/pixel)
CCVector3d cameraCenter
Camera center.
double focalDistance
Focal distance.
bool isSerializable() const override
Returns whether object is serializable of not.
float cameraAspectRatio
Camera aspect ratio.
double zFar
Actual perspective 'zFar' value.
double getFocalDistance() const
Computes the 'focal' distance.
const CCVector3d & getCameraCenter() const
Returns the camera center.
float defaultPointSize
Point size.
const CCVector3d & getPivotPoint() const
Returns the pivot point (for object-centered view mode)
ccGLMatrixd viewMat
Visualization matrix (rotation only)
CCVector3d pivotPoint
Rotation pivot point (for object-centered view modes)
double zNear
Actual perspective 'zNear' value.
static double distance(T *pot1, T *pot2)