1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-03 07:27:11 +02:00

Improve the Vector4 registration code to avoid using overloads where not necessary.

Also restructured the registration code a bit.
This commit is contained in:
Sandu Liviu Catalin
2016-07-25 00:28:37 +03:00
parent 2857e0e4be
commit d30e1210ac
2 changed files with 99 additions and 56 deletions

View File

@ -272,37 +272,42 @@ struct Vector4
/* --------------------------------------------------------------------------------------------
* Set all components to the specified scalar value.
*/
void Set(Value ns);
/* --------------------------------------------------------------------------------------------
* Set all components to the specified values.
*/
void Set(Value nx, Value ny, Value nz);
/* --------------------------------------------------------------------------------------------
* Set all components to the specified values.
*/
void Set(Value nx, Value ny, Value nz, Value nw);
void SetScalar(Value ns);
/* --------------------------------------------------------------------------------------------
* Copy the values from another instance of this type.
*/
void Set(const Vector4 & v);
void SetVector4(const Vector4 & v);
/* --------------------------------------------------------------------------------------------
* Set all components to the specified values.
*/
void SetVector4Ex(Value nx, Value ny, Value nz, Value nw);
/* --------------------------------------------------------------------------------------------
* Copy the values from a three-dimensional vector.
*/
void Set(const Vector3 & v);
void SetVector3(const Vector3 & v);
/* --------------------------------------------------------------------------------------------
* Set all components to the specified values.
*/
void SetVector3Ex(Value nx, Value ny, Value nz);
/* --------------------------------------------------------------------------------------------
* Copy the values from a quaternion rotation.
*/
void Set(const Quaternion & q);
void SetQuaternion(const Quaternion & q);
/* --------------------------------------------------------------------------------------------
* Copy the values from a quaternion rotation.
*/
void SetQuaternionEx(Value nx, Value ny, Value nz, Value nw);
/* --------------------------------------------------------------------------------------------
* Set the values extracted from the specified string using the specified delimiter.
*/
void Set(CSStr values, SQChar delim);
void SetStr(CSStr values, SQChar delim);
/* --------------------------------------------------------------------------------------------
* Generate random values for all components of this instance.