--
-- pixwerx - test - core
--

-- loading our libraries
pw.script:load_all()

-- vector3
local v1 = pw.vector3.new(3,2,1)
print("v1 ",v1.x,v1.y,v1.z)

-- quaternion
local q = pw.quaternion.new()
q = pw.quaternion.identity
print("q",q.x,q.y,q.z,q.w)
qi = q.inverse
print("q.inverse",qi.x,qi.y,qi.z,qi.w)
local q2 = pw.quaternion.new(0,0,0,1)

-- bug!
-- qm = pw.quaternion.lerp(q,qi,0.5)

-- axisangle
local aa = pw.axisangle.new(v1,0.707)
print("aa.axis",aa.axis.x,aa.axis.y,aa.axis.z)
print("aa.angle",aa.angle)

-- mesh
local somemesh = pw.mesh.new()

somemesh.indices:add(0)
somemesh.vertices:add(pw.vector3.new(3,4,5))

--
print(somemesh.vertices)
print(somemesh.indices)


for i=1,#somemesh.indices do
    print(i," - ", somemesh.indices:get(i))
end


for k,v in ipairs(somemesh.indices) do
    print(k,v)
end

for k,v in ipairs(somemesh.vertices) do
    print(k,v)
end
