Camera pointer

smernesto

28-01-2007 02:04:45

Hi.

Bekas, for the port of the OSM loader I need to pass a pointer...

I have to call this method of SceneManager:

SceneManager.SetOption(string strKey, void* pValue)

in the loader calls the method in this way:
Camera primaryCamera = mCameras[0];
mSceneMgr.SetOption("PrimaryCamera", primaryCamera);
In c++ it pass a Camera Pointer

I donĀ“t know if I need to do something like this:
mSceneMgr.SetOption("PrimaryCamera", primaryCamera.NativePtr);
But then we need compile with the /unsafe compiler parameter.

Is the last line of code I need to port for the Osm loader

Thanks

Bekas

28-01-2007 11:41:32

Hmm, I should make NativePtr a IntPtr, not so much to eliminate the /unsafe requirement but to make it accessible by other languages (not only C#).

In the meantime, if you don't want to compile with /unsafe, create a new helper library (that is compiled with /unsafe) that passes the camera pointer to the SceneManager.