updated the editor :
https://www.dropbox.com/s/iphhjwqde8qvu3f/main.exe (it now has a wired cube to begin with)
@Veracity:
quat flipping = squashed and reflected ..
my rendering system is actually a big 3d array of which every voxel thats there gets drawn.
(by me just doing a drawimage(pixelimage, x, y) the y gets calculated according to depth & height), i'm pretty sure thats working correctly though
the procedure:
when one of the 3 sliders is used:
use the data in the 3 slider in
Function EulerToQuat:Quaternion(pitch#,yaw#,roll#)
Local cr#=Cos(-roll#/2.0)
Local cp#=Cos(pitch#/2.0)
Local cy#=Cos(yaw#/2.0)
Local sr#=Sin(-roll#/2.0)
Local sp#=Sin(pitch#/2.0)
Local sy#=Sin(yaw#/2.0)
Local cpcy#=cp#*cy#
Local spsy#=sp#*sy#
Local spcy#=sp#*cy#
Local cpsy#=cp#*sy#
Local q:Quaternion=New Quaternion
q.n#=cr#*cpcy#+sr#*spsy#
q.v.x#=sr#*cpcy#-cr#*spsy#
q.v.y#=cr#*spcy#+sr#*cpsy#
q.v.z#=cr#*cpsy#-sr#*spcy#
Return q
endFunction
that should give me a quaternion with the desired rotations
with the original data and that quat i use:
Function rotateModel:TModel(model:TModel, rotationQuat:Quaternion)
'model is a container object for the 3d array
' newmodel is double the size in every dimension, so it will fit
Local newModel:TModel = TModel.Create(model.gridHeight*2,model.gridWidth*2,model.gridDepth*2)
For Local y:Int = 0 Until model.gridHeight
For Local z:Int = 0 Until model.gridDepth
For Local x:Int = 0 Until model.gridWidth
Local v:Int = model.map[y, z, x ]
If v>0
'create a quat (translate model so the middle is at 0,0,0)
Local quat:Quaternion = Quaternion.Create(0,x-(model.gridWidth/2),y-(model.gridHeight/2),z-(model.gridDepth/2))
Local c:Quaternion = Quaternion.MultiplyQuats(quat,rotationQuat)
'paste the new model in with a translation to get back at the middle
newModel.setAt(c.v.y + model.gridHeight, c.v.z+ model.gridDepth, c.v.x+ model.gridWidth, v)
EndIf
Next
Next
Next
Return newModel
EndFunction
the function that gets called there is this one:
Function MultiplyQuats:Quaternion(q1:Quaternion,q2:Quaternion)
Local q:Quaternion=New Quaternion
q.n = q1.n*q2.n - q1.v.x*q2.v.x - q1.v.y*q2.v.y - q1.v.z*q2.v.z
q.v.x = q1.n*q2.v.x + q1.v.x*q2.n + q1.v.y*q2.v.z - q1.v.z*q2.v.y
q.v.y = q1.n*q2.v.y + q1.v.y*q2.n + q1.v.z*q2.v.x - q1.v.x*q2.v.z
q.v.z = q1.n*q2.v.z + q1.v.z*q2.n + q1.v.x*q2.v.y - q1.v.y*q2.v.x
Return q
End Function
hope it makes more sense to you

,
no Wait, hope it will make more sense

eventually