MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / initMeshObjects

Method initMeshObjects

Engine/source/ts/tsShapeInstance.cpp:208–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void TSShapeInstance::initMeshObjects()
209{
210 // add objects to trees
211 S32 numObjects = mShape->objects.size();
212 mMeshObjects.setSize(numObjects);
213 for (S32 i=0; i<numObjects; i++)
214 {
215 const TSObject * obj = &mShape->objects[i];
216 MeshObjectInstance * objInst = &mMeshObjects[i];
217
218 // hook up the object to it's node and transforms.
219 objInst->mTransforms = &mNodeTransforms;
220 objInst->nodeIndex = obj->nodeIndex;
221
222 // set up list of meshes
223 if (obj->numMeshes)
224 objInst->meshList = &mShape->meshes[obj->startMeshIndex];
225 else
226 objInst->meshList = NULL;
227
228 objInst->object = obj;
229 objInst->forceHidden = false;
230 }
231}
232
233void TSShapeInstance::setMaterialList( TSMaterialList *matList )
234{

Callers 1

refreshShapeMethod · 0.80

Calls 2

sizeMethod · 0.45
setSizeMethod · 0.45

Tested by

no test coverage detected