Merge branch 'scene-actor-multi-select' of https://github.com/Tryibion/FlaxEngine into Tryibion-scene-actor-multi-select
This commit is contained in:
@@ -633,5 +633,14 @@ namespace FlaxEngine
|
||||
throw new Exception("Failed to download mesh data.");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collision proxy points for the mesh.
|
||||
/// </summary>
|
||||
/// <returns>The triangle points in the collision proxy.</returns>
|
||||
internal Float3[] GetCollisionProxyPoints()
|
||||
{
|
||||
return Internal_GetCollisionProxyPoints(__unmanagedPtr, out _);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,4 +847,19 @@ MArray* Mesh::DownloadBuffer(bool forceGpu, MTypeObject* resultType, int32 typeI
|
||||
return result;
|
||||
}
|
||||
|
||||
Array<Float3> Mesh::GetCollisionProxyPoints() const
|
||||
{
|
||||
Array<Vector3> result;
|
||||
#if USE_PRECISE_MESH_INTERSECTS
|
||||
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);
|
||||
}
|
||||
#endif
|
||||
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