Expressions: Add Vector API expression functions (#10237)

This commit is contained in:
Daniel-Khodabakhsh
2023-08-15 21:00:16 -07:00
committed by GitHub
parent a49e104993
commit 8003606222
3 changed files with 220 additions and 0 deletions

View File

@@ -271,6 +271,21 @@ public:
TANH,
TRUNC,
// Vector
VANGLE,
VCROSS,
VDOT,
VLINEDIST,
VLINESEGDIST,
VLINEPROJ,
VNORMALIZE,
VPLANEDIST,
VPLANEPROJ,
VSCALE,
VSCALEX,
VSCALEY,
VSCALEZ,
// Matrix
MINVERT, // invert matrix/placement/rotation
MROTATE, // Rotate matrix/placement/rotation around axis, by rotation object, or by euler angles.
@@ -328,6 +343,8 @@ public:
protected:
static Py::Object evalAggregate(const Expression *owner, int type, const std::vector<Expression*> &args);
static Base::Vector3d evaluateSecondVectorArgument(const Expression *expression, const std::vector<Expression*> &arguments);
static double extractLengthValueArgument(const Expression *expression, const std::vector<Expression*> &arguments, int argumentIndex);
static Base::Vector3d extractVectorArgument(const Expression *expression, const std::vector<Expression*> &arguments, int argumentIndex);
static void initialiseObject(const Py::Object *object, const std::vector<Expression*> &arguments, const unsigned long offset = 0);
static Py::Object transformFirstArgument(
const Expression *expression,