Need to understand these lines

Hello All.

I'm trying to improve a file loader for Irrlicht engine. But, as a begginer, there are some things that seems to be strange to me. This is a condensed part:

------
tLWOTextureInfo() : Flags(0), WidthWrap(2), ..... AntiAliasing(1.0f),
Opacity(1.0f), TCoords(0), Active(false) {};
------

The first thing is what kind of 'object' is this "tLWOTextureInfo". I didn't found anywhere this kind of syntax.

The second thing is that values (1.0f). I didn't recognize it too.

Thanks
The lines appear to be a constructor for a tlWOTextureInfo class, as in:
1
2
3
4
5
6
7
8
9
10
11
12
13
class tlWOTextureInfo
{
  protected:
    int Flags;
    int WidthWrap;
    float AntiAliasing;
    float Opacity;
    int TCoords;
    bool Active;
  public:
    tlWOTextureInfo() : Flags(0), WidthWrap(2), ..... AntiAliasing(1.0f),
            Opacity(1.0f), TCoords(0), Active(false) {}
};

That constructor simply initializes all of the variables there with the specified values when a tlWOTextureInfo object is created.

As for the 1.0f part, that just says that the value is a float. Without the 'f' at the end, it is a double rather than a float.
Thanks Rpgfan3233!

This cleared a lot my mind.
Topic archived. No new replies allowed.