8 #include <pybind11/pybind11.h>
9 #include <pybind11/stl.h>
10 #include <pybind11/stl_bind.h>
15 #include "../casters.h"
18 using namespace pybind11::literals;
22 py::class_<ccSubMesh, ccGenericMesh>(m,
"ccSubMesh")
23 .def(py::init<ccMesh *>(),
"parentMesh"_a)
28 .def(
"addTriangleIndex",
31 .def(
"addTriangleIndex",
38 .def(
"getAssociatedMesh",
40 .def(
"setAssociatedMesh",
43 "unlinkPreviousOne"_a =
true)
void define_ccSubMesh(py::module &m)
void setAssociatedMesh(ccMesh *mesh, bool unlinkPreviousOne=true)
Sets the associated mesh.
void clear(bool releaseMemory)
Clears the mesh.
unsigned getTriGlobalIndex(unsigned localIndex) const
void forwardIterator()
Forwards the local element iterator.
bool resize(size_t n)
Presets the size of the vector used to store triangle references.
bool reserve(size_t n)
Reserves some memory for hosting the triangle references.
unsigned getCurrentTriGlobalIndex() const
Returns the global index of the triangle pointed by the current element.
void setTriangleIndex(unsigned localIndex, unsigned globalIndex)
Sets global index for a given element.
bool addTriangleIndex(unsigned globalIndex)
Triangle global index insertion mechanism.
ccMesh * getAssociatedMesh()
Returns the associated mesh.