MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / SetDefault

Method SetDefault

neo/framework/DeclAF.cpp:255–278  ·  view source on GitHub ↗

================ idDeclAF_Body::SetDefault ================ */

Source from the content-addressed store, hash-verified

253================
254*/
255void idDeclAF_Body::SetDefault( const idDeclAF *file ) {
256 name = "noname";
257 modelType = TRM_BOX;
258 v1.type = idAFVector::VEC_COORDS;
259 v1.ToVec3().x = v1.ToVec3().y = v1.ToVec3().z = -10.0f;
260 v2.type = idAFVector::VEC_COORDS;
261 v2.ToVec3().x = v2.ToVec3().y = v2.ToVec3().z = 10.0f;
262 numSides = 3;
263 origin.ToVec3().Zero();
264 angles.Zero();
265 density = 0.2f;
266 inertiaScale.Identity();
267 linearFriction = file->defaultLinearFriction;
268 angularFriction = file->defaultAngularFriction;
269 contactFriction = file->defaultContactFriction;
270 contents = file->contents;
271 clipMask = file->clipMask;
272 selfCollision = file->selfCollision;
273 frictionDirection.ToVec3().Zero();
274 contactMotorDirection.ToVec3().Zero();
275 jointName = "origin";
276 jointMod = DECLAF_JOINTMOD_AXIS;
277 containedJoints = "*origin";
278}
279
280/*
281================

Callers 9

ParseBodyMethod · 0.80
ParseFixedMethod · 0.80
ParseUniversalJointMethod · 0.80
ParseHingeMethod · 0.80
ParseSliderMethod · 0.80
ParseSpringMethod · 0.80
NewBodyMethod · 0.80
NewConstraintMethod · 0.80

Calls 5

IdentityMethod · 0.80
ToVec3Method · 0.45
ZeroMethod · 0.45
NumMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected