View previous topic :: View next topic |
Author |
Message |
paul_nicholls DeleD PRO user
Joined: 05 Dec 2007 Posts: 356 Location: Hobart, Tasmania, Australia
|
Posted: Fri Jan 22, 2010 3:36 am Post subject: Any 'Gotchas' when adding new primitive types to DeleD CE? |
|
|
@Jeroen and/or PJ
When adding new primitives to DeleD, are there any 'gotchas' I should be looking out for?
I know about these:
add to the end of the TObjectType enumerated list (unit_Enums.pas) as to not stuff up order.
add to end of XML_PRIMITIVE_TYPES (same order) in unit_XMLSceneConstants.pas.
How about parts of the code?
Would I need to add in extra checks for every DeleD command when adding new primitive types?
I'm thinking of path and spline path primitives especially...
I'm starting to think this is going to be a huge change to the code-base but I would like to try anyhow
cheers,
Paul _________________ Long live DeleD!
Hi ho...hi ho...it's off 3d modeling I go... |
|
Back to top |
|
|
paul_nicholls DeleD PRO user
Joined: 05 Dec 2007 Posts: 356 Location: Hobart, Tasmania, Australia
|
Posted: Fri Jan 22, 2010 4:27 am Post subject: |
|
|
Also, I'm now confused after looking at the code, where does DeleD get the info to draw the primitives (polyline, box), etc. when it goes to draw these primitives?
I noticed there is a TRenderQueue class used in the frm3dView.pas file but am unsure how this is used.
cheers,
Paul _________________ Long live DeleD!
Hi ho...hi ho...it's off 3d modeling I go... |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Fri Jan 22, 2010 2:37 pm Post subject: |
|
|
If you look in unit_primitives (TPyramid.CreatePyramid etc), you'll find out that each primitive class simply builds their own geometry in the constructor (vertices and polygons). There are bits and pieces of construction code (i.e. drag base or side) spread throughout the forms, but basically that's it. |
|
Back to top |
|
|
|