From 615fb4b1f1cf1b5e5026f0f8208c4d7b3b294bb2 Mon Sep 17 00:00:00 2001 From: Lukas Joergensen Date: Fri, 6 Apr 2018 21:21:05 +0200 Subject: [PATCH] Added some missing field info to the EngineApi interface --- Engine/source/T3D/trigger.cpp | 3 +++ Engine/source/afx/arcaneFX.cpp | 2 ++ Engine/source/console/engineStructs.cpp | 16 ++++++++++++++++ Engine/source/core/util/tVector.h | 3 ++- Engine/source/core/util/uuid.h | 4 ++-- Engine/source/math/mMatrix.h | 2 +- Engine/source/math/mathTypes.cpp | 15 +++++++++++++++ 7 files changed, 41 insertions(+), 4 deletions(-) diff --git a/Engine/source/T3D/trigger.cpp b/Engine/source/T3D/trigger.cpp index 64305314f9..6e68ab799d 100644 --- a/Engine/source/T3D/trigger.cpp +++ b/Engine/source/T3D/trigger.cpp @@ -235,6 +235,9 @@ bool Trigger::castRay(const Point3F &start, const Point3F &end, RayInfo* info) DECLARE_STRUCT( Polyhedron ); IMPLEMENT_STRUCT( Polyhedron, Polyhedron,, "" ) + FIELD(pointList, pointList, 1, "") + FIELD(planeList, planeList, 1, "") + FIELD(edgeList, edgeList, 1, "") END_IMPLEMENT_STRUCT; ConsoleType(floatList, TypeTriggerPolyhedron, Polyhedron, "") diff --git a/Engine/source/afx/arcaneFX.cpp b/Engine/source/afx/arcaneFX.cpp index cec0c870a9..e731564cb6 100644 --- a/Engine/source/afx/arcaneFX.cpp +++ b/Engine/source/afx/arcaneFX.cpp @@ -754,6 +754,8 @@ DefineEngineMethod(NetConnection, ResolveGhost, S32, (int ghostIndex),, IMPLEMENT_STRUCT( ByteRange, ByteRange,, "" ) + FIELD(low, low, 1, "") + FIELD(high, high, 1, "") END_IMPLEMENT_STRUCT; ConsoleType( ByteRange, TypeByteRange, ByteRange, "") diff --git a/Engine/source/console/engineStructs.cpp b/Engine/source/console/engineStructs.cpp index a719220733..064990849c 100644 --- a/Engine/source/console/engineStructs.cpp +++ b/Engine/source/console/engineStructs.cpp @@ -30,24 +30,40 @@ IMPLEMENT_STRUCT( Vector< bool >, BoolVector,, "" ) + FIELD(mElementCount, elementCount, 1, "") + FIELD(mArraySize, arraySize, 1, "") + FIELD(mArray, elements, 1, "") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( Vector< S32 >, IntVector,, "" ) + FIELD(mElementCount, elementCount, 1, "") + FIELD(mArraySize, arraySize, 1, "") + FIELD(mArray, elements, 1, "") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( Vector< F32 >, FloatVector,, "" ) + FIELD(mElementCount, elementCount, 1, "") + FIELD(mArraySize, arraySize, 1, "") + FIELD(mArray, elements, 1, "") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( Torque::UUID, UUID,, "" ) + FIELD(a, a, 1, "") + FIELD(b, b, 1, "") + FIELD(c, c, 1, "") + FIELD(d, d, 1, "") + FIELD(e, e, 1, "") + FIELD(f, f, 6, "") + END_IMPLEMENT_STRUCT; diff --git a/Engine/source/core/util/tVector.h b/Engine/source/core/util/tVector.h index 0280db5f5f..9130770945 100644 --- a/Engine/source/core/util/tVector.h +++ b/Engine/source/core/util/tVector.h @@ -63,11 +63,12 @@ extern bool VectorResize(U32 *aSize, U32 *aCount, void **arrayPtr, U32 newCount, template class Vector { - protected: +public: U32 mElementCount; ///< Number of elements currently in the Vector. U32 mArraySize; ///< Number of elements allocated for the Vector. T* mArray; ///< Pointer to the Vector elements. +protected: #ifdef TORQUE_DEBUG_GUARD const char* mFileAssociation; U32 mLineAssociation; diff --git a/Engine/source/core/util/uuid.h b/Engine/source/core/util/uuid.h index e4ed4153a3..701fb395f2 100644 --- a/Engine/source/core/util/uuid.h +++ b/Engine/source/core/util/uuid.h @@ -36,8 +36,6 @@ namespace Torque public: typedef void Parent; - - protected: U32 a; U16 b; @@ -45,6 +43,8 @@ namespace Torque U8 d; U8 e; U8 f[ 6 ]; + + protected: static UUID smNull; diff --git a/Engine/source/math/mMatrix.h b/Engine/source/math/mMatrix.h index 71a95946b6..9aef66004f 100644 --- a/Engine/source/math/mMatrix.h +++ b/Engine/source/math/mMatrix.h @@ -41,7 +41,7 @@ class MatrixF { -private: +public: F32 m[16]; ///< Note: Torque uses row-major matrices public: diff --git a/Engine/source/math/mathTypes.cpp b/Engine/source/math/mathTypes.cpp index 1d1011d0f8..6ff4263b03 100644 --- a/Engine/source/math/mathTypes.cpp +++ b/Engine/source/math/mathTypes.cpp @@ -88,30 +88,45 @@ END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( RectI, RectI, MathTypes, "" ) + FIELD(point, point, 1, "The XY coordinate of the Rect.") + FIELD(extent, extent, 1, "The width and height of the Rect.") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( RectF, RectF, MathTypes, "" ) + FIELD(point, point, 1, "The XY coordinate of the Rect.") + FIELD(extent, extent, 1, "The width and height of the Rect.") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( MatrixF, MatrixF, MathTypes, "" ) + FIELD(m, m, 16, "16 - element matrix (row-major)") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( AngAxisF, AngAxisF, MathTypes, "" ) + FIELD(axis, axis, 1, "") + FIELD(angle, angle, 1, "") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( TransformF, TransformF, MathTypes, "" ) + FIELD(mPosition, position, 1, "") + FIELD(mOrientation, orientation, 1, "") + FIELD(mHasRotation, hasRotation, 1, "") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( Box3F, Box3F, MathTypes, "" ) + FIELD(minExtents, minExtents, 1, "Minimum extents of box") + FIELD(maxExtents, maxExtents, 1, "Maximum extents of box") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT( EaseF, EaseF, MathTypes, "" ) + FIELD(dir, dir, 1, "inout, in, out") + FIELD(type, type, 1, "linear, etc...") + FIELD(param, param, 2, "optional params") END_IMPLEMENT_STRUCT; IMPLEMENT_STRUCT(RotationF, RotationF, MathTypes,