Adding variables, properties, and functions to a class in Lua Bridge is done in the same fashion as adding any of these things to a namespace. The functions are addData, addFunction, and addProperty. None of these functions require any template data, but the data they point to does have to be scoped to the class it belongs to. The following code sample shows how to use these methods:
class Vec3 {
public:
float x, y, z;
float Magnitude() const;
void Normalize();
}
getGlobalNamespace(L)
.beginNamespace("Math")
.beginClass<Vec3>("Vec3")
.addData("x", &Vec3::x)
.addData("y", &Vec3::y)
.addData("z", &Vec3::z)
.addProperty("Magnitude", &Vec3::Magnitude)
.addFunction("Normalize", &Vec3::Normalize)
.endClass()
.endNameSpace();