MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / writeGeom

Function writeGeom

physx/source/physx/src/NpBatchQuery.cpp:116–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114} // namespace physx
115
116static void writeGeom(BatchQueryStream& stream, const PxGeometry& geom)
117{
118 PxGeometryType::Enum geomType = geom.getType();
119 stream.write<PxU32>(PxU32(geomType));
120 switch (geomType)
121 {
122 case PxGeometryType::eCAPSULE:
123 stream.write<PxCapsuleGeometry>(static_cast<const PxCapsuleGeometry&>(geom));
124 break;
125 case PxGeometryType::eSPHERE:
126 stream.write<PxSphereGeometry>(static_cast<const PxSphereGeometry&>(geom));
127 break;
128 case PxGeometryType::eCONVEXMESH:
129 stream.write<PxConvexMeshGeometry>(static_cast<const PxConvexMeshGeometry&>(geom));
130 break;
131 case PxGeometryType::eBOX:
132 stream.write<PxBoxGeometry>(static_cast<const PxBoxGeometry&>(geom));
133 break;
134 case PxGeometryType::ePLANE:
135 case PxGeometryType::eTRIANGLEMESH:
136 case PxGeometryType::eHEIGHTFIELD:
137 case PxGeometryType::eGEOMETRY_COUNT:
138 case PxGeometryType::eINVALID:
139 PX_ALWAYS_ASSERT_MESSAGE("Unsupported geometry type in writeGeom");
140 }
141}
142
143static PxGeometry* readGeom(BatchQueryStreamReader& reader)
144{

Callers 1

writeQueryInputFunction · 0.85

Calls 1

getTypeMethod · 0.45

Tested by

no test coverage detected