View Full Version : Triangulation via the SDK.

12-15-2004, 01:27 PM
Im writing an exporter for my own graphics engine, and I want to write out triangle lists. This is fine except when the poly has >3 points.

LW has a great tripple feature, and I want to tripple my model internal to the exporter.

Can you do this so that the model itself doesn't tripple once exporting is finished? And if so.... how?

In other words... can I triangulate via the SDK using LW's built in tripple functions, without corrupting the model Im exporting.

01-05-2005, 01:24 PM
I am sorry I cannot help, I just want to add that I am also interested in a solution to this problem as I have a couple of plugin ideas in mind which would require a triangulated object for the sake of computations, but once the plugin is done, the object should remain untriangulated.

I hope someone will provide us with ideas. I though about using a copy of an object on a separate layer, triangulate it there and delete after I'm done. I haven't tried that. Let's hope we'll hear from experts :)

01-05-2005, 01:27 PM
I did get a method working.

I issue a TRIPPLE command, export... then issue an undo. Works fine, but Ive never used an UNDO in this way before... scares me a little! :)

inside the sdk theres a modeler lib, tripple and undo commands can be found there.

01-23-2005, 02:53 PM
Why not copy the model to a new layer, triple that, and delete the layer when you're done?

01-23-2005, 03:10 PM
I use undo a lot :)

I do all my operations, then copy, then undo back to the start of my operations and paste... Then the user only has to deal with one undo to undo your lscript :)

01-23-2005, 04:20 PM
Why not copy the model to a new layer, triple that, and delete the layer when you're done?
If your dealing with huge models, then that could be much slower since it has to copy all the data as well as triangulating.

UNDO seems quite quick...