MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / sortQuadWindingOrder

Function sortQuadWindingOrder

Engine/source/math/mathUtils.cpp:1144–1162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1142}
1143
1144void sortQuadWindingOrder( const MatrixF &quadMat, bool clockwise, const Point3F *verts, U32 *vertMap, U32 count )
1145{
1146 PROFILE_SCOPE( MathUtils_sortQuadWindingOrder );
1147
1148 if ( count == 0 )
1149 return;
1150
1151 Point3F *quadPoints = new Point3F[count];
1152
1153 for ( S32 i = 0; i < count; i++ )
1154 {
1155 quadMat.mulP( verts[i], &quadPoints[i] );
1156 quadPoints[i].normalizeSafe();
1157 }
1158
1159 sortQuadWindingOrder( clockwise, quadPoints, vertMap, count );
1160
1161 delete [] quadPoints;
1162}
1163
1164void sortQuadWindingOrder( bool clockwise, const Point3F *verts, U32 *vertMap, U32 count )
1165{

Callers 1

generateMethod · 0.85

Calls 4

mAtan2Function · 0.85
dQsortFunction · 0.85
mulPMethod · 0.80
normalizeSafeMethod · 0.45

Tested by

no test coverage detected