vrdUVBaseProjectionSettings¶
-
class
vrdUVBaseProjectionSettings
¶
(Inherits vrdData
)
This is the base class for the UV coordinate projection settings.
Derived classes: vrdUVCylindricalProjectionSettings and vrdUVPlanarProjectionSettings.
Summary¶
- Functions:
- getKeepAspectRatio() → bool
- getProjectionCenter() → QVector3D
- getProjectionRotation() → QVector3D
- getProjectionScale() → QVector3D
- getTextureOffset() → QVector2D
- getTextureScale() → QVector2D
- getTextureSize() → QSizeF
- print()
- setKeepAspectRatio(keepAspectRatio)
- setProjectionCenter(center)
- setProjectionRotation(rotation)
- setProjectionScale(scale)
- setTextureOffset(offset)
- setTextureScale(scale)
- setTextureSize(size)
Functions¶
-
vrdUVBaseProjectionSettings.
getKeepAspectRatio
()¶ Returns: The Keep Aspect Ratio flag. See vrdUVBaseProjectionSettings.setKeepAspectRatio(keepAspectRatio) for an explanation. Return type: bool
-
vrdUVBaseProjectionSettings.
getProjectionCenter
()¶ Returns: Get center of the projection in 3d world space. Return type: QVector3D
-
vrdUVBaseProjectionSettings.
getProjectionRotation
()¶ Returns: Get projection rotation angles in degrees. See vrdUVBaseProjectionSettings.setProjectionRotation(rotation) for an explanation. Return type: QVector3D
-
vrdUVBaseProjectionSettings.
getProjectionScale
()¶ Returns: Projection scale used by cylindrical projection. See vrdUVBaseProjectionSettings.setProjectionScale(scale) for an explanation. Return type: QVector3D
-
vrdUVBaseProjectionSettings.
getTextureOffset
()¶ Returns: Offset of the projection plane, for Planar projection. Return type: QVector2D
-
vrdUVBaseProjectionSettings.
getTextureScale
()¶ Returns: Scale factor of the projection plane, for Planar projection. See vrdUVBaseProjectionSettings.setTextureScale(scale). Return type: QVector2D
-
vrdUVBaseProjectionSettings.
getTextureSize
()¶ Get projection plane size in scene units used by Planar projection. See vrdUVBaseProjectionSettings.setTextureSize(size).
Returns: Size in scene units Return type: QSizeF
-
vrdUVBaseProjectionSettings.
print
()¶ Debug print of settings.
-
vrdUVBaseProjectionSettings.
setKeepAspectRatio
(keepAspectRatio)¶ Set the Keep Aspect Ratio flag. This flag has no influence on the projection calculation itself but is only used as an indicator by the GUI and manipulator whether sizes and scales should be kept at their current aspect ratio.
Parameters: keepAspectRatio (bool) – The flag
-
vrdUVBaseProjectionSettings.
setProjectionCenter
(center)¶ Parameters: center (QVector3D) – Center of the projection in 3d world space.
-
vrdUVBaseProjectionSettings.
setProjectionRotation
(rotation)¶ Set projection rotation angles.
For Cylindrical mapping, this controls the orientation of the cylinder axis. The angles are Euler angles (rotation order xyz). When all rotation angles are zero, the axis goes along the world Y axis.
For Planar mapping, the first two values define the orientation of the plane in 3D, the third value defines the rotation in 2D around the plane normal.
Parameters: rotation (QVector3D) – Projection rotation angles in degrees.
-
vrdUVBaseProjectionSettings.
setProjectionScale
(scale)¶ Set projection scale used by cylindrical projection.
The y scale value scales the cylinder along its main axis (changes its height). The unscaled cylinder height is 1.0. So if the cylinder height should be 1000 scene units, set the y scale to 1000.
X and Z scale values scale the base of the cylinder. The base cylinder radius is 1.0. To have a regular cylinder with a circular base and diameter of 200 scene units, set X and Z to 100.0. Keep X and Z scale at identical values for a circular base. With unequal X and Z values, the cylinder base is stretched to an ellipse.
Parameters: scale (QVector3D) – (x,y,z) scale values
-
vrdUVBaseProjectionSettings.
setTextureOffset
(offset)¶ For Planar projection, set an offset to shift the projection from the center within the projection plane.
Parameters: offset (QVector2D) – Offset in scene units
-
vrdUVBaseProjectionSettings.
setTextureScale
(scale)¶ For Planar projection, set scale factor of the projection plane. To determine the final size of the texture projection, this scale is multiplied by the base size, vrdUVBaseProjectionSettings.setTextureSize(size).
Parameters: scale (QVector2D) – Scale factor
-
vrdUVBaseProjectionSettings.
setTextureSize
(size)¶ Set base Projection plane size used by Planar projection. This base size is further scaled with the scale factor set by vrdUVBaseProjectionSettings.setTextureScale(scale).
Parameters: size (QSizeF) – Size in scene units