1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
class Object
{
struct Transform
{
struct Position
{
float x,y,z;
};
struct Scale
{
float x,y,z;
};
struct Rotation
{
float x,y,z;
};
//Declare The stuffs so I can Use .
Position Position;
Scale Scale;
Rotation Rotation;
};
struct Model
{
struct Vertex //Overloaded Vertex Structure
{
Vertex(){}
Vertex(float x, float y, float z): Position(x,y,z)
{
Color.x = 1.0f;
Color.y = 1.0f;
Color.z = 1.0f;
Color.w = 1.0f;
};
Vertex(float x, float y, float z, float r, float g, float b, float a):Position(x,y,z),Color(r,g,b,a)
{
};
XMFLOAT3 Position;
XMFLOAT4 Color;
};
Vertex Vertices[]; //<----------------------- Why can't I use this class as a base class when I do this?
};
public:
Object(){}
Transform Transform;
Model Model;
};
|