(2019-08-13, 22:27)Hans de Lang Wrote: pretty long story i'm afraidDo you think you can make a dll out of this that can be used in my visual basic applications as the renderer for ldraw files, so I can show the result in a picture frame and/or window? Currently I use ldview.dll, but that is 32bit and not 64bit.
What you can do is placing an elementhost on a standard form, connect a grid to that and you can use wpf
so
form
Elementhost
Grid
Viewport3D
Camera
ModelVisual3D
Model3DGroup
Model3D
TransFormGroup
MaterialGroup
MeshData
Positions
Normals (not given by LDraw but you can leave them out
Texturecoordinates ( very useful for stickers )
Triangles ( and that's the CCW and CW choice)
Parsing the .dat files is easy. Then calculating the points with the matrixes and put them into the Mesh.positions
Thing is WPF works with Y axis up and LDraw with Y-axis down but if you make Y = -Y and Z = - Z then its normal again
You can't draw edges in WPF, but I scale my bricks to the real measures of 7.8 x 7.8 mm
That give's a small gap between the bricks and shows not as a solid wall
Succes!
Converting LDraw parts to WPF
« Next Oldest | Next Newest »
Messages In This Thread |
Converting LDraw parts to WPF - by Hans de Lang - 2019-08-11, 13:17
RE: Converting LDraw parts to WPF - by Lasse Deleuran - 2019-08-11, 14:06
RE: Converting LDraw parts to WPF - by Hans de Lang - 2019-08-11, 21:54
RE: Converting LDraw parts to WPF - by Travis Cobbs - 2019-08-12, 3:43
RE: Converting LDraw parts to WPF - by Hans de Lang - 2019-08-13, 22:04
RE: Converting LDraw parts to WPF - by Victor Di Rienzo - 2019-08-12, 13:09
RE: Converting LDraw parts to WPF - by Hans de Lang - 2019-08-13, 22:27
RE: Converting LDraw parts to WPF - by Michael Heidemann - 2019-09-14, 6:25
|
Users browsing this thread: 1 Guest(s)