V3d is a glue class to allow some interaction between Vec3d and the scripting system.
More...
#include <V3d.hpp>
|
Q_INVOKABLE Vec3d | toVec3d () const |
|
Q_INVOKABLE Vec3f | toVec3f () const |
|
Q_INVOKABLE double | x () const |
|
Q_INVOKABLE double | y () const |
|
Q_INVOKABLE double | z () const |
|
Q_INVOKABLE void | set (const double x, const double y, const double z) |
| Sets the components.
|
|
Q_INVOKABLE void | setX (double x) |
| Sets the X component.
|
|
Q_INVOKABLE void | setY (double y) |
| Sets the Y component.
|
|
Q_INVOKABLE void | setZ (double z) |
| Sets the Z component.
|
|
Q_INVOKABLE QString | toString () const |
| Formats a comma-separated string in angle brackets. More...
|
|
Q_INVOKABLE QString | toHex () const |
| Formats a hex string usable as HTML color.
|
|
|
Q_INVOKABLE | V3d (const V3d &other) |
|
V3d & | operator= (const V3d &v) |
|
Q_INVOKABLE | V3d (const double x, const double y, const double z) |
| The usual constructor to create a 3-dimensional vector that can be manipulated in JavaScript.
|
|
Q_INVOKABLE | V3d (const Vec3d &vec) |
| Create a 3-dimensional vector from a Vec3d that can later be manipulated in JavaScript, e.g. More...
|
|
V3d is a glue class to allow some interaction between Vec3d and the scripting system.
Vec3f and Vec3d are not scriptable with the QJSEngine, but an intermediate V3d allows calling slots which require a Vec3f or Vec3d argument by calling like
This is especually helpful if you need to manipulate the V3d's components first. Else you can also just use
◆ V3d()
Q_INVOKABLE V3d::V3d |
( |
const Vec3d & |
vec | ) |
|
|
inline |
Create a 3-dimensional vector from a Vec3d that can later be manipulated in JavaScript, e.g.
◆ toString
Q_INVOKABLE QString V3d::toString |
( |
| ) |
const |
|
inlineslot |
Formats a comma-separated string in angle brackets.
JS print output shows "V3d(address)". Use toVec3d() to show the values formatted by Vec3d's method.
◆ toVec3d
Q_INVOKABLE Vec3d V3d::toVec3d |
( |
| ) |
const |
|
inlineslot |
- Returns
- a Vec3d object which is not directly accessible by scripts but can be used as arguments to other calls.
◆ toVec3f
Q_INVOKABLE Vec3f V3d::toVec3f |
( |
| ) |
const |
|
inlineslot |
- Returns
- a Vec3f object which is not directly accessible by scripts but can be used as arguments to other calls.
Q_INVOKABLE double V3d::x |
( |
| ) |
const |
|
inlineslot |
Q_INVOKABLE double V3d::y |
( |
| ) |
const |
|
inlineslot |
Q_INVOKABLE double V3d::z |
( |
| ) |
const |
|
inlineslot |