Use mesh collision proxy if available.
This commit is contained in:
@@ -847,4 +847,17 @@ MArray* Mesh::DownloadBuffer(bool forceGpu, MTypeObject* resultType, int32 typeI
|
||||
return result;
|
||||
}
|
||||
|
||||
Array<Float3> Mesh::GetCollisionProxyPoints() const
|
||||
{
|
||||
Array<Vector3> result;
|
||||
for (int i = 0; i < _collisionProxy.Triangles.Count(); ++i)
|
||||
{
|
||||
auto triangle = _collisionProxy.Triangles[i];
|
||||
result.Add(triangle.V0);
|
||||
result.Add(triangle.V1);
|
||||
result.Add(triangle.V2);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -320,5 +320,6 @@ private:
|
||||
API_FUNCTION(NoProxy) bool UpdateTrianglesUInt(int32 triangleCount, const MArray* trianglesObj);
|
||||
API_FUNCTION(NoProxy) bool UpdateTrianglesUShort(int32 triangleCount, const MArray* trianglesObj);
|
||||
API_FUNCTION(NoProxy) MArray* DownloadBuffer(bool forceGpu, MTypeObject* resultType, int32 typeI);
|
||||
API_FUNCTION(NoProxy) Array<Float3> GetCollisionProxyPoints() const;
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user