Review raylib structs comments

This commit is contained in:
Ray 2021-05-25 23:19:03 +02:00
parent 9f45fea31e
commit 7959d95db0

View file

@ -181,23 +181,23 @@
// Vector2 type
typedef struct Vector2 {
float x;
float y;
float x; // Vector x component
float y; // Vector y component
} Vector2;
// Vector3 type
typedef struct Vector3 {
float x;
float y;
float z;
float x; // Vector x component
float y; // Vector y component
float z; // Vector z component
} Vector3;
// Vector4 type
typedef struct Vector4 {
float x;
float y;
float z;
float w;
float x; // Vector x component
float y; // Vector y component
float z; // Vector z component
float w; // Vector w component
} Vector4;
// Quaternion type, same as Vector4
@ -205,26 +205,26 @@ typedef Vector4 Quaternion;
// Matrix type (OpenGL style 4x4 - right handed, column major)
typedef struct Matrix {
float m0, m4, m8, m12;
float m1, m5, m9, m13;
float m2, m6, m10, m14;
float m3, m7, m11, m15;
float m0, m4, m8, m12; // Matrix first row (4 components)
float m1, m5, m9, m13; // Matrix second row (4 components)
float m2, m6, m10, m14; // Matrix third row (4 components)
float m3, m7, m11, m15; // Matrix fourth row (4 components)
} Matrix;
// Color type, RGBA (32bit)
typedef struct Color {
unsigned char r;
unsigned char g;
unsigned char b;
unsigned char a;
unsigned char r; // Color red value
unsigned char g; // Color green value
unsigned char b; // Color blue value
unsigned char a; // Color alpha value
} Color;
// Rectangle type
typedef struct Rectangle {
float x;
float y;
float width;
float height;
float x; // Rectangle top-left corner position x
float y; // Rectangle top-left corner position y
float width; // Rectangle width
float height; // Rectangle height
} Rectangle;
// Image type, bpp always RGBA (32bit)
@ -326,7 +326,7 @@ typedef struct Mesh {
float *normals; // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
float *tangents; // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
unsigned short *indices;// Vertex indices (in case vertex data comes indexed)
unsigned short *indices; // Vertex indices (in case vertex data comes indexed)
// Animation vertex data
float *animVertices; // Animated vertex positions (after bones transformations)