Hi Fellow VB Developers!
Operator Overloading isn't supported in VB, so stuff like
Dim v1 As Vector3D
Dim v2 As Vector3D
Dim v3 As Vector3D = v1 - v2 ' this wont work!
The minus operator is defined in the Irrlicht.NET assembly as
Public Static Vector3D Operator -(Vector3D o1, Vectr3D ) {...}
And because Operator Overloading isnt CLS-Compliant per se, you cannot call that from a .NET language that does not support it (e.g. VB.NET)
However, by default, when the c# is compiled, the compiler by will add special methods for the overloaded operators
op_Addition()
op_Substraction() etc
so we should be doing something like
VB:
Dim v1 As Vector3D
Dim v2 As Vector3D
Dim v3 As Vector3D = Vector3D.op_Substractio(v1, v2)
While this *should* work, by default it doesn't, even though these methods are added (and documented in IrrLicht .NET CHM documentation) these methods do not come up in VB.
Here's the Tip:
Click on Tools>Options (Inside Visual Studio)
Text Editor>Basic
and UnCheck "Hide advanced members"
and that should do the trick!
Cheers
Ash Moollan
Blog: www.moollan.net
Tip for VB.NET Irrlicht Developers
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm