# osgPotree **Repository Path**: osg_opensource/osg-potree ## Basic Information - **Project Name**: osgPotree - **Description**: 针对Potree 2.0转换的结果,在osg中直接显示,通过插件osgPotree实现。 - **Primary Language**: C++ - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 6 - **Created**: 2025-06-02 - **Last Updated**: 2026-01-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: pointcloud, potree, OpenSceneGraph ## README # osgPotree osgPotree 是基于 OpenSceneGraph(OSG)开发的插件,能够直接加载由 PotreeConverter 2.0 生成的点云数据,为 OSG 用户提供了便捷的点云渲染支持,并集成了点云编辑、目标识别等一系列相关辅助工具。 本代码库包含用于构建 osgPotree 库的 C++ 头文件、源文件以及 CMake 构建脚本。当前仅依赖OpenSceneGraph。于OpenSceneGraph一致,该软件支持在Linux、Windows、Android、macOS下构建。 ## 详细信息链接 osgPotree 项目的详细功能特性、教程于设计文档,请访问以下链接获取。本代码库则提供了用于构建该库的全部源代码及编译支持。 * [osgPotree] https://blog.csdn.net/CPWWHSU/article/details/157363010 * [pointCloudExtractor] https://blog.csdn.net/CPWWHSU/article/details/157363010 ## osgPotree 构建快速指南 ### 环境准备: * 必要: 支持 C++11 标准的编译器,例如 g++ 4.8.1 或更高版本、Clang 3.3 或更高版本、Visual Studio 2017 或更高版本。 * 必要: [CMake](https://www.cmake.org) 3.7或以后。 * 必要: [OpenSceneGraph](https://github.com/openscenegraph/OpenSceneGraph.git) 3.4.0及以后。 以上列出的依赖版本均为经验证可用的版本,因此被设定为当前的最低要求。使用更早的版本进行构建也有可能成功。若您使用更旧的版本成功完成构建,请告知我们,以便更新版本信息。 ### 命令行编译指南: 在源码目录中构建并安装osgPotree 库,以windows 11下为例,首先将编译好的OSG库(https://pan.baidu.com/s/1vi3SUza6KZVsL77H0X699Q?pwd=qtpj)下载到本地并解压到当前文件夹,接着在当前文件夹下运行如下命令(cmd not powershell): git clone https://gitee.com/osg_opensource/osg-potree.git cd osg-potree cmake . -DCMAKE_BUILD_TYPE=Release -DTHIRD_PARTY_DIR=..\OSG_INSTALL -DCMAKE_INSTALL_PREFIX=../OSG_INSTALL cmake --build . -j 16 -t install --config Release ## 特性 ### 大体量点云显示: osgviewer ./assets/PointExtractor.potree ### 局部点云提取: pointCloudExtractor --potree ./assets/PointExtractor --cubepath ./assets/PointExtractor/box.txt --outpath ./assets/PointExtractor/out.txt