MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / createPrefab

Function createPrefab

radiantcore/patch/algorithm/Prefab.cpp:99–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void createPrefab(const cmd::ArgumentList& args)
100{
101 if (args.size() != 1)
102 {
103 rError() << "Usage: createPatchPrefab <type>" << std::endl
104 << " with <type> being one of the following: " << std::endl
105 << "cylinder, densecylinder, verydensecylinder, squarecylinder," << std::endl
106 << "sphere, endcap, bevel, cone" << std::endl;
107 return;
108 }
109
110 std::string typeStr = string::to_lower_copy(args[0].getString());
111
112 if (typeStr == "cylinder")
113 {
114 createPrefabInternal(eCylinder, "patchCreateCylinder");
115 }
116 else if (typeStr == "densecylinder")
117 {
118 createPrefabInternal(eDenseCylinder, "patchCreateDenseCylinder");
119 }
120 else if (typeStr == "verydensecylinder")
121 {
122 createPrefabInternal(eVeryDenseCylinder, "patchCreateVeryDenseCylinder");
123 }
124 else if (typeStr == "squarecylinder")
125 {
126 createPrefabInternal(eSqCylinder, "patchCreateSquareCylinder");
127 }
128 else if (typeStr == "sphere")
129 {
130 createPrefabInternal(eSphere, "patchCreateSphere");
131 }
132 else if (typeStr == "endcap")
133 {
134 createPrefabInternal(eEndCap, "patchCreateCaps");
135 }
136 else if (typeStr == "bevel")
137 {
138 createPrefabInternal(eBevel, "patchCreateBevel");
139 }
140 else if (typeStr == "cone")
141 {
142 createPrefabInternal(eCone, "patchCreateCone");
143 }
144}
145
146void createCylinder(const cmd::ArgumentList& args)
147{

Callers

nothing calls this directly

Calls 5

rErrorFunction · 0.85
to_lower_copyFunction · 0.85
createPrefabInternalFunction · 0.85
sizeMethod · 0.45
getStringMethod · 0.45

Tested by

no test coverage detected