“人生就好比航海,不断地向目的地出发,中间会在一些港口停留,而这些港口都是我们补给的地方。”
Category Archives: 视点
Reply
仿射变换
仿射变换 得概念如何理解?
几个名字先熟悉一下:
- 线性变换 linear transformation
- 平移 translate
- 旋转 rotate
- 仿射变换 affine transformation
- 缩放 scale
- 剪切 shear
- 透视变换 perspective transformation
矩阵相关名词:
- identity matrix 单位矩阵
- non-singular matrix 可逆矩阵(非奇异矩阵)
- matrix’s determinant 矩阵行列式
Qt 相关对象
- QMatrix
- QTransform
QMatrix 结构
QMatrix::QMatrix(qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy)
m11 | m12 | 0 |
m21 | m22 | 0 |
dx | dy | 1 |
- dx ,dy : 水平和垂直平移
- m11, m22 : 水平和垂直缩放
- m21, m12 : 水平和垂直剪切
x' = m11*x + m21*y + dx y' = m22*y + m12*x + dy
QMatrix translationMatrix(1, 0, 0, 1, 50.0, 50.0); QMatrix rotationMatrix(cosa, sina, -sina, cosa, 0, 0); QMatrix scalingMatrix(0.5, 0, 0, 1.0, 0, 0); QMatrix matrix; matrix = scalingMatrix * rotationMatrix * translationMatrix;
QTransform 结构
延伸阅读
- https://en.wikipedia.org/wiki/Affine_transformation
- 为什么可逆矩阵又叫“非奇异矩阵(non-singular matrix)”
https://www.cnblogs.com/marsggbo/p/10034629.html
商业生存
Featured
“There are three ways to make a living in this business: be first, be smarter, or cheat.”
“商业世界里只有三种生存模式,更快、更聪明,或者更会骗人。”
– 美国电影《商海通牒》
Qt5 + VS2015 的命令行编译和安装
前面很多时候,LT 是在 Qt Creator 中创建项目和编译项目。但是, Qt 也提供了命令行方式,尤其是网上一些Qt项目介绍都是用命令行编译的方式介绍,所以,本文探索了一下命令行的用法。
一、设置
默认情况下,在Qt安装后,会有一个命令行快捷方式,比如我的版本叫做 “Qt 5.12.3 (MSVC 2015 64-bit)”,指向 “ C:\Qt\Qt5.12.3\5.12.3\msvc2015_64\bin\qtenv2.bat” 这个文件。
打开后,内容是这样的:
@echo off echo Setting up environment for Qt usage... set PATH=C:\Qt\Qt5.12.3\5.12.3\msvc2015_64\bin;%PATH% cd /D C:\Qt\Qt5.12.3\5.12.3\msvc2015_64 echo Remember to call vcvarsall.bat to complete environment setup!
MinGW 的发音
MinGW 是 “minimalist GNU for Windows”.的缩写,发音可 Min-gee-double-u
参考:
关注一下 .NET Core
有个报错:The current .NET SDK does not support targeting .NET Standard 2.0.
于是目光开始关注 .NET Core :
- Download : https://dotnet.microsoft.com/download
- Docs: https://docs.microsoft.com/en-us/dotnet/core/
延伸阅读:
- 微软Visual Studio 2019正式版发布
https://www.ithome.com/0/417/422.htm