2020
10-09
10-09
使用QPainter画一个3D正方体
本文实例为大家分享了QPainter画一个3D正的具体代码,供大家参考,具体内容如下My3DBox.h#include<Eigen/Geometry>usingnamespaceEigen;#defineSQUARE_LENGTH200//是一个边长200的正方体#defineCAMERA_DISTANCE300//视点距离classMy3DBox:publicQWidget{Q_OBJECTpublic:explicitMy3DBox(QWidget*parent=0);protected:QPointm_mousePos;Vector3dm_vector[8];//正方形8个点坐标voidmouseMoveEvent(QMou...
继续阅读 >