My first post here and somewhat new to VB.NET, so I'm aware that I may breach some protocols. So please be patient.
A bit of background on what I'm trying to do. I've created a Windows form with a picturebox that the user can draw objects on (representing walls, doors, etc). The coordinates for the objects are saved in a SQL backend (think of it as vector drawing in a Paint like interface). The next step is to move a light source (like a person) walking through the object. I've created a light polygon in SQL representing a crude 2D raytrace and created a difference of this from the mat's polygon. Essentially this difference represents the light paths where objects can be seen.
The last step, and the one I'm stuck on, is how to display the final geometry I create (a complex curvepolygon) on the picturebox which will essentially cover up the objects that are not lit by the light source yet. At it's most basic, how do you import a geometry from SQL and then display it in a picturebox in a windows form/picturebox.
Thanks and appreciate any help. Bear in mind that I'm somewhat new to .NET, and am using this project as a way to teach myself VB.NET and SQL.
A little disappointed that there is nobody that can answer this question, but it happens. So I came up with a workaround that while not ideal, will hopefully help someone else stuck in the same situation. Maybe someone will see this and come up with a more elegant solution.
So once I have my final "shadow" polygon, I can't find a VB.NET solution to draw it as is, but that doesn't mean I can't convert it to a format that is possible to draw in a picturebox. Here's the code I came up with:
As I said, this is not the ideal solution, so it slows things down a bit performance wise, but it works. I'm sure being a VB.NET amateur, heck I can't even get the code sample to look right in here, even the current code is not optimal, but it gets the job done. Hope someone finds this helpful.