|
|
|
@ -39,14 +39,13 @@ template<UnsignedInt dimensions, class T> struct PyDrawable: SceneGraph::PyFeatu |
|
|
|
explicit PyDrawable(SceneGraph::AbstractObject<dimensions, T>& object, SceneGraph::DrawableGroup<dimensions, T>* drawables): SceneGraph::PyFeature<SceneGraph::Drawable<dimensions, T>>{object, drawables} {} |
|
|
|
explicit PyDrawable(SceneGraph::AbstractObject<dimensions, T>& object, SceneGraph::DrawableGroup<dimensions, T>* drawables): SceneGraph::PyFeature<SceneGraph::Drawable<dimensions, T>>{object, drawables} {} |
|
|
|
|
|
|
|
|
|
|
|
void draw(const MatrixTypeFor<dimensions, T>& transformationMatrix, SceneGraph::Camera<dimensions, T>& camera) override { |
|
|
|
void draw(const MatrixTypeFor<dimensions, T>& transformationMatrix, SceneGraph::Camera<dimensions, T>& camera) override { |
|
|
|
PYBIND11_OVERLOAD_PURE_NAME( |
|
|
|
py::gil_scoped_acquire gil; |
|
|
|
void, |
|
|
|
py::function override = py::get_override(static_cast<const PyDrawable*>(this), "draw"); |
|
|
|
PyDrawable, |
|
|
|
if(!override) { |
|
|
|
"draw", |
|
|
|
py::pybind11_fail("Tried to call pure virtual function \"PyDrawable::draw\""); |
|
|
|
draw, |
|
|
|
} |
|
|
|
transformationMatrix, |
|
|
|
override(transformationMatrix, |
|
|
|
camera |
|
|
|
py::cast(&camera, py::return_value_policy::reference)); |
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|