Skip to content

Feature: add a PDAL plugin #1763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ option(F3D_PLUGIN_BUILD_ASSIMP "Assimp plugin (FBX, OFF, DAE, DXF, X and 3MF fil
option(F3D_PLUGIN_BUILD_DRACO "Draco plugin (DRC files)" OFF)
option(F3D_PLUGIN_BUILD_EXODUS "ExodusII plugin (EX2 files)" ON)
option(F3D_PLUGIN_BUILD_OCCT "OpenCASCADE plugin (STEP and IGES files)" OFF)
option(F3D_PLUGIN_BUILD_PDAL "PDAL plugin (Point cloud files)" OFF)
option(F3D_PLUGIN_BUILD_USD "Universal Scene Description plugin (USD files)" OFF)
option(F3D_PLUGIN_BUILD_VDB "VDB plugin, using OpenVDB (VDB files)" OFF)

Expand All @@ -28,6 +29,10 @@ if (F3D_PLUGIN_BUILD_OCCT)
add_subdirectory(occt)
endif()

if (F3D_PLUGIN_BUILD_PDAL)
add_subdirectory(pdal)
endif()

if (F3D_PLUGIN_BUILD_USD)
add_subdirectory(usd)
endif()
Expand Down
33 changes: 33 additions & 0 deletions plugins/pdal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.19)

project(f3d-plugin-pdal)

include(GNUInstallDirs)

# Check if the plugin is built externally
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
find_package(f3d REQUIRED COMPONENTS pluginsdk)
else()
include(${CMAKE_SOURCE_DIR}/cmake/f3dPlugin.cmake)
endif()

message(STATUS "[Gapry][PoC] Plugin: PDAL found")

f3d_plugin_init()

f3d_plugin_declare_reader(
NAME PDAL
EXTENSIONS bpf matlab npy pgpointcloud tiledb
MIMETYPES
VTK_IMPORTER vtkF3DPDALReader
FORMAT_DESCRIPTION "Point Cloud Data"
)

f3d_plugin_build(
NAME pdal
VERSION 1.0
DESCRIPTION "PDAL support"
VTK_MODULES IOPDAL
FREEDESKTOP
)

13 changes: 13 additions & 0 deletions plugins/pdal/module/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set(classes
vtkF3DPDALReader
)

vtk_module_add_module(f3d::vtkF3DPDALReader
FORCE_STATIC
CLASSES ${classes})

vtk_module_link(f3d::vtkF3DPDALReader PRIVATE ${PXR_LIBRARIES})

vtk_module_include(f3d::vtkF3DPDALReader PRIVATE ${PXR_INCLUDE_DIRS})

vtk_module_set_properties(f3d::vtkF3DPDALReader CXX_STANDARD 17)
6 changes: 6 additions & 0 deletions plugins/pdal/module/vtk.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
NAME
f3d::vtkextPDAL
DESCRIPTION
A VTK module for the PDAL plugin
DEPENDS
VTK::IOPDAL
1 change: 1 addition & 0 deletions plugins/pdal/module/vtkF3DPDALReader.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "vtkF3DPDALReader.h"
11 changes: 11 additions & 0 deletions plugins/pdal/module/vtkF3DPDALReader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef vtkF3DPDALReader_h
#define vtkF3DPDALReader_h

#include "vtkPDALReader";

class vtkF3DPDALReader : public vtkPDALReader {
public:

};

#endif
Loading