Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / How to I move Vertex in a sphere?

Author
Message
Sedit
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 3rd Feb 2018 18:24


I am attempting to take a sphere and manipulate each vertex individually however when I attempt to do so the Polygons come apart since it seems they are not welded. How would I make it so that when I move each vertex it states connected to all the other polys in the sphere?
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Derek Darkly
6
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 3rd Feb 2018 22:42 Edited at: 3rd Feb 2018 22:43
I'd say you have to figure out which vertexes share the same coordinates and move them all together at once.
Send your parents to noisy sprite demo hell... enter the D-Zone
Sedit
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 16th Feb 2018 20:12
Yeah.... Thats insane lol. Ill stick with OpenGL or DirectX I guess. Why are they not Welded.... That TERRIBLE for performance. That's like 36 verts for a simple Cube when they could have used 8.... What were they thinking? That means if they did it correctly DarkBasic would be able to handle almost 4x as many Objects as it currently does... At the very least Twice as many to be conservative.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
WickedX
9
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 17th Feb 2018 02:32
Most Dark Basic Professional if not all, Make Object functions build the object using a triangle-list primitive. So, every three sided polygon in an object uses three vertices. With all the mesh, memblock and vertex data commands, there is no function to build an object of any primitive type. The vertex data is held in video memory. Dark basics DBO format can however display any vertex primitive type it is pointed to.

In my internal version, I have added a function that allows you to build an object of any primitive type you desire. If interested, I can add the finishing touches and post a link. Here is a list of bug fixes and additional functions, so far.

+ Code Snippet
Sedit
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 17th Feb 2018 16:53
I am interested, for multiple reasons, I am working on a graphics library for OpenGL and for DirectX and the Algorithm for Primitive drawings would be helpful. I thought I remember seeing in the past a command to weld vertices in Darkbasic. If so I could picture converting the Primitive into a mesh then weld the vertices and convert it back to an object.

Man I really need to get on the ball making my own DLLs for Darkbasic. I suppose once I get my DirectX lib running I could figure a way to connect it to DB.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);

Login to post a reply

Server time is: 2018-02-18 05:20:01
Your offset time is: 2018-02-18 05:20:01