随笔分类 -  C++

1 2 3 4 5 ··· 32 下一页
摘要:#include <iostream> #include <cmath> #include <chrono> #include <thread> #include <random> // Simple helper: wraps angle to [-pi, pi] double wrapToPi( 阅读全文
posted @ 2025-01-11 10:27 西北逍遥 阅读(5) 评论(0) 推荐(0) 编辑
摘要:IFC数据解析与渲染,施工进度自动生成与施工方案导出 ############################## 阅读全文
posted @ 2024-12-31 02:21 西北逍遥 阅读(20) 评论(0) 推荐(0) 编辑
摘要:#include <QApplication> #include <QWidget> #include <QPainter> #include <QPolygonF> #include <QPoint> #include <QMouseEvent> #include <QMessageBox> cl 阅读全文
posted @ 2024-12-29 23:59 西北逍遥 阅读(23) 评论(0) 推荐(0) 编辑
摘要:#pragma once #include <osgGA/TrackballManipulator> #include<osgGA/CameraManipulator> #include<osgGA/GUIActionAdapter> #include <osg/Group> #include <o 阅读全文
posted @ 2024-12-28 23:37 西北逍遥 阅读(36) 评论(0) 推荐(0) 编辑
摘要:使用C++解析IFC中的构件名称 比如:#1318= IFCWALL('2iW_ibiC5FdBGj9bA43z7h',#42,'\X2\57FA672C5899\X0\:\X2\5899\X0\ 1:7545',$,'\X2\57FA672C5899\X0\:\X2\5899\X0\ 1:1641 阅读全文
posted @ 2024-12-05 14:15 西北逍遥 阅读(16) 评论(0) 推荐(0) 编辑
摘要:Qt VTK加载openfoam计算结果.foam文件。 #include <QApplication> #include <QDebug> #include "qvtkopenglwidget.h" #include <vtkSmartPointer.h> #include <vtkGeneric 阅读全文
posted @ 2024-11-28 20:10 西北逍遥 阅读(27) 评论(0) 推荐(0) 编辑
摘要:osg三维场景中拾取鼠标在模型表面的点击点 #include <osg/Group> #include <osg/Geode> #include <osg/ShapeDrawable> #include <osgDB/ReadFile> #include <osgViewer/Viewer> #in 阅读全文
posted @ 2024-11-19 21:26 西北逍遥 阅读(81) 评论(0) 推荐(0) 编辑
摘要:c++实现livox-mid70/360采集、保存点云数据 void PointCloudCallback(uint32_t handle, const uint8_t dev_type, LivoxLidarEthernetPacket* data, void* client_data) { if 阅读全文
posted @ 2024-11-05 07:54 西北逍遥 阅读(119) 评论(0) 推荐(0) 编辑
摘要:QMap<QString, int> map; map["one"] = 1; map["three"] = 3; map["seven"] = 7; map.insert("twelve", 12); int num1 = map["thirteen"]; int num2 = map.value 阅读全文
posted @ 2024-10-02 23:48 西北逍遥 阅读(12) 评论(0) 推荐(0) 编辑
摘要:QByteArray arr1 = QByteArray::fromHex("000000A1000000B2000005DC00000000000000900000000000000000000000000000000100000020000000210000000100000000001748C 阅读全文
posted @ 2024-09-27 10:49 西北逍遥 阅读(67) 评论(0) 推荐(0) 编辑
摘要:#include <QApplication> #include <QFileDialog> #include <QFile> #include <QTextStream> #include <QMessageBox> void saveFileWithDialog() { QString file 阅读全文
posted @ 2024-09-10 10:14 西北逍遥 阅读(43) 评论(0) 推荐(0) 编辑
摘要:if (tcpSocketObj->state()==QAbstractSocket::SocketState::ConnectedState) { qDebug() << "send data:"<<dataStr; tcpSocketObj->write(dataStr.toUtf8()); } 阅读全文
posted @ 2024-08-17 22:49 西北逍遥 阅读(16) 评论(0) 推荐(0) 编辑
摘要:在Qt中,QTcpSocket 类用于TCP网络编程,它提供了丰富的接口来管理TCP连接。要判断 QTcpSocket 的连接状态,可以使用 state() 方法,该方法返回一个 QAbstractSocket::SocketState 枚举值,表示当前的连接状态。 以下是一些常见的连接状态及其对应 阅读全文
posted @ 2024-08-14 21:52 西北逍遥 阅读(356) 评论(0) 推荐(0) 编辑
摘要:#include <QDate> #include <QString> #include <QDebug> int main() { // 创建一个QDate对象 QDate date(2023, 4, 5); // 假设日期是2023年4月5日 // 使用toString()方法将日期格式化为yy 阅读全文
posted @ 2024-08-04 13:49 西北逍遥 阅读(19) 评论(0) 推荐(0) 编辑
摘要:C++ opencv putText #include <opencv2/opencv.hpp> int main() { // 创建一个空白图像 cv::Mat img(400, 400, CV_8UC3, cv::Scalar(255, 255, 255)); // 设置文本内容 std::st 阅读全文
posted @ 2024-07-24 16:28 西北逍遥 阅读(268) 评论(0) 推荐(0) 编辑
摘要:错误 C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See 阅读全文
posted @ 2024-06-15 10:41 西北逍遥 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include <QApplication> #include <QScreen> #include <QDebug> int main(int argc, char *argv[]) { QApplication app(argc, argv); // 获取主屏幕 QScreen *screen 阅读全文
posted @ 2024-06-11 23:32 西北逍遥 阅读(124) 评论(0) 推荐(0) 编辑
摘要:在C++中,你可以将类的成员函数(也称为方法)作为参数传递,但这通常涉及到使用函数指针或者更现代的C++11及以后版本的std::function和lambda表达式。不过,更常见的是传递成员函数指针,但请注意,成员函数指针与常规函数指针在语法和使用上有所不同,因为成员函数需要访问类的特定实例(即对 阅读全文
posted @ 2024-05-23 21:06 西北逍遥 阅读(813) 评论(0) 推荐(0) 编辑
摘要:class MyClass { public: void func1() { // 实现 } void func2() { // 实现 } // 成员函数指针类型 typedef void (MyClass::*MemberFuncPtr)(); // 一个成员函数指针成员变量 MemberFunc 阅读全文
posted @ 2024-05-22 23:06 西北逍遥 阅读(21) 评论(0) 推荐(0) 编辑
摘要:Livox mid70雷达 c++ SDK 官方demo能正常调用,但封装后回调函数错误 ########################### 阅读全文
posted @ 2024-05-08 22:26 西北逍遥 阅读(24) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 32 下一页
点击右上角即可分享
微信分享提示