Now all Variant math types are structs.

This commit is contained in:
Relintai 2022-08-16 22:09:26 +02:00
parent e71e3ed897
commit 9e1588160f
16 changed files with 19 additions and 25 deletions

View File

@ -41,8 +41,7 @@
class Variant;
class _NO_DISCARD_CLASS_ AABB {
public:
struct _NO_DISCARD_CLASS_ AABB {
Vector3 position;
Vector3 size;

View File

@ -34,8 +34,7 @@
#include "core/math/vector3.h"
#include "core/math/vector3i.h"
class _NO_DISCARD_CLASS_ Basis {
public:
struct _NO_DISCARD_CLASS_ Basis {
Vector3 rows[3] = {
Vector3(1, 0, 0),
Vector3(0, 1, 0),

View File

@ -35,8 +35,7 @@
#include "core/math/transform.h"
#include "core/math/vector3.h"
class _NO_DISCARD_CLASS_ Face3 {
public:
struct _NO_DISCARD_CLASS_ Face3 {
enum Side {
SIDE_OVER,
SIDE_UNDER,

View File

@ -34,8 +34,7 @@
class Variant;
class _NO_DISCARD_CLASS_ Plane {
public:
struct _NO_DISCARD_CLASS_ Plane {
Vector3 normal;
real_t d;

View File

@ -37,13 +37,13 @@
#include "core/vector.h"
class Array;
class AABB;
class Plane;
struct AABB;
struct Plane;
struct Rect2;
class Transform;
struct Transform;
struct Vector2;
struct Projection {
struct _NO_DISCARD_CLASS_ Projection {
enum Planes {
PLANE_NEAR,
PLANE_FAR,

View File

@ -35,8 +35,7 @@
#include "core/math/vector3.h"
#include "core/ustring.h"
class _NO_DISCARD_CLASS_ Quaternion {
public:
struct _NO_DISCARD_CLASS_ Quaternion {
union {
struct {
real_t x;

View File

@ -36,8 +36,7 @@
#include "core/math/vector3i.h"
#include "core/pool_vector.h"
class _NO_DISCARD_CLASS_ Transform {
public:
struct _NO_DISCARD_CLASS_ Transform {
Basis basis;
Vector3 origin;

View File

@ -45,7 +45,7 @@
// several frames may occur between each physics tick, which will make it cheaper
// than performing every frame.
class Transform;
struct Transform;
class TransformInterpolator {
public:

View File

@ -33,7 +33,7 @@
#include "core/math/math_funcs.h"
#include "core/ustring.h"
class Basis;
struct Basis;
struct _NO_DISCARD_CLASS_ Vector3 {
static const int AXIS_COUNT = 3;

View File

@ -72,7 +72,7 @@ class Spatial;
class SpinBox;
class TextureRect;
class ToolButton;
class Transform;
struct Transform;
class Tree;
class TreeItem;
class UndoRedo;

View File

@ -77,7 +77,7 @@ class Script;
class ScriptCreateDialog;
class Texture;
class ToolButton;
class Transform;
struct Transform;
class UndoRedo;
class EditorInterface : public Node {

View File

@ -63,7 +63,7 @@
#include "scene/resources/texture.h"
class Container;
class Transform;
struct Transform;
void InspectorDock::_menu_option(int p_option) {
switch (p_option) {

View File

@ -50,7 +50,7 @@ class EditorPath;
class LineEdit;
class MenuButton;
class ToolButton;
class Transform;
struct Transform;
class InspectorDock : public VBoxContainer {
GDCLASS(InspectorDock, VBoxContainer);

View File

@ -90,7 +90,7 @@ class LineEdit;
class MenuButton;
class OptionButton;
class PanelContainer;
class Plane;
struct Plane;
class PopupMenu;
class SkinReference;
class TriangleMesh;

View File

@ -50,7 +50,7 @@
class Camera;
class Spatial;
class Timer;
class Transform;
struct Transform;
class Timer;
class EditorSpatialGizmo : public SpatialGizmo {

View File

@ -42,7 +42,7 @@
#include "portal_tracer.h"
#include "portal_types.h"
class Transform;
struct Transform;
struct VSStatic {
// the lifetime of statics is not strictly monitored like moving objects