summaryrefslogtreecommitdiff
path: root/editor/import/collada.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 13:23:58 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:54:55 +0200
commit0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch)
treea27e497da7104dd0a64f98a04fa3067668735e91 /editor/import/collada.h
parent710b34b70227becdc652b4ae027fe0ac47409642 (diff)
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
Diffstat (limited to 'editor/import/collada.h')
-rw-r--r--editor/import/collada.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/editor/import/collada.h b/editor/import/collada.h
index 187a8092da..02c3277911 100644
--- a/editor/import/collada.h
+++ b/editor/import/collada.h
@@ -44,23 +44,19 @@ public:
};
struct Image {
-
String path;
};
struct Material {
-
String name;
String instance_effect;
};
struct Effect {
-
String name;
Map<String, Variant> params;
struct Channel {
-
int uv_idx = 0;
String texture;
Color color;
@@ -81,7 +77,6 @@ public:
};
struct CameraData {
-
enum Mode {
MODE_PERSPECTIVE,
MODE_ORTHOGONAL
@@ -108,7 +103,6 @@ public:
};
struct LightData {
-
enum Mode {
MODE_AMBIENT,
MODE_DIRECTIONAL,
@@ -131,10 +125,8 @@ public:
};
struct MeshData {
-
String name;
struct Source {
-
Vector<float> array;
int stride;
};
@@ -142,16 +134,13 @@ public:
Map<String, Source> sources;
struct Vertices {
-
Map<String, String> sources;
};
Map<String, Vertices> vertices;
struct Primitives {
-
struct SourceRef {
-
String source;
int offset;
};
@@ -173,12 +162,10 @@ public:
};
struct CurveData {
-
String name;
bool closed = false;
struct Source {
-
Vector<String> sarray;
Vector<float> array;
int stride;
@@ -192,14 +179,12 @@ public:
};
struct SkinControllerData {
-
String base;
bool use_idrefs = false;
Transform bind_shape;
struct Source {
-
Vector<String> sarray; //maybe for names
Vector<float> array;
int stride = 1;
@@ -209,14 +194,11 @@ public:
Map<String, Source> sources;
struct Joints {
-
Map<String, String> sources;
} joints;
struct Weights {
-
struct SourceRef {
-
String source;
int offset;
};
@@ -234,12 +216,10 @@ public:
};
struct MorphControllerData {
-
String mesh;
String mode;
struct Source {
-
int stride = 1;
Vector<String> sarray; //maybe for names
Vector<float> array;
@@ -253,7 +233,6 @@ public:
};
struct Vertex {
-
int idx = 0;
Vector3 vertex;
Vector3 normal;
@@ -271,7 +250,6 @@ public:
Vector<Weight> weights;
void fix_weights() {
-
weights.sort();
if (weights.size() > 4) {
//cap to 4 and make weights add up 1
@@ -288,17 +266,13 @@ public:
void fix_unit_scale(Collada &state);
bool operator<(const Vertex &p_vert) const {
-
if (uid == p_vert.uid) {
if (vertex == p_vert.vertex) {
if (normal == p_vert.normal) {
if (uv == p_vert.uv) {
if (uv2 == p_vert.uv2) {
-
if (!weights.empty() || !p_vert.weights.empty()) {
-
if (weights.size() == p_vert.weights.size()) {
-
for (int i = 0; i < weights.size(); i++) {
if (weights[i].bone_idx != p_vert.weights[i].bone_idx)
return weights[i].bone_idx < p_vert.weights[i].bone_idx;
@@ -328,7 +302,6 @@ public:
};
struct Node {
-
enum Type {
TYPE_NODE,
@@ -340,7 +313,6 @@ public:
};
struct XForm {
-
enum Op {
OP_ROTATE,
OP_SCALE,
@@ -381,12 +353,10 @@ public:
};
struct NodeSkeleton : public Node {
-
NodeSkeleton() { type = TYPE_SKELETON; }
};
struct NodeJoint : public Node {
-
NodeSkeleton *owner = nullptr;
String sid;
NodeJoint() {
@@ -395,7 +365,6 @@ public:
};
struct NodeGeometry : public Node {
-
bool controller;
String source;
@@ -410,21 +379,18 @@ public:
};
struct NodeCamera : public Node {
-
String camera;
NodeCamera() { type = TYPE_CAMERA; }
};
struct NodeLight : public Node {
-
String light;
NodeLight() { type = TYPE_LIGHT; }
};
struct VisualScene {
-
String name;
Vector<Node *> root_nodes;
@@ -435,7 +401,6 @@ public:
};
struct AnimationClip {
-
String name;
float begin = 0;
float end = 1;
@@ -445,7 +410,6 @@ public:
};
struct AnimationTrack {
-
String id;
String target;
String param;
@@ -458,7 +422,6 @@ public:
};
struct Key {
-
enum Type {
TYPE_FLOAT,
TYPE_MATRIX
@@ -485,7 +448,6 @@ public:
/****************/
struct State {
-
int import_flags = 0;
float unit_scale = 1.0;
@@ -493,7 +455,6 @@ public:
bool z_up;
struct Version {
-
int major, minor, rev;
bool operator<(const Version &p_ver) const { return (major == p_ver.major) ? ((minor == p_ver.minor) ? (rev < p_ver.rev) : minor < p_ver.minor) : major < p_ver.major; }