WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Mesh Graph (more than vertex position info) (https://forum.worldviz.com/showthread.php?t=4566)

jpriede 05-03-2013 07:48 AM

Mesh Graph (more than vertex position info)
 
Hello, I know I can get the xyz position of any given vertex in a model, but I would love to be able to know which vertecies are "neighbours" of vertex X.

For those math folks out there, I want the full graph of the mesh.

Something like (pseudocode/java...):

Vertex {
ArrayList NeighbouringVertecies;
float xPos;
float yPos;
float zPos;
float uTexCoord;
float vTexCoord;
}

So, if I say byMagic.getVertex(0) I get a vertex object that not only knows where it is, but also which vertecies within the overall mesh it is connected to, so I could do byMagic.getVertex(0).getNeighbour(0).getXPos() or byMagic.getVertex(0).getNeighbours() that would return a list of neighbours.

Basically, I want to be able to conceptually "travel" along edges to "find" an arbitrary vertex.


All times are GMT -7. The time now is 05:03 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC