ISceneCollisionManager::getCollisionPoint need 5 parameters?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
mybiandou
Posts: 32
Joined: Thu Sep 10, 2009 6:20 am

ISceneCollisionManager::getCollisionPoint need 5 parameters?

Post by mybiandou »

I have a question when I use ISceneCollisionManager.

I use ISceneCollisionManager::getCollisionPoint(ray, collisionTriangles, point, triangle)

The compiler tell me it need five parameters

Though the document http://irrlicht.sourceforge.net/docu/cl ... effc49d155 shows it only need 4 parameters as I give

But when I check my Irrlicht include file C:\3rd-libs\irrlicht-1.6\source\Irrlicht\CSceneCollisionManager.h , I found it really require five parameter, the declaration is

Code: Select all

		//! Finds the collision point of a line and lots of triangles, if there is one.
		virtual bool getCollisionPoint(const core::line3d<f32>& ray,
			ITriangleSelector* selector, core::vector3df& outCollisionPoint,
			core::triangle3df& outTriangle,
			const ISceneNode* & outNode);
The last outNode is a const pointer, so it seems that it should be an input parameter, what does the fifth parameter mean? How can I use it?

Thank you for your kindly help
CuteAlien
Admin
Posts: 10037
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

It is an out parameter. You get a reference to a pointer for an unchangeable ISceneNode. You pass in "outNode" which is declared like this:
const scene::ISceneNode* outNode = 0;

Check ISceneCollisionManager.h for a more up-to-date documentation or use doxygen to create a local documentation (check scripts/doc for doxygen.exe and config scripts). Sorry for slightly outdated website-docs, I hope it will get fixed soon (I can't do it, because I don't know yet how to do that).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
mybiandou
Posts: 32
Joined: Thu Sep 10, 2009 6:20 am

Post by mybiandou »

That means I can set it to NULL if I need not it.

Thank you very much.

CuteAlien wrote:It is an out parameter. You get a reference to a pointer for an unchangeable ISceneNode. You pass in "outNode" which is declared like this:
const scene::ISceneNode* outNode = 0;

Check ISceneCollisionManager.h for a more up-to-date documentation or use doxygen to create a local documentation (check scripts/doc for doxygen.exe and config scripts). Sorry for slightly outdated website-docs, I hope it will get fixed soon (I can't do it, because I don't know yet how to do that).
Post Reply