Search found 21 matches

by Midas
Tue Mar 04, 2014 1:19 pm
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Thanks Oleg!

Also, since I would like to use bézier curves, I will have to calculate a point on the curve for each cross section of the road by means of a precission value. Would getSectionPoint() be the way to go?
by Midas
Tue Mar 04, 2014 10:51 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Oleg, So I got back to this for a while.. The plugin is working, it can generate roads to PSDL, based on the settings in the user properties. This is the result: http://midas.chechi.be/images/zmod2psdl.gif The only problem, as you can see, is that the roads are all placed on the origin. This is beca...
by Midas
Fri Jan 17, 2014 8:00 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

The returned string is "A" and the returned number is 3. When I open "Selection Properties", it shows a single "test" property with empty value.

Doing the same for normal meshes gives the same result.
by Midas
Thu Jan 16, 2014 1:24 pm
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Yes, I'm sure. I also tested the value of the string in the output window. I'm not getting duplicates either. After the property is added for the first time, it won't change after the following addOption() calls. I'm also not doing anything with the return value (index). (I didn't change anything to...
by Midas
Thu Jan 16, 2014 11:57 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Excellent, that fixed it nicely. Yes, it does produce an error, but it's fixed easily. You forgot to declare a variable in the loadData() function in SplinesSerialization.cpp : core::io::tChunkInfo chunkInfo; There is a problem though. IUserDefinedOptions::addOption() doesn't seem to overwrite the c...
by Midas
Thu Jan 16, 2014 9:06 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Your tool is a floater that shows a width and/or other road-specific options for a spline you select in scene, right? Yes. I will clarify with a screenshot: http://midas.chechi.be/images/zmod2plug.gif The collectSceneSplineNodes function looks like a good idea (as long as it doesn't have performanc...
by Midas
Wed Jan 15, 2014 8:56 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Ok, I'm totally lost now. :| I don't know how I can implement the 'service' class and initGlobalPointer() function in my project in its current state. I will add a link to the source code. Can you please take a look at it? I'm sorry for not understanding, nevertheless the effort you put into this.. ...
by Midas
Wed Jan 15, 2014 5:18 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

I'm not really sure why you made a seperate service for the splines storage class. Can't I just make CRoadSplineNodes into a service? Why is g_pSplineNodes declared as CRoadSplineNodes and initialized as IRoadSplineNodes in the startup function? Is that an error? What I was thinking was to make CRoa...
by Midas
Tue Jan 14, 2014 2:57 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Yes, sure. I can also send the full source if you want. Maybe you find some errors. #include "Tool.h" #include "ContextTool.h" ZM_LIBRARY_DEFAULT_DECLARE() ZM_LIBRARY_NO_COPYRIGHT_INFO() ZM_LIBRARY_COLLECTION_BEGIN() ZM_LIBRARY_REG(core::tools::CPSDLRoadTool, ZM_CLASS_TOOL) ZM_LI...
by Midas
Mon Jan 13, 2014 10:27 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Ok, I got the multiple selection to work with onNodeSelection() only. Basicly the whole plugin is finished now (except the rendering which I'll skip for now). The next thing I have to do is implement write/read functionality for the Z3D file. How is this going to work with the splines, since the roa...
by Midas
Sun Jan 12, 2014 9:40 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Ok. Can you tell me which parameters this function has and how I can implement it?
by Midas
Sun Jan 12, 2014 9:13 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Are you sure the link you posted is a diferent version, since it seems to be exactly the same as 2.2.4?
by Midas
Sun Jan 12, 2014 7:31 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

My bad, I meant onSceneChanges().. Is this available in the SDK?
by Midas
Sun Jan 12, 2014 6:49 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Thank you, I have changed the class to work with ZPtr now.

Is onNodeSelection() included in the SDK? I could not find it in the help file, nor the include files.
by Midas
Sun Jan 12, 2014 5:49 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Ok, my implementation for adding/removing splines to the road tool seems to work. I also got a working checkbox in the context menu. Can I use onNodeSelection() to get all currently selected items in the scene, or does this work for single nodes only? I will have to do this because the floater windo...
by Midas
Sat Jan 11, 2014 3:58 pm
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

Yes, that looks like a good idea. :) Am I going to need a class that holds an array of the splines, which is accessible for both the floater window and the context menu tool, from a global instance of that class? Something like: class CRoadSplineNodes { public: void addSpline(scene::ISplineNode *pNo...
by Midas
Sat Jan 11, 2014 1:57 pm
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

I guess the easy way will do. However, user-defined options don't seem to work for me. When I add them, they are gone whenever I reopen the 'Properties' dialog. :?
by Midas
Sat Jan 11, 2014 12:33 pm
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Midtown Madness2 road plugin

That worked! For checking whether a spline is 'under control' of the road service, can I define my own node properties? I tried to copy CDummyNodeProperties to my project and change some of the properties, but that didn't work. Also, can I use this only in a 'shared'-plugin (.zmc), or will this work...
by Midas
Sat Jan 11, 2014 10:41 am
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Making a render plugin

Thanks, that got me started. :) I decided to use the 'built-in' nodes browser, and instead use a context menu action to select whether or not to generate roads on the selected spline. The float window will only show some properties for the currently selected spline. I got a context menu tool to work...
by Midas
Wed Jan 08, 2014 1:58 pm
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Re: Making a render plugin

Thanks for your quick reply, Oleg. Do you think I can do this in ZModeler 2 instead? I actually got ZModeler 2 running for the first time just now (couldn't get it working before). The spline editing seems to be much better in it than version 1, also with bezier curves. It would be nice to get that ...
by Midas
Wed Jan 08, 2014 12:25 pm
Forum: SDK (Software Development Kit)
Topic: Midtown Madness2 road plugin
Replies: 41
Views: 61978

Midtown Madness2 road plugin

Hi Oleg and other members of this forum For ZModeler 1 series I made a plugin which generates roads from splines and exports them to the Midtown Madness 2 PSDL format. This works very well so far. What I would like to do next is to make a renderer which will render the roads like they would look aft...