Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
63cc152
update polyscope to latest
nmwsharp Apr 2, 2023
de9eee7
update to latest
nmwsharp Apr 3, 2023
2b95f14
update tangent vectors and perms
nmwsharp Apr 3, 2023
e9633d9
add bindings for set_front_dir
nmwsharp Apr 10, 2023
dd4858a
new bindings for up/front/navigate
nmwsharp Apr 10, 2023
9a4ef60
bindings for json view funcs
nmwsharp Apr 10, 2023
b03e88d
begin adding floating quantities
nmwsharp Apr 25, 2023
1ca0b76
factor out common options from quantities
nmwsharp Apr 25, 2023
ac055d6
fix json setter
nmwsharp Apr 25, 2023
fd22990
work on image stuff
nmwsharp May 11, 2023
347478a
update dep
nmwsharp May 11, 2023
cdcc9a9
add bindings for floating quantities
nmwsharp Jun 1, 2023
2255ff0
add ruff
nmwsharp Jun 19, 2023
a3b6e9f
reuse structure code, cam param bindings, cam view bindings
nmwsharp Jun 19, 2023
6a255aa
tests and fixes for camera views
nmwsharp Jun 19, 2023
9b3a660
WIP on floating and cameras
nmwsharp Jul 3, 2023
afe53d7
update dep
nmwsharp Jul 7, 2023
2b58b99
update gitignore
nmwsharp Jul 7, 2023
331baa5
view utils and floating helpers
nmwsharp Jul 7, 2023
3c08678
update dep
nmwsharp Jul 11, 2023
228515c
cleanup args parsing
nmwsharp Jul 11, 2023
4ecf17a
more plumbing to support camera views
nmwsharp Jul 11, 2023
67f5fd8
update deps
nmwsharp Jul 15, 2023
c17712d
bindings for render quantities
nmwsharp Jul 15, 2023
61c3c3d
update dep
nmwsharp Jul 22, 2023
7417efb
bindings for implicit helpers
nmwsharp Jul 22, 2023
b9f60b1
update dep
nmwsharp Jul 26, 2023
c3b4ca1
update dep
nmwsharp Aug 27, 2023
f00401c
minor bindings for camera rays and frame tick
nmwsharp Aug 27, 2023
f804d73
new bindings for managed buffers and raw color render image
nmwsharp Aug 27, 2023
c19ffb2
update deps
nmwsharp Sep 16, 2023
5097d79
update new buffer device updates
nmwsharp Sep 16, 2023
a6b0666
point dep back at main branch
nmwsharp Oct 9, 2023
0905571
add bindings for additional options
nmwsharp Oct 9, 2023
d7d93c5
bind ImGuiIO
nmwsharp Oct 9, 2023
f747261
add get/set background color
nmwsharp Oct 10, 2023
49ea6e6
finish bindings and tests for raw render image
nmwsharp Oct 10, 2023
691b067
bump dep
nmwsharp Oct 11, 2023
2f25424
add bindings
nmwsharp Oct 11, 2023
9042ee1
add bindings
nmwsharp Oct 11, 2023
3f86708
better error messages and checks for buffers
nmwsharp Oct 11, 2023
398fbc3
add additional low-level getters for native buffer access
nmwsharp Oct 11, 2023
e8377e6
fix error messages
nmwsharp Oct 11, 2023
d3ab204
add a few tests
nmwsharp Oct 11, 2023
e4868db
update dep
nmwsharp Oct 14, 2023
664b1f0
overhaul device interop to allow user-defined cuda bindings
nmwsharp Oct 14, 2023
de4bd73
update dep
nmwsharp Oct 16, 2023
08ac646
add bindings for texture mapping surfaces
nmwsharp Oct 16, 2023
fb50bd4
rewrite unreachable code path to silence compiler warning
nmwsharp Oct 16, 2023
8311445
change visibility setting due to symbol visibility errors on osx
nmwsharp Oct 16, 2023
1a88f3b
first person navigation and view matrix
nmwsharp Oct 17, 2023
da4f4c8
update dep
nmwsharp Oct 17, 2023
146c39c
more options for control flow etc
nmwsharp Oct 17, 2023
e8d3d38
update dep
nmwsharp Oct 18, 2023
7256ee7
minor
nmwsharp Oct 18, 2023
898b4d9
remove accidental glm return type
nmwsharp Oct 18, 2023
12cddcd
fix bugs in managed buffers
nmwsharp Oct 18, 2023
b2be28d
update dep
nmwsharp Oct 19, 2023
9513ca5
bind new options
nmwsharp Oct 19, 2023
6696907
optional normals in render image
nmwsharp Oct 19, 2023
46a579a
update dep
nmwsharp Oct 19, 2023
eb2b5e7
WIP adding volume grids
nmwsharp Oct 23, 2023
8e7a4fd
finish volume grid initial implementation
nmwsharp Oct 23, 2023
06ba027
add a few font-related bindings
nmwsharp Oct 27, 2023
01d8a72
Merge branch 'v2' of github.com:nmwsharp/polyscope-py into v2
nmwsharp Oct 29, 2023
5644548
update dep
nmwsharp Oct 29, 2023
f434d87
update to premultiplied
nmwsharp Nov 1, 2023
0997647
add imgui disabled function
nmwsharp Nov 2, 2023
416ceb2
cleanup and bugfixes to buffers
nmwsharp Nov 3, 2023
2d7472f
update dep
nmwsharp Nov 3, 2023
360135a
add imdrawlist bindings
nmwsharp Nov 8, 2023
8e0a3c6
update dep
nmwsharp Nov 20, 2023
26034b2
update dep
nmwsharp Nov 26, 2023
6fe722a
rework Groups API
nmwsharp Nov 26, 2023
9063e38
spelling is hard
nmwsharp Nov 26, 2023
90be869
use float32 types for all interfaces
nmwsharp Nov 26, 2023
b2ab627
update dep
nmwsharp Nov 26, 2023
9569814
bind missing fullscreen compositing setting
nmwsharp Nov 27, 2023
8aaad5b
fix wrong caps in binding
nmwsharp Nov 9, 2023
5dcc6f4
remove minmax defaults
nmwsharp Nov 27, 2023
d3bb56e
custom fonts in imgui demo
nmwsharp Nov 27, 2023
a466b0d
add missing buffer unregister
nmwsharp Nov 27, 2023
5cb57b5
update dep
nmwsharp Nov 27, 2023
4243a2a
small fixes for camera parameters
nmwsharp Nov 27, 2023
f4f0880
bind uv seam and islands
nmwsharp Nov 30, 2023
3ad84d7
add missing mark bindings
nmwsharp Dec 24, 2023
ddfef9f
add missing volume grid bindings, fix data layout order bug
nmwsharp Dec 24, 2023
b5d19cb
more tests
nmwsharp Dec 24, 2023
c9f03b4
update dep
nmwsharp Dec 27, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dist/
*.pyc
__pycache__/
.cache
*.egg-info

# Editor and OS things
imgui.ini
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ pybind11_add_module(polyscope_bindings
src/cpp/point_cloud.cpp
src/cpp/curve_network.cpp
src/cpp/volume_mesh.cpp
src/cpp/volume_grid.cpp
src/cpp/camera_view.cpp
src/cpp/floating_quantities.cpp
src/cpp/implicit_helpers.cpp
src/cpp/managed_buffer.cpp
src/cpp/imgui.cpp
)
set_target_properties(polyscope_bindings PROPERTIES CXX_VISIBILITY_PRESET "default")

target_include_directories(polyscope_bindings PUBLIC "${EIGEN3_INCLUDE_DIR}")
target_link_libraries(polyscope_bindings PRIVATE polyscope)
Expand Down
2 changes: 1 addition & 1 deletion deps/polyscope
Submodule polyscope updated 265 files
10 changes: 10 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Never enforce
# - `E501` line length violations)
# - `E701` statement after colon on same line
ignore = ["E501","E701"]

# Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
[per-file-ignores]
"__init__.py" = ["E402"]
"path/to/file.py" = ["E402"]
49 changes: 49 additions & 0 deletions src/cpp/camera_view.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#include <pybind11/eigen.h>
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>

#include "Eigen/Dense"

#include "polyscope/camera_view.h"
#include "polyscope/polyscope.h"

#include "utils.h"

namespace py = pybind11;
namespace ps = polyscope;


// clang-format off
void bind_camera_view(py::module& m) {

// == Helper quantity classes

// == Main class
bindStructure<ps::CameraView>(m, "CameraView")

// basics
.def("get_camera_parameters", &ps::CameraView::getCameraParameters, "Get camera parameters")
.def("update_camera_parameters", &ps::CameraView::updateCameraParameters, "Update camera parameters")

// options
.def("set_widget_color", &ps::CameraView::setWidgetColor, "Set color")
.def("get_widget_color", &ps::CameraView::getWidgetColor, "Get color")
.def("set_widget_thickness", &ps::CameraView::setWidgetThickness, "Set widget thickness")
.def("get_widget_thickness", &ps::CameraView::getWidgetThickness, "Get widget thickness")
.def("set_widget_focal_length", &ps::CameraView::setWidgetFocalLength, "Set widget focal length")
.def("get_widget_focal_length", &ps::CameraView::getWidgetFocalLength, "Get widget focal length")

// camera controls
.def("set_view_to_this_camera", &ps::CameraView::setViewToThisCamera, "Set view to this camera")
;


// Static adders and getters
m.def("register_camera_view", &ps::registerCameraView,
py::arg("name"), py::arg("parameters"), "Register a camera view", py::return_value_policy::reference);
m.def("remove_camera_view", &ps::removeCameraView, "Remove a camera view by name");
m.def("get_camera_view", &ps::getCameraView, "Get a camera view by name", py::return_value_policy::reference);
m.def("has_camera_view", &ps::hasCameraView, "Check for a camera view by name");

}
// clang-format on
Loading