Physical Collision Map Asset

From COD Engine Research
Revision as of 17:00, 31 January 2014 by CraigChrist8239 (Talk | contribs)

Jump to: navigation, search

The physical collision map (phys_collmap) is the asset representation of what was previously known as the "physics geometry list" (PhysGeomList). This asset was added on Modern Warfare 2, and stayed for Modern Warfare 3 and Ghosts, Treyarch however continues to keep this part of the XModel asset. It has yet to change on any of the CoDs it has appeared in.

struct PhysMass  //NOTE: PhysMass is used in DynEntityDef's in the collision map.
  float centerOfMass[3];
  float momentsOfInertia[3];
  float productsOfInertia[3];
#pragma pack(push, 4)
struct cplane_s  //NOTE: cplane_s is used in other assets, such as collision map
  float normal[3];
  float dist;
  char type;
  char signbits;
struct cbrushside_t  //NOTE: cbrushside_t is used in other assets, such as collision map
  cplane_s *plane;
  unsigned int materialNum;
struct BrushWrapper
  float mins[3];
  float maxs[3];
  unsigned int numsides;
  cbrushside_t *sides;
  char *baseAdjacentSide;
  __int16 axialMaterialNum[2][3];
  __int16 firstAdjacentSideOffsets[2][3];
  int totalEdgeCount;
  cplane_s *planes;
#pragma pack(pop)
struct PhysGeomInfo
  BrushWrapper *brush;
  int type;
  float orientation[3][3];
  float offset[3];
  float halfLengths[3];
struct PhysGeomList
  const char * name;
  unsigned int count;
  PhysGeomInfo *geoms;
       char unknown[0x18];
  PhysMass mass;