MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / RotateObject

Function RotateObject

editor/HObject.cpp:611–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609}
610
611bool RotateObject(int objnum, angle p, angle h, angle b) {
612 object *obj = &Objects[objnum];
613 matrix rotmat;
614
615 vm_AnglesToMatrix(&rotmat, p, h, b);
616 obj->orient *= rotmat; // ObjSetOrient is below
617
618 vm_Orthogonalize(&obj->orient);
619 ObjSetOrient(obj, &obj->orient);
620
621 Object_moved = 1;
622
623 return 1;
624}
625
626// Flipping of object
627void HObjectFlip() {

Callers 7

HObjectIncreaseBankFunction · 0.85
HObjectDecreaseBankFunction · 0.85
HObjectIncreasePitchFunction · 0.85
HObjectDecreasePitchFunction · 0.85
HObjectIncreaseHeadingFunction · 0.85
HObjectDecreaseheadingFunction · 0.85
OnObjRot90Method · 0.85

Calls 3

ObjSetOrientFunction · 0.85
vm_AnglesToMatrixFunction · 0.50
vm_OrthogonalizeFunction · 0.50

Tested by

no test coverage detected