Skip to Content
GPU Pro 7
book

GPU Pro 7

by Wolfgang Engel
March 2016
Intermediate to advanced
320 pages
9h 14m
English
A K Peters/CRC Press
Content preview from GPU Pro 7
236 V 3D Engine Design
By parsing the vertex and index buffer of a mesh and filling into a data
structured like the above one, it is really easy to start doing queries on the mesh.
For instance, the following snippet finds all neighboring faces of a given face:
List<Face> GetNeighbors ( Face face )
{
List<Face> neighbors = new List<Face >() ;
if ( face . edge . opposite != null)
{
neighbors . Add( face . edge . opposite . face );
}
if ( face . edge . next . opposite != null)
{
neighbors . Add( face . edge . next . opposite . face );
}
if ( face . edge . next . next . opposite != null)
{
neighbors . Add( face . edge . next . next . opposite . face );
}
return neighbors ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

GPU Pro 4

GPU Pro 4

Wolfgang Engel
GPU Pro 5

GPU Pro 5

Wolfgang Engel
GPU Pro 6

GPU Pro 6

Wolfgang Engel
GPU PRO 3

GPU PRO 3

Wolfgang Engel

Publisher Resources

ISBN: 9781498742542