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

Method assembleShape

Engine/source/ts/tsShape.cpp:1189–1683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1187}
1188
1189void TSShape::assembleShape()
1190{
1191 S32 i,j;
1192
1193 // get counts...
1194 S32 numNodes = tsalloc.get32();
1195 S32 numObjects = tsalloc.get32();
1196 S32 numDecals = tsalloc.get32();
1197 S32 numSubShapes = tsalloc.get32();
1198 S32 numIflMaterials = tsalloc.get32();
1199 S32 numNodeRots;
1200 S32 numNodeTrans;
1201 S32 numNodeUniformScales;
1202 S32 numNodeAlignedScales;
1203 S32 numNodeArbitraryScales;
1204 if (smReadVersion<22)
1205 {
1206 numNodeRots = numNodeTrans = tsalloc.get32() - numNodes;
1207 numNodeUniformScales = numNodeAlignedScales = numNodeArbitraryScales = 0;
1208 }
1209 else
1210 {
1211 numNodeRots = tsalloc.get32();
1212 numNodeTrans = tsalloc.get32();
1213 numNodeUniformScales = tsalloc.get32();
1214 numNodeAlignedScales = tsalloc.get32();
1215 numNodeArbitraryScales = tsalloc.get32();
1216 }
1217 S32 numGroundFrames = 0;
1218 if (smReadVersion>23)
1219 numGroundFrames = tsalloc.get32();
1220 S32 numObjectStates = tsalloc.get32();
1221 S32 numDecalStates = tsalloc.get32();
1222 S32 numTriggers = tsalloc.get32();
1223 S32 numDetails = tsalloc.get32();
1224 S32 numMeshes = tsalloc.get32();
1225 S32 numSkins = 0;
1226 if (smReadVersion<23)
1227 // in later versions, skins are kept with other meshes
1228 numSkins = tsalloc.get32();
1229 S32 numNames = tsalloc.get32();
1230
1231 // Note that we are recalculating these values later on for safety.
1232 mSmallestVisibleSize = (F32)tsalloc.get32();
1233 mSmallestVisibleDL = tsalloc.get32();
1234
1235 tsalloc.checkGuard();
1236
1237 // get bounds...
1238 tsalloc.get32((S32*)&mRadius,1);
1239 tsalloc.get32((S32*)&tubeRadius,1);
1240 tsalloc.get32((S32*)&center,3);
1241 tsalloc.get32((S32*)&mBounds,6);
1242
1243 tsalloc.checkGuard();
1244
1245 // copy various vectors...
1246 S32 * ptr32 = tsalloc.copyToShape32(numNodes*5);

Callers

nothing calls this directly

Calls 15

getMaxFunction · 0.85
checkGuardMethod · 0.80
align32Method · 0.80
readAllocMethod · 0.80
dMemcpyFunction · 0.50
dMemsetFunction · 0.50
dMalloc_alignedFunction · 0.50
setMethod · 0.45
setSizeMethod · 0.45
sizeMethod · 0.45
addressMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected