MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetTriangleVertices

Function GetTriangleVertices

trinity/Resources/TriGrannyRes.cpp:1993–2007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1991}
1992
1993void GetTriangleVertices( const uint8_t** triangle, const granny_mesh& mesh, int32_t index, int32_t vertexSize )
1994{
1995 if( mesh.PrimaryTopology->Indices16 )
1996 {
1997 triangle[0] = mesh.PrimaryVertexData->Vertices + mesh.PrimaryTopology->Indices16[index++] * vertexSize;
1998 triangle[1] = mesh.PrimaryVertexData->Vertices + mesh.PrimaryTopology->Indices16[index++] * vertexSize;
1999 triangle[2] = mesh.PrimaryVertexData->Vertices + mesh.PrimaryTopology->Indices16[index++] * vertexSize;
2000 }
2001 else
2002 {
2003 triangle[0] = mesh.PrimaryVertexData->Vertices + mesh.PrimaryTopology->Indices[index++] * vertexSize;
2004 triangle[1] = mesh.PrimaryVertexData->Vertices + mesh.PrimaryTopology->Indices[index++] * vertexSize;
2005 triangle[2] = mesh.PrimaryVertexData->Vertices + mesh.PrimaryTopology->Indices[index++] * vertexSize;
2006 }
2007}
2008
2009Tr2GrannyIntersectionResultPtr GrannyRayIntersection( granny_file_info* fi, const Vector3& pos, const Vector3& dir, int32_t meshIndex, int32_t areaIndex )
2010{

Callers 1

GrannyRayIntersectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected