Commit 7b7bc36a by Geoff Lang Committed by Shannon Woods

Added a dimension type and added constructors to Color, Rectangle, Box and…

Added a dimension type and added constructors to Color, Rectangle, Box and Dimension for easy construction. TRAC #23256 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang
parent dce735c3
...@@ -36,6 +36,9 @@ struct Color ...@@ -36,6 +36,9 @@ struct Color
T green; T green;
T blue; T blue;
T alpha; T alpha;
Color() : red(0), green(0), blue(0), alpha(0) { }
Color(T r, T g, T b, T a) : red(r), green(g), blue(b), alpha(a) { }
}; };
typedef Color<float> ColorF; typedef Color<float> ColorF;
...@@ -48,6 +51,9 @@ struct Rectangle ...@@ -48,6 +51,9 @@ struct Rectangle
int y; int y;
int width; int width;
int height; int height;
Rectangle() : x(0), y(0), width(0), height(0) { }
Rectangle(int x_in, int y_in, int width_in, int height_in) : x(x_in), y(y_in), width(width_in), height(height_in) { }
}; };
struct Box struct Box
...@@ -58,6 +64,19 @@ struct Box ...@@ -58,6 +64,19 @@ struct Box
int width; int width;
int height; int height;
int depth; int depth;
Box() : x(0), y(0), z(0), width(0), height(0), depth(0) { }
Box(int x_in, int y_in, int z_in, int width_in, int height_in, int depth_in) : x(x_in), y(y_in), z(z_in), width(width_in), height(height_in), depth(depth_in) { }
};
struct Extents
{
int width;
int height;
int depth;
Extents() : width(0), height(0), depth(0) { }
Extents(int width_, int height_, int depth_) : width(width_), height(height_), depth(depth_) { }
}; };
struct RasterizerState struct RasterizerState
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment