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

Function FindGrannyComponent

trinity/Resources/TriGrannyRes.cpp:1870–1883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1868namespace
1869{
1870std::pair<const granny_data_type_definition*, int32_t> FindGrannyComponent( const char* componentName, const granny_data_type_definition* vertexFormat )
1871{
1872 int32_t offset = 0;
1873 while( vertexFormat->Type != GrannyEndMember )
1874 {
1875 if( strcmp( vertexFormat->Name, componentName ) == 0 )
1876 {
1877 return std::make_pair( vertexFormat, offset );
1878 }
1879
1880 offset += GrannyGetMemberTypeSize( vertexFormat++ );
1881 }
1882 return std::make_pair( nullptr, 0 );
1883}
1884
1885Vector3 ExtractVector3( const uint8_t* vertex, const std::pair<const granny_data_type_definition*, int32_t>& element )
1886{

Callers 2

FillResultFunction · 0.85
GrannyRayIntersectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected