GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Bind constructor for a struct. · tepGithub/tinyobjloader@7337053

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • python
    • bindings.cc
    • main.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎python/bindings.cc‎

Copy file name to clipboardExpand all lines: python/bindings.cc
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ PYBIND11_MODULE(tinyobjloader, tobj_module)
3535
tobj_module.doc() = "Python bindings for TinyObjLoader.";
3636

3737
// register struct
38+
// py::init<>() for default constructor
3839
py::class_<attrib_t>(tobj_module, "Attrib")
3940
.def(py::init<>());
40-
py::class_<shape_t>(tobj_module, "Shape");
41-
py::class_<material_t>(tobj_module, "Material");
41+
py::class_<shape_t>(tobj_module, "Shape")
42+
.def(py::init<>());
43+
py::class_<material_t>(tobj_module, "Material")
44+
.def(py::init<>());
4245

4346
tobj_module.def("load_obj", &load_obj, "Load wavefront .obj file.");
4447
tobj_module.def("load_mtl", &load_mtl, "Load wavefront material file.");
Collapse file

‎python/main.cpp‎

Copy file name to clipboardExpand all lines: python/main.cpp
-212Lines changed: 0 additions & 212 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.