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

Method createEmptyShape

Engine/source/ts/tsShape.cpp:2023–2126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2021}
2022
2023void TSShape::createEmptyShape()
2024{
2025 nodes.set(dMalloc(1 * sizeof(Node)), 1);
2026 nodes[0].nameIndex = 1;
2027 nodes[0].parentIndex = -1;
2028 nodes[0].firstObject = 0;
2029 nodes[0].firstChild = -1;
2030 nodes[0].nextSibling = -1;
2031
2032 objects.set(dMalloc(1 * sizeof(Object)), 1);
2033 objects[0].nameIndex = 2;
2034 objects[0].numMeshes = 1;
2035 objects[0].startMeshIndex = 0;
2036 objects[0].nodeIndex = 0;
2037 objects[0].nextSibling = -1;
2038 objects[0].firstDecal = -1;
2039
2040 objectStates.set(dMalloc(1 * sizeof(ObjectState)), 1);
2041 objectStates[0].vis = 1;
2042 objectStates[0].frameIndex = 0;
2043 objectStates[0].matFrameIndex = 0;
2044
2045 subShapeFirstNode.set(dMalloc(1 * sizeof(S32)), 1);
2046 subShapeFirstNode[0] = 0;
2047
2048 subShapeFirstObject.set(dMalloc(1 * sizeof(S32)), 1);
2049 subShapeFirstObject[0] = 0;
2050
2051 detailFirstSkin.set(NULL, 0);
2052
2053 subShapeNumNodes.set(dMalloc(1 * sizeof(S32)), 1);
2054 subShapeNumNodes[0] = 1;
2055
2056 subShapeNumObjects.set(dMalloc(1 * sizeof(S32)), 1);
2057 subShapeNumObjects[0] = 1;
2058
2059 details.set(dMalloc(1 * sizeof(Detail)), 1);
2060 details[0].nameIndex = 0;
2061 details[0].subShapeNum = 0;
2062 details[0].objectDetailNum = 0;
2063 details[0].size = 2.0f;
2064 details[0].averageError = -1.0f;
2065 details[0].maxError = -1.0f;
2066 details[0].polyCount = 0;
2067
2068 defaultRotations.set(dMalloc(1 * sizeof(Quat16)), 1);
2069 defaultRotations[0].x = 0.0f;
2070 defaultRotations[0].y = 0.0f;
2071 defaultRotations[0].z = 0.0f;
2072 defaultRotations[0].w = 0.0f;
2073
2074 defaultTranslations.set(dMalloc(1 * sizeof(Point3F)), 1);
2075 defaultTranslations[0].set(0.0f, 0.0f, 0.0f);
2076
2077 subShapeFirstTranslucentObject.set(dMalloc(1 * sizeof(S32)), 1);
2078 subShapeFirstTranslucentObject[0] = 1;
2079
2080 alphaIn.set(dMalloc(1 * sizeof(F32)), 1);

Callers

nothing calls this directly

Calls 4

setMethod · 0.45
setSizeMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected