general: Mark many constructors as `explicit`

Closes #1514
Fixes #1431
This commit is contained in:
WMOkiishi 2023-08-02 08:17:24 +02:00 committed by rdb
parent b6c427f2b4
commit ea84547805
54 changed files with 197 additions and 180 deletions

View File

@ -23,10 +23,14 @@
class EXPCL_DTOOL_PRC ConfigVariableBool : public ConfigVariable {
PUBLISHED:
INLINE explicit ConfigVariableBool(const std::string &name);
INLINE ConfigVariableBool(const std::string &name, bool default_value,
const std::string &description = std::string(), int flags = 0);
INLINE ConfigVariableBool(const std::string &name, const std::string &default_value,
const std::string &description = std::string(), int flags = 0);
INLINE explicit ConfigVariableBool(const std::string &name,
bool default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableBool(const std::string &name,
const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE void operator = (bool value);
ALWAYS_INLINE operator bool () const;

View File

@ -24,12 +24,14 @@
class EXPCL_DTOOL_PRC ConfigVariableDouble : public ConfigVariable {
PUBLISHED:
INLINE explicit ConfigVariableDouble(const std::string &name);
INLINE ConfigVariableDouble(const std::string &name, double default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE ConfigVariableDouble(const std::string &name, const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableDouble(const std::string &name,
double default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableDouble(const std::string &name,
const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE void operator = (double value);
INLINE operator double () const;

View File

@ -27,8 +27,10 @@
class EXPCL_DTOOL_PRC ConfigVariableFilename : public ConfigVariable {
PUBLISHED:
INLINE explicit ConfigVariableFilename(const std::string &name);
INLINE ConfigVariableFilename(const std::string &name, const Filename &default_value,
const std::string &description = std::string(), int flags = 0);
INLINE explicit ConfigVariableFilename(const std::string &name,
const Filename &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE void operator = (const Filename &value);
INLINE operator const Filename &() const;

View File

@ -24,12 +24,14 @@
class EXPCL_DTOOL_PRC ConfigVariableInt : public ConfigVariable {
PUBLISHED:
INLINE explicit ConfigVariableInt(const std::string &name);
INLINE ConfigVariableInt(const std::string &name, int default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE ConfigVariableInt(const std::string &name, const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableInt(const std::string &name,
int default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableInt(const std::string &name,
const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE void operator = (int value);
INLINE operator int () const;

View File

@ -25,12 +25,14 @@
class EXPCL_DTOOL_PRC ConfigVariableInt64 : public ConfigVariable {
PUBLISHED:
INLINE explicit ConfigVariableInt64(const std::string &name);
INLINE ConfigVariableInt64(const std::string &name, int64_t default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE ConfigVariableInt64(const std::string &name, const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableInt64(const std::string &name,
int64_t default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableInt64(const std::string &name,
const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE void operator = (int64_t value);
INLINE operator int64_t () const;

View File

@ -30,9 +30,9 @@
*/
class EXPCL_DTOOL_PRC ConfigVariableList : public ConfigVariableBase {
PUBLISHED:
INLINE ConfigVariableList(const std::string &name,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableList(const std::string &name,
const std::string &description = std::string(),
int flags = 0);
INLINE ~ConfigVariableList();
INLINE size_t get_num_values() const;

View File

@ -35,17 +35,17 @@
*/
class EXPCL_DTOOL_PRC ConfigVariableSearchPath : public ConfigVariableBase {
PUBLISHED:
INLINE ConfigVariableSearchPath(const std::string &name,
const std::string &description = std::string(),
int flags = 0);
INLINE ConfigVariableSearchPath(const std::string &name,
const DSearchPath &default_value,
const std::string &description,
int flags = 0);
INLINE ConfigVariableSearchPath(const std::string &name,
const std::string &default_value,
const std::string &description,
int flags = 0);
INLINE explicit ConfigVariableSearchPath(const std::string &name,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableSearchPath(const std::string &name,
const DSearchPath &default_value,
const std::string &description,
int flags = 0);
INLINE explicit ConfigVariableSearchPath(const std::string &name,
const std::string &default_value,
const std::string &description,
int flags = 0);
INLINE ~ConfigVariableSearchPath();
INLINE operator DSearchPath () const;

View File

@ -22,9 +22,11 @@
*/
class EXPCL_DTOOL_PRC ConfigVariableString : public ConfigVariable {
PUBLISHED:
INLINE ConfigVariableString(const std::string &name);
INLINE ConfigVariableString(const std::string &name, const std::string &default_value,
const std::string &description = std::string(), int flags = 0);
INLINE explicit ConfigVariableString(const std::string &name);
INLINE explicit ConfigVariableString(const std::string &name,
const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE void operator = (const std::string &value);
INLINE operator const std::string & () const;

View File

@ -28,10 +28,10 @@
class EXPCL_PANDABULLET BulletContactCallbackData : public CallbackData {
PUBLISHED:
INLINE BulletContactCallbackData(BulletManifoldPoint &mp,
PandaNode *node0, PandaNode *node1,
int id0, int id1,
int index0, int index1);
INLINE explicit BulletContactCallbackData(BulletManifoldPoint &mp,
PandaNode *node0, PandaNode *node1,
int id0, int id1,
int index0, int index1);
INLINE BulletManifoldPoint &get_manifold() const;
INLINE PandaNode *get_node0() const;

View File

@ -26,7 +26,7 @@
class EXPCL_PANDABULLET BulletTickCallbackData : public CallbackData {
PUBLISHED:
INLINE BulletTickCallbackData(btScalar timestep);
INLINE explicit BulletTickCallbackData(btScalar timestep);
INLINE PN_stdfloat get_timestep() const;

View File

@ -31,7 +31,7 @@ protected:
AnimChannelScalarTable(AnimGroup *parent, const AnimChannelScalarTable &copy);
PUBLISHED:
AnimChannelScalarTable(AnimGroup *parent, const std::string &name);
explicit AnimChannelScalarTable(AnimGroup *parent, const std::string &name);
public:
virtual bool has_changed(int last_frame, double last_frac,

View File

@ -28,7 +28,7 @@
*/
class EXPCL_PANDA_DEVICE InputDeviceNode : public DataNode {
PUBLISHED:
InputDeviceNode(InputDevice *device, const std::string &name);
explicit InputDeviceNode(InputDevice *device, const std::string &name);
public:
void set_device(InputDevice *device);

View File

@ -25,7 +25,7 @@ class EXPCL_PANDA_DOWNLOADER HTTPEntityTag {
PUBLISHED:
INLINE HTTPEntityTag();
HTTPEntityTag(const std::string &text);
INLINE HTTPEntityTag(bool weak, const std::string &tag);
INLINE explicit HTTPEntityTag(bool weak, const std::string &tag);
INLINE HTTPEntityTag(const HTTPEntityTag &copy);
INLINE void operator = (const HTTPEntityTag &copy);

View File

@ -48,26 +48,26 @@ class EXPCL_PANDA_GOBJ GeomVertexArrayFormat final : public TypedWritableReferen
PUBLISHED:
GeomVertexArrayFormat();
GeomVertexArrayFormat(const GeomVertexArrayFormat &copy);
GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
NumericType numeric_type0, Contents contents0);
GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
NumericType numeric_type0, Contents contents0,
CPT_InternalName name1, int num_components1,
NumericType numeric_type1, Contents contents1);
GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
NumericType numeric_type0, Contents contents0,
CPT_InternalName name1, int num_components1,
NumericType numeric_type1, Contents contents1,
CPT_InternalName name2, int num_components2,
NumericType numeric_type2, Contents contents2);
GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
NumericType numeric_type0, Contents contents0,
CPT_InternalName name1, int num_components1,
NumericType numeric_type1, Contents contents1,
CPT_InternalName name2, int num_components2,
NumericType numeric_type2, Contents contents2,
CPT_InternalName name3, int num_components3,
NumericType numeric_type3, Contents contents3);
explicit GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
NumericType numeric_type0, Contents contents0);
explicit GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
NumericType numeric_type0, Contents contents0,
CPT_InternalName name1, int num_components1,
NumericType numeric_type1, Contents contents1);
explicit GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
NumericType numeric_type0, Contents contents0,
CPT_InternalName name1, int num_components1,
NumericType numeric_type1, Contents contents1,
CPT_InternalName name2, int num_components2,
NumericType numeric_type2, Contents contents2);
explicit GeomVertexArrayFormat(CPT_InternalName name0, int num_components0,
NumericType numeric_type0, Contents contents0,
CPT_InternalName name1, int num_components1,
NumericType numeric_type1, Contents contents1,
CPT_InternalName name2, int num_components2,
NumericType numeric_type2, Contents contents2,
CPT_InternalName name3, int num_components3,
NumericType numeric_type3, Contents contents3);
void operator = (const GeomVertexArrayFormat &copy);
~GeomVertexArrayFormat();

View File

@ -46,22 +46,22 @@
*/
class EXPCL_PANDA_GOBJ GeomVertexReader : public GeomEnums {
PUBLISHED:
INLINE GeomVertexReader(Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexReader(Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexReader(CPT(GeomVertexData) vertex_data,
Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexReader(CPT(GeomVertexData) vertex_data,
CPT_InternalName name,
Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexReader(CPT(GeomVertexData) vertex_data,
CPT_InternalName name,
Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexReader(CPT(GeomVertexArrayData) array_data,
Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexReader(CPT(GeomVertexArrayData) array_data,
int column,
Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexReader(CPT(GeomVertexArrayData) array_data,
int column,
Thread *current_thread = Thread::get_current_thread());
public:
INLINE GeomVertexReader(const GeomVertexDataPipelineReader *data_reader,
const InternalName *name,
bool force = true);
INLINE explicit GeomVertexReader(const GeomVertexDataPipelineReader *data_reader,
const InternalName *name,
bool force = true);
PUBLISHED:
INLINE GeomVertexReader(const GeomVertexReader &copy);

View File

@ -32,14 +32,14 @@
*/
class EXPCL_PANDA_GOBJ GeomVertexRewriter : public GeomVertexWriter, public GeomVertexReader {
PUBLISHED:
INLINE GeomVertexRewriter(Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexRewriter(Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexRewriter(GeomVertexData *vertex_data, Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexRewriter(GeomVertexData *vertex_data,
CPT_InternalName name,
Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexRewriter(GeomVertexData *vertex_data,
CPT_InternalName name,
Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexRewriter(GeomVertexArrayData *array_data, Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexRewriter(GeomVertexArrayData *array_data,
int column, Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexRewriter(GeomVertexArrayData *array_data,
int column, Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexRewriter(const GeomVertexRewriter &copy);
INLINE void operator = (const GeomVertexRewriter &copy);
INLINE ~GeomVertexRewriter();

View File

@ -54,21 +54,21 @@
*/
class EXPCL_PANDA_GOBJ GeomVertexWriter : public GeomEnums {
PUBLISHED:
INLINE GeomVertexWriter(Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexWriter(Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexWriter(PT(GeomVertexData) vertex_data,
Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexWriter(PT(GeomVertexData) vertex_data,
CPT_InternalName name,
Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexWriter(PT(GeomVertexData) vertex_data,
CPT_InternalName name,
Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexWriter(PT(GeomVertexArrayData) array_data,
Thread *current_thread = Thread::get_current_thread());
INLINE GeomVertexWriter(PT(GeomVertexArrayData) array_data,
int column,
Thread *current_thread = Thread::get_current_thread());
INLINE explicit GeomVertexWriter(PT(GeomVertexArrayData) array_data,
int column,
Thread *current_thread = Thread::get_current_thread());
public:
INLINE GeomVertexWriter(GeomVertexDataPipelineWriter *data_writer,
const InternalName *name);
INLINE explicit GeomVertexWriter(GeomVertexDataPipelineWriter *data_writer,
const InternalName *name);
PUBLISHED:
INLINE GeomVertexWriter(const GeomVertexWriter &copy);

View File

@ -28,7 +28,7 @@ protected:
INLINE ParamTextureSampler() {};
PUBLISHED:
INLINE ParamTextureSampler(Texture *tex, const SamplerState &sampler);
INLINE explicit ParamTextureSampler(Texture *tex, const SamplerState &sampler);
INLINE virtual TypeHandle get_value_type() const;
INLINE Texture *get_texture() const;
@ -89,7 +89,7 @@ protected:
};
PUBLISHED:
INLINE ParamTextureImage(Texture *tex, bool read, bool write, int z=-1, int n=0);
INLINE explicit ParamTextureImage(Texture *tex, bool read, bool write, int z=-1, int n=0);
INLINE virtual TypeHandle get_value_type() const;

View File

@ -32,16 +32,16 @@
class EXPCL_PANDA_GOBJ TransformBlend {
PUBLISHED:
INLINE TransformBlend();
INLINE TransformBlend(const VertexTransform *transform0, PN_stdfloat weight0);
INLINE TransformBlend(const VertexTransform *transform0, PN_stdfloat weight0,
const VertexTransform *transform1, PN_stdfloat weight1);
INLINE TransformBlend(const VertexTransform *transform0, PN_stdfloat weight0,
const VertexTransform *transform1, PN_stdfloat weight1,
const VertexTransform *transform2, PN_stdfloat weight2);
INLINE TransformBlend(const VertexTransform *transform0, PN_stdfloat weight0,
const VertexTransform *transform1, PN_stdfloat weight1,
const VertexTransform *transform2, PN_stdfloat weight2,
const VertexTransform *transform3, PN_stdfloat weight3);
INLINE explicit TransformBlend(const VertexTransform *transform0, PN_stdfloat weight0);
INLINE explicit TransformBlend(const VertexTransform *transform0, PN_stdfloat weight0,
const VertexTransform *transform1, PN_stdfloat weight1);
INLINE explicit TransformBlend(const VertexTransform *transform0, PN_stdfloat weight0,
const VertexTransform *transform1, PN_stdfloat weight1,
const VertexTransform *transform2, PN_stdfloat weight2);
INLINE explicit TransformBlend(const VertexTransform *transform0, PN_stdfloat weight0,
const VertexTransform *transform1, PN_stdfloat weight1,
const VertexTransform *transform2, PN_stdfloat weight2,
const VertexTransform *transform3, PN_stdfloat weight3);
INLINE TransformBlend(const TransformBlend &copy);
INLINE void operator = (const TransformBlend &copy);
INLINE ~TransformBlend();

View File

@ -34,13 +34,15 @@
*/
class EXPCL_PANDA_LINMATH ConfigVariableColor : public ConfigVariable {
PUBLISHED:
INLINE ConfigVariableColor(const std::string &name);
INLINE ConfigVariableColor(const std::string &name, const LColor &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE ConfigVariableColor(const std::string &name, const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableColor(const std::string &name);
INLINE explicit ConfigVariableColor(const std::string &name,
const LColor &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE explicit ConfigVariableColor(const std::string &name,
const std::string &default_value,
const std::string &description = std::string(),
int flags = 0);
INLINE void operator = (const LColor &value);
INLINE operator const LColor & () const;

View File

@ -72,7 +72,8 @@ PUBLISHED:
// Construct a 4x4 matrix given a 3x3 rotation matrix and an optional
// translation component.
INLINE_LINMATH FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix3) &upper3);
INLINE_LINMATH FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix3) &upper3,const FLOATNAME(LVecBase3) &trans);
INLINE_LINMATH explicit FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix3) &upper3,
const FLOATNAME(LVecBase3) &trans);
INLINE_LINMATH void fill(FLOATTYPE fill_value);
INLINE_LINMATH void set(FLOATTYPE e00, FLOATTYPE e01, FLOATTYPE e02, FLOATTYPE e03,

View File

@ -21,9 +21,9 @@ PUBLISHED:
INLINE_LINMATH FLOATNAME(LOrientation)();
INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LQuaternion) &c);
INLINE_LINMATH FLOATNAME(LOrientation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k);
INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LVector3) &point_at, FLOATTYPE twist);
INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix3) &m);
INLINE_LINMATH FLOATNAME(LOrientation)(const FLOATNAME(LMatrix4) &m);
INLINE_LINMATH explicit FLOATNAME(LOrientation)(const FLOATNAME(LVector3) &point_at, FLOATTYPE twist);
INLINE_LINMATH explicit FLOATNAME(LOrientation)(const FLOATNAME(LMatrix3) &m);
INLINE_LINMATH explicit FLOATNAME(LOrientation)(const FLOATNAME(LMatrix4) &m);
INLINE_LINMATH FLOATNAME(LOrientation)
operator * (const FLOATNAME(LRotation) &other) const;

View File

@ -24,7 +24,7 @@ PUBLISHED:
INLINE_LINMATH FLOATNAME(LPoint3)(const FLOATNAME(LVecBase3) &copy);
INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
INLINE_LINMATH FLOATNAME(LPoint3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
INLINE_LINMATH explicit FLOATNAME(LPoint3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
PY_EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
PY_EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));

View File

@ -20,7 +20,7 @@ PUBLISHED:
INLINE_LINMATH FLOATNAME(LPoint4)(const FLOATNAME(LVecBase4) &copy);
INLINE_LINMATH FLOATNAME(LPoint4)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LPoint4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);
INLINE_LINMATH FLOATNAME(LPoint4)(const FLOATNAME(LVecBase3) &copy, FLOATTYPE w);
INLINE_LINMATH explicit FLOATNAME(LPoint4)(const FLOATNAME(LVecBase3) &copy, FLOATTYPE w);
PY_EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
PY_EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));

View File

@ -18,7 +18,7 @@ class EXPCL_PANDA_LINMATH FLOATNAME(LQuaternion) : public FLOATNAME(LVecBase4) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LQuaternion)();
INLINE_LINMATH FLOATNAME(LQuaternion)(const FLOATNAME(LVecBase4) &copy);
INLINE_LINMATH FLOATNAME(LQuaternion)(FLOATTYPE r, const FLOATNAME(LVecBase3) &copy);
INLINE_LINMATH explicit FLOATNAME(LQuaternion)(FLOATTYPE r, const FLOATNAME(LVecBase3) &copy);
INLINE_LINMATH FLOATNAME(LQuaternion)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k);
static FLOATNAME(LQuaternion) pure_imaginary(const FLOATNAME(LVector3) &v);

View File

@ -20,10 +20,10 @@ PUBLISHED:
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &c);
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVecBase4) &copy);
INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE r, FLOATTYPE i, FLOATTYPE j, FLOATTYPE k);
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVector3) &axis, FLOATTYPE angle);
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix3) &m);
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix4) &m);
INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE h, FLOATTYPE p, FLOATTYPE r);
INLINE_LINMATH explicit FLOATNAME(LRotation)(const FLOATNAME(LVector3) &axis, FLOATTYPE angle);
INLINE_LINMATH explicit FLOATNAME(LRotation)(const FLOATNAME(LMatrix3) &m);
INLINE_LINMATH explicit FLOATNAME(LRotation)(const FLOATNAME(LMatrix4) &m);
INLINE_LINMATH explicit FLOATNAME(LRotation)(FLOATTYPE h, FLOATTYPE p, FLOATTYPE r);
INLINE_LINMATH FLOATNAME(LRotation) operator * (FLOATTYPE scalar) const;
INLINE_LINMATH FLOATNAME(LRotation) operator / (FLOATTYPE scalar) const;

View File

@ -24,7 +24,7 @@ PUBLISHED:
INLINE_LINMATH FLOATNAME(LVector3)(const FLOATNAME(LVecBase3) &copy);
INLINE_LINMATH FLOATNAME(LVector3)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LVector3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
INLINE_LINMATH FLOATNAME(LVector3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
INLINE_LINMATH explicit FLOATNAME(LVector3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
PY_EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
PY_EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));

View File

@ -20,7 +20,7 @@ PUBLISHED:
INLINE_LINMATH FLOATNAME(LVector4)(const FLOATNAME(LVecBase4) &copy);
INLINE_LINMATH FLOATNAME(LVector4)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LVector4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);
INLINE_LINMATH FLOATNAME(LVector4)(const FLOATNAME(LVecBase3) &copy, FLOATTYPE w);
INLINE_LINMATH explicit FLOATNAME(LVector4)(const FLOATNAME(LVecBase3) &copy, FLOATTYPE w);
PY_EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
PY_EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));

View File

@ -34,12 +34,12 @@ public:
INLINE_MATHUTIL BoundingHexahedron();
PUBLISHED:
BoundingHexahedron(const LFrustum &frustum, bool is_ortho,
CoordinateSystem cs = CS_default);
BoundingHexahedron(const LPoint3 &fll, const LPoint3 &flr,
const LPoint3 &fur, const LPoint3 &ful,
const LPoint3 &nll, const LPoint3 &nlr,
const LPoint3 &nur, const LPoint3 &nul);
explicit BoundingHexahedron(const LFrustum &frustum, bool is_ortho,
CoordinateSystem cs = CS_default);
explicit BoundingHexahedron(const LPoint3 &fll, const LPoint3 &flr,
const LPoint3 &fur, const LPoint3 &ful,
const LPoint3 &nll, const LPoint3 &nlr,
const LPoint3 &nur, const LPoint3 &nul);
public:
ALLOC_DELETED_CHAIN(BoundingHexahedron);

View File

@ -37,7 +37,7 @@ class BamReader;
*/
class EXPCL_PANDA_MOVIES MovieVideo : public TypedWritableReferenceCount, public Namable {
PUBLISHED:
MovieVideo(const std::string &name = "Blank Video");
explicit MovieVideo(const std::string &name = "Blank Video");
virtual ~MovieVideo();
virtual PT(MovieVideoCursor) open();
static PT(MovieVideo) get(const Filename &name);

View File

@ -31,7 +31,7 @@ class UserDataAudioCursor;
class EXPCL_PANDA_MOVIES UserDataAudio : public MovieAudio {
PUBLISHED:
UserDataAudio(int rate, int channels, bool remove_after_read=true);
explicit UserDataAudio(int rate, int channels, bool remove_after_read=true);
virtual ~UserDataAudio();
virtual PT(MovieAudioCursor) open();

View File

@ -33,8 +33,8 @@ public:
OdeAMotorJoint(dJointID id);
PUBLISHED:
OdeAMotorJoint(OdeWorld &world);
OdeAMotorJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeAMotorJoint(OdeWorld &world);
explicit OdeAMotorJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdeAMotorJoint();
INLINE void set_num_axes(int num);

View File

@ -33,8 +33,8 @@ public:
OdeBallJoint(dJointID id);
PUBLISHED:
OdeBallJoint(OdeWorld &world);
OdeBallJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeBallJoint(OdeWorld &world);
explicit OdeBallJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdeBallJoint();
INLINE void set_anchor(dReal x, dReal y, dReal z);

View File

@ -38,7 +38,7 @@ public:
OdeBody(dBodyID id);
PUBLISHED:
OdeBody(OdeWorld &world);
explicit OdeBody(OdeWorld &world);
virtual ~OdeBody();
void destroy();
INLINE bool is_empty() const;

View File

@ -32,8 +32,8 @@ public:
PUBLISHED:
OdeBoxGeom(dReal lx, dReal ly, dReal lz);
OdeBoxGeom(OdeSpace &space, dReal lx, dReal ly, dReal lz);
OdeBoxGeom(OdeSpace &space, const LVecBase3f &size);
explicit OdeBoxGeom(OdeSpace &space, dReal lx, dReal ly, dReal lz);
explicit OdeBoxGeom(OdeSpace &space, const LVecBase3f &size);
virtual ~OdeBoxGeom();
INLINE void set_lengths(dReal lx, dReal ly, dReal lz);

View File

@ -31,8 +31,8 @@ public:
OdeCappedCylinderGeom(dGeomID id);
PUBLISHED:
OdeCappedCylinderGeom(dReal radius, dReal length);
OdeCappedCylinderGeom(OdeSpace &space, dReal radius, dReal length);
explicit OdeCappedCylinderGeom(dReal radius, dReal length);
explicit OdeCappedCylinderGeom(OdeSpace &space, dReal radius, dReal length);
virtual ~OdeCappedCylinderGeom();
INLINE void set_params(dReal radius, dReal length);

View File

@ -34,8 +34,8 @@ public:
OdeContactJoint(dJointID id);
PUBLISHED:
OdeContactJoint(OdeWorld &world, const OdeContact &contact);
OdeContactJoint(OdeWorld &world, OdeJointGroup &joint_group, const OdeContact &contact);
explicit OdeContactJoint(OdeWorld &world, const OdeContact &contact);
explicit OdeContactJoint(OdeWorld &world, OdeJointGroup &joint_group, const OdeContact &contact);
virtual ~OdeContactJoint();
public:

View File

@ -31,8 +31,8 @@ public:
OdeCylinderGeom(dGeomID id);
PUBLISHED:
OdeCylinderGeom(dReal radius, dReal length);
OdeCylinderGeom(OdeSpace &space, dReal radius, dReal length);
explicit OdeCylinderGeom(dReal radius, dReal length);
explicit OdeCylinderGeom(OdeSpace &space, dReal radius, dReal length);
virtual ~OdeCylinderGeom();
INLINE void set_params(dReal radius, dReal length);

View File

@ -33,8 +33,8 @@ public:
OdeFixedJoint(dJointID id);
PUBLISHED:
OdeFixedJoint(OdeWorld &world);
OdeFixedJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeFixedJoint(OdeWorld &world);
explicit OdeFixedJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdeFixedJoint();
INLINE void set();

View File

@ -32,8 +32,8 @@ public:
OdeHinge2Joint(dJointID id);
PUBLISHED:
OdeHinge2Joint(OdeWorld &world, OdeJointGroup &joint_group);
OdeHinge2Joint(OdeWorld &world);
explicit OdeHinge2Joint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeHinge2Joint(OdeWorld &world);
virtual ~OdeHinge2Joint();
INLINE void set_anchor(dReal x, dReal y, dReal z);

View File

@ -32,8 +32,8 @@ public:
OdeHingeJoint(dJointID id);
PUBLISHED:
OdeHingeJoint(OdeWorld &world);
OdeHingeJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeHingeJoint(OdeWorld &world);
explicit OdeHingeJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdeHingeJoint();
INLINE void set_anchor(dReal x, dReal y, dReal z);

View File

@ -32,8 +32,8 @@ public:
OdeLMotorJoint(dJointID id);
PUBLISHED:
OdeLMotorJoint(OdeWorld &world);
OdeLMotorJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeLMotorJoint(OdeWorld &world);
explicit OdeLMotorJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdeLMotorJoint();
INLINE void set_num_axes(int num);

View File

@ -33,8 +33,8 @@ public:
OdeNullJoint(dJointID id);
PUBLISHED:
OdeNullJoint(OdeWorld &world);
OdeNullJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeNullJoint(OdeWorld &world);
explicit OdeNullJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdeNullJoint();
public:

View File

@ -32,8 +32,8 @@ public:
OdePlane2dJoint(dJointID id);
PUBLISHED:
OdePlane2dJoint(OdeWorld &world);
OdePlane2dJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdePlane2dJoint(OdeWorld &world);
explicit OdePlane2dJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdePlane2dJoint();
INLINE void set_x_param(int parameter, dReal value);

View File

@ -32,8 +32,8 @@ public:
PUBLISHED:
OdePlaneGeom(dReal a, dReal b, dReal c, dReal d);
OdePlaneGeom(const LVecBase4f &params);
OdePlaneGeom(OdeSpace &space, dReal a, dReal b, dReal c, dReal d);
OdePlaneGeom(OdeSpace &space, const LVecBase4f &params);
explicit OdePlaneGeom(OdeSpace &space, dReal a, dReal b, dReal c, dReal d);
explicit OdePlaneGeom(OdeSpace &space, const LVecBase4f &params);
virtual ~OdePlaneGeom();
INLINE void set_params(dReal a, dReal b, dReal c, dReal d);

View File

@ -32,13 +32,13 @@ public:
OdeQuadTreeSpace(dSpaceID id);
PUBLISHED:
OdeQuadTreeSpace(const LPoint3f &center,
const LVecBase3f &extents,
const int depth);
OdeQuadTreeSpace(OdeSpace &space,
const LPoint3f &center,
const LVecBase3f &extents,
const int depth);
explicit OdeQuadTreeSpace(const LPoint3f &center,
const LVecBase3f &extents,
const int depth);
explicit OdeQuadTreeSpace(OdeSpace &space,
const LPoint3f &center,
const LVecBase3f &extents,
const int depth);
virtual ~OdeQuadTreeSpace();
public:

View File

@ -31,7 +31,7 @@ public:
PUBLISHED:
OdeRayGeom(dReal length);
OdeRayGeom(OdeSpace &space, dReal length);
explicit OdeRayGeom(OdeSpace &space, dReal length);
virtual ~OdeRayGeom();
INLINE void set_length(dReal length);

View File

@ -32,8 +32,8 @@ public:
OdeSliderJoint(dJointID id);
PUBLISHED:
OdeSliderJoint(OdeWorld &world);
OdeSliderJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeSliderJoint(OdeWorld &world);
explicit OdeSliderJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdeSliderJoint();
INLINE void set_axis(dReal x, dReal y, dReal z);

View File

@ -31,7 +31,7 @@ public:
PUBLISHED:
OdeSphereGeom(dReal radius);
OdeSphereGeom(OdeSpace &space, dReal radius);
explicit OdeSphereGeom(OdeSpace &space, dReal radius);
OdeSphereGeom(OdeGeom &geom);
virtual ~OdeSphereGeom();

View File

@ -34,8 +34,8 @@ public:
OdeUniversalJoint(dJointID id);
PUBLISHED:
OdeUniversalJoint(OdeWorld &world);
OdeUniversalJoint(OdeWorld &world, OdeJointGroup &joint_group);
explicit OdeUniversalJoint(OdeWorld &world);
explicit OdeUniversalJoint(OdeWorld &world, OdeJointGroup &joint_group);
virtual ~OdeUniversalJoint();
INLINE void set_anchor(dReal x, dReal y, dReal z);

View File

@ -31,7 +31,7 @@
*/
class EXPCL_PANDA_PGRAPHNODES Spotlight : public LightLensNode {
PUBLISHED:
Spotlight(const std::string &name);
explicit Spotlight(const std::string &name);
protected:
Spotlight(const Spotlight &copy);

View File

@ -103,7 +103,7 @@ child_integrate(Physical *physical,
// apply the accumulated torque vector to the object's inertial tensor.
// this matrix represents how much force the object 'wants' applied to it
// in any direction, among other things.
accum_quat = current_object->get_inertial_tensor() * accum_quat;
accum_quat = LRotation(current_object->get_inertial_tensor()) * accum_quat;
// derive this into the angular velocity vector.
LRotation rot_quat = current_object->get_rotation();

View File

@ -118,12 +118,12 @@ PUBLISHED:
INLINE PixelSpec() = default;
PUBLISHED:
INLINE PixelSpec(xelval gray_value);
INLINE PixelSpec(xelval gray_value, xelval alpha);
INLINE explicit PixelSpec(xelval gray_value);
INLINE explicit PixelSpec(xelval gray_value, xelval alpha);
INLINE PixelSpec(xelval red, xelval green, xelval blue);
INLINE PixelSpec(xelval red, xelval green, xelval blue, xelval alpha);
INLINE PixelSpec(const xel &rgb);
INLINE PixelSpec(const xel &rgb, xelval alpha);
INLINE explicit PixelSpec(const xel &rgb, xelval alpha);
INLINE bool operator < (const PixelSpec &other) const;
INLINE bool operator == (const PixelSpec &other) const;

View File

@ -41,7 +41,7 @@ typedef struct hb_font_t hb_font_t;
class EXPCL_PANDA_TEXT DynamicTextFont : public TextFont, public FreetypeFont {
PUBLISHED:
DynamicTextFont(const Filename &font_filename, int face_index = 0);
DynamicTextFont(const char *font_data, int data_length, int face_index);
explicit DynamicTextFont(const char *font_data, int data_length, int face_index);
DynamicTextFont(const DynamicTextFont &copy);
virtual ~DynamicTextFont();