creating new internal scene nodes

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
james
Posts: 6
Joined: Mon Aug 27, 2007 10:39 pm

creating new internal scene nodes

Post by james »

Hi. I'm trying to make some new internal scene nodes into the engine but am having difficulties. Could someone tell me which files in the engine source would be used to place scene node data so it can be accessed externally?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

I'm trying to make some new internal scene nodes into the engine but am having difficulties.
Irrlicht has been updated so that you don't really need to put your custom scene nodes into the engine. Are you really sure that this is something that you want to do?

You can now write a scene node factory that allows the scene manager to create derived scene node instances without it actually having to know anything about them. You should be able to find the relevant information here.
Could someone tell me which files in the engine source would be used to place scene node data so it can be accessed externally?
Not sure what you mean by this. How do you mean accessed externally? You mean from outside the engine and inside your application?

Travis
james
Posts: 6
Joined: Mon Aug 27, 2007 10:39 pm

Post by james »

See, what I am trying to do is implement a new scene node into the engine, But i'm having trouble in the CSceneManager.cpp/h files.
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

james, you didn't answer to vitek's post and it is not very helpful that you just repeat your original request which has already been answered.

So what exactly do you want to do here?
And what specific part is unclear to you? What is this "trouble" specifically?

A generic blurry wishy-washy-post is not helping us to help you. Always make it easy to answer a request. This will result in more helpful answers. It always comes down to this.
james
Posts: 6
Joined: Mon Aug 27, 2007 10:39 pm

Post by james »

Like I stated in my original post, i asked which source files contain node information, which files will be used for creating new internal nodes (like CSceneManager.cpp etc) besides the actual node files (CWaterSurfaceSceneNode.cpp/h for example). I'm having difficulties building new internal nodes, steps on how to create them would help (what to put where). I know of three files that house node info, cscenemanager.cpp., .h, and iscenemanager.h. Are there any more?

And specifically to vitek's questions; yes i'm sure (otherwise I would not be asking), and I mean accessed externally as in outside of the engine source; being used in an application that is using the SDK.

Sorry for any confusion I may or may not have caused readers..
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

I give up!.

[rant]
What is so damn difficult to ask a question like this:
"I want to implement a new scenenode type BlaBlub which manages data X to allow me to do Y. I tried to do A in order to do B, but I got error C. I don't understand why C is given, but even when I tried D it didn't help."

Your question is still absolutely non-descriptive. You fail to identify any problem with specificity. I probably know enough to answer your generic request. But in order to do so, I'd have to start with Adam and Eve, because you totally fail to provide any specific informations whatsoever. I, like most potential answerers, am way too lazy to invest a serious amount of work to answer your overly broad question just because you are too lazy to phrase a proper question yourself.
[/rant]

Your request is just rude.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I think what Saturn wants to explain in a maybe just as rude way is that you can access any node from outside the library. Check the ISomethingSceneNode.h in the include directory. So if this is not enough for you you have to specify your specific needs.
Also, try to follow some exemplary scene node through the source code and you will easiyl identify all files you have to touch in order to extend the library with a new node (which is not necessary as you was already told). I guess it's not much more than the files you mentioned...
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

hybrid wrote:I think what Saturn wants to explain in a maybe just as rude way is that you can access any node from outside the library.
Not quite, but yeah: An eye for an eye an tooth for a tooth. ;)
james
Posts: 6
Joined: Mon Aug 27, 2007 10:39 pm

Post by james »

Saturn wrote:I, like most potential answerers, am way too lazy to invest a serious amount of work to answer your overly broad question...
Don't bother posting if you are not going to bother helping. Do us all that favour.
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

james wrote:
Saturn wrote:I, like most potential answerers, am way too lazy to invest a serious amount of work to answer your overly broad question...
Don't bother posting if you are not going to bother helping. Do us all that favour.
Hehe, oh really? Do us and potential people who in the future might have the same problem and might actually bother to search the forum for an answer a favor and start to describe your problem properly.

You still failed to identify your problem with specificity, btw.
What is your actual problem? I am still waiting for a proper problem description. Why are you unable to provide one? Why don't you answer the question in response to yours?

I am still willing to answer. Only you don't say what I shall answer in the first place...
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

If all you want to do is make your new scene node createable from the ISceneManager interface, then you need to edit ISceneManager.h, CSceneManager.h and CSceneManager.cpp. You will also need to modify ESceneNodeType.s, CDefaultSceneNodeFactory.h and CDefaultSceneNodeFactory.cpp so that the scene manager can create your derived scene node type. Often you would want to modify irrlicht.h to include your new interface class header. That is it.

I don't really understand why you would want to modify the engine source for this because it really isn't necessary anymore. You can create your own scene node type, and a scene node factory. You register the factory with the scene manager, and then the scene manager can create your derived scene node type without knowing anything about it. It can even read and write them to irr files if you do this.

If you insist on modifying the engine sources, you must realize that you will have to start integrating changes from Irrlicht manually every time a new version comes out. This can become a problem if you actually care to keep your version of the engine up to date.
Don't bother posting if you are not going to bother helping. Do us all that favour.
Honestly, I'm flabbergasted that you would respond like that. Yes, you asked what might seem to be a simple question from your perspective, but we can't read your mind. Notice that he wasn't the only person unsure of what you were wanting from us.

I honestly think we should all live by some rules, and these ones are useful for forums and mailing lists. The part about asking smart questions is actually pretty important. That, and this little gem... [This] is a public meeting place with a diverse and ever-changing community. Creating social bonds and establishing a reputation is important. Please be polite, courteous and diplomatic. [stolen from here].

In all honesty, you should have been able to answer the question yourself with little work beyond writing the scene node specific headers and sources. Maybe ten minutes. That said, I'm going to guess that even though I've answered your original question, it won't actually solve your problem. Of course the easiest and most convenient thing would have been for you to tell us what you had tried, what the result was and why this wasn't satisfactory.

Travis
james
Posts: 6
Joined: Mon Aug 27, 2007 10:39 pm

Post by james »

vitek wrote:If you insist on modifying the engine sources, you must realize that you will have to start integrating changes from Irrlicht manually every time a new version comes out. This can become a problem if you actually care to keep your version of the engine up to date.
I am aware of that. Thank you for your post. I am sorry for any trouble.
Post Reply