Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 Mar 2009
Offline Last Active Oct 16 2015 01:13 PM

Posts I've Made

In Topic: How to do picking with mouse click on nodes in Irrlicht

02 February 2014 - 04:20 AM



The simplest method is using: ISceneCollisionManager::getSceneNodeFromScreenCoordinatesBB

This method only takes bounding boxes into consideration though, if you need more precision you should probably use

 line3d<f32> ray = colmgr->getRayFromScreenCoordinates(device->getCursorControl()->getPosition(), camera);

This returns a ray which goes though the camera and points to where the cursor is pointing, then use:


to find the first scene node intersecting this ray





In Topic: How to send notification in Facebook API!

22 August 2013 - 03:47 AM

You might want to have a look at this thread: http://stackoverflow.com/questions/12266593/how-to-use-new-client-side-facebook-notifications-api

In Topic: Avoiding unnecessary recalculation

07 August 2013 - 07:29 AM

Thanks for your replies. That's alot of usefull information. Seperating dynamic and static nodes is something I'm going to work on.


Thank you guys!

In Topic: 2 c++ problems

09 August 2011 - 02:52 PM

Thanks for the quick replies :D.
your solution worked and my second problem is now solved :)
your post was a big ohhhh... "I should have known" moment, I understand what the problem is know, guess I keep things as they are now.

Thanks again.

In Topic: Inheritance and base class pointers

31 August 2010 - 10:55 PM

I don't know how your actual design looks like but the most simple solution would be to include sortval in your base class (this is probably where you are looking for).
class A
string Name;
int Sortval;

// You could also make a virtual set and get methods:
virtual int getSortval() {return Sortval;}
virtual void setSortval(int sortval) {Sortval = sortval;}

class B : public A{

class C : public A{

A* Test = new C;
std::cout << Test->Sortval << '\n';

I hope this solution fits in your design (but if you want to sort your container every value needs to contain a sortval, so probably yes).

Another solution (which is I think more complicated than necessary) is to create a struct which holds a sortval and a pointer to the base class, like this:

struct Value // or a class doesn't matter
int Sortval;
A* Pointer;

Value First = {1, new B};
Value Second = {2, new C};

But I would definitely prefer the first solution.