1 (edited by HondaDirtBiker 2006-07-14 05:32:39)

Topic: Multiple vectors in an array.

I need to store all the vectors from a 3D Bounding Box.
When I try the code from the irrbmax API, I get the error message "Unable to convert from 'T_irrVector3df Array' to 'T_irrArray_vector3df'".

Local TargetBBox:T_irrArray_vector3df = Target.getBoundingBox().getEdges()

What could be wrong?

Re: Multiple vectors in an array.

greetings smile  im sure the API doc is out of date my apologies on that.  rebuilding the docs is a huge time consumer.  getEdges() and several other methods now return a BMAX array.  in this case, an array of T_irrVector3df so change your code to:

Local TargetBBox:T_irrVector3df[]=Target.getBoundingBox().getEdges()

and that should do it.

3 (edited by HondaDirtBiker 2006-07-15 14:00:58)

Re: Multiple vectors in an array.

How do I retrive an axis from a vector of an edge? Blitz Max keeps returning a "Unhandled Memory Exception Error", first for aabbox3df then vector3df.

Local TargetBBox:T_irrVector3df[] = Target.getBoundingBox().getEdges()
Local TargetBBoxstring:String = Null
If (TargetBBoxString = Null)
    Local TargetBBoxV3D:T_irrVector3df
    Local i:Int
    For i = 0 To 7
        TargetBBoxV3D = TargetBBox[i]
        TargetBBoxstring = TargetBBoxstring + "(" + i + ")" + TargetBBoxV3D.getX() + "," + TargetBBoxV3D.getY() + "," + TargetBBoxV3D.getZ()
    Next
    EndIf

Thank you.

Re: Multiple vectors in an array.

this has been repaired thx for finding it!  please see the downloads section for the new download.