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

Method constructTSMesh

Engine/source/ts/loader/appMesh.cpp:127–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127TSMesh* AppMesh::constructTSMesh()
128{
129 TSMesh* tsmesh;
130 if (isSkin())
131 {
132 TSSkinMesh* tsskin = new TSSkinMesh();
133 tsmesh = tsskin;
134
135 // Copy skin elements
136 tsskin->weight = weight;
137 tsskin->boneIndex = boneIndex;
138 tsskin->vertexIndex = vertexIndex;
139 tsskin->batchData.nodeIndex = nodeIndex;
140 tsskin->batchData.initialTransforms = initialTransforms;
141 tsskin->batchData.initialVerts = initialVerts;
142 tsskin->batchData.initialNorms = initialNorms;
143 }
144 else
145 {
146 tsmesh = new TSMesh();
147 }
148
149 // Copy mesh elements
150 tsmesh->verts = points;
151 tsmesh->norms = normals;
152 tsmesh->tverts = uvs;
153 tsmesh->primitives = primitives;
154 tsmesh->indices = indices;
155 tsmesh->colors = colors;
156 tsmesh->tverts2 = uv2s;
157
158 // Finish initializing the shape
159 tsmesh->setFlags(flags);
160 tsmesh->updateMeshFlags();
161 tsmesh->computeBounds();
162 tsmesh->numFrames = numFrames;
163 tsmesh->numMatFrames = numMatFrames;
164 tsmesh->vertsPerFrame = vertsPerFrame;
165 tsmesh->createTangents(tsmesh->verts, tsmesh->norms);
166 tsmesh->encodedNorms.set(NULL,0);
167
168 return tsmesh;
169}
170
171bool AppMesh::isBillboard()
172{

Callers 1

installMethod · 0.80

Calls 5

updateMeshFlagsMethod · 0.80
createTangentsMethod · 0.80
setFlagsMethod · 0.45
computeBoundsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected