8 #include <pybind11/pybind11.h>
9 #include <pybind11/stl.h>
10 #include <pybind11/stl_bind.h>
16 #include "../casters.h"
19 using namespace pybind11::literals;
23 py::class_<ccDisc, ccGenericPrimitive>(m,
"ccDisc", R
"doc(
30 radius : PointCoordinateType
32 transMat : ccGLMatrix, optional
33 optional 3D transformation (can be set afterwards with ccDrawableObject::setGLTransformation)
34 name : str, default: "Disc"
35 name of the disc object
36 precision : int, default: 72
37 drawing precision (angular step = 360/precision)
44 disc = pycc.ccDisc(5.0)
45 disc2 = pycc.ccDisc(radius=10.0, precision=64, name="MyDisc")
48 py::init<PointCoordinateType, const ccGLMatrix *, QString, unsigned>(),
50 "transMat"_a =
nullptr,
51 "name"_a = QString(
"Disc"),
53 .def(py::init<QString>(),
"name"_a = QString(
"Disc"))
55 Returns the radius of the disc.
60 The radius of the disc.
63 Sets the radius of the disc.
67 radius : PointCoordinateType
72 This changes the primitive content (calls ccGenericPrimitive::updateRepresentation).
82 A new disc object that is a copy of this disc.
84 py::return_value_policy::take_ownership);
void define_ccDisc(py::module &m)
PointCoordinateType getRadius() const
Returns radius.
void setRadius(PointCoordinateType radius)
Sets radius.
ccGenericPrimitive * clone() const override
Clones primitive.
static const unsigned DEFAULT_DRAWING_PRECISION
Default drawing precision.