Merge remote-tracking branch 'origin/master' into 1.10
# Conflicts: # Source/Editor/SceneGraph/Actors/StaticModelNode.cs # Source/Engine/Graphics/Models/Mesh.cs # Source/Engine/Graphics/Models/ModelData.h
This commit is contained in:
@@ -520,4 +520,24 @@ PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||
return result;
|
||||
}
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
Array<Vector3> Mesh::GetCollisionProxyPoints() const
|
||||
{
|
||||
PROFILE_CPU();
|
||||
Array<Vector3> result;
|
||||
#if USE_PRECISE_MESH_INTERSECTS
|
||||
for (int32 i = 0; i < _collisionProxy.Triangles.Count(); i++)
|
||||
{
|
||||
auto triangle = _collisionProxy.Triangles.Get()[i];
|
||||
result.Add(triangle.V0);
|
||||
result.Add(triangle.V1);
|
||||
result.Add(triangle.V2);
|
||||
}
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -536,5 +536,16 @@ namespace FlaxEngine
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#if FLAX_EDITOR
|
||||
/// <summary>
|
||||
/// Gets the collision proxy points for the mesh.
|
||||
/// </summary>
|
||||
/// <returns>The triangle points in the collision proxy.</returns>
|
||||
internal Vector3[] GetCollisionProxyPoints()
|
||||
{
|
||||
return Internal_GetCollisionProxyPoints(__unmanagedPtr, out _);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,5 +171,8 @@ private:
|
||||
API_FUNCTION(NoProxy) bool UpdateMeshUInt(int32 vertexCount, int32 triangleCount, const MArray* verticesObj, const MArray* trianglesObj, const MArray* normalsObj, const MArray* tangentsObj, const MArray* uvObj, const MArray* colorsObj);
|
||||
API_FUNCTION(NoProxy) bool UpdateMeshUShort(int32 vertexCount, int32 triangleCount, const MArray* verticesObj, const MArray* trianglesObj, const MArray* normalsObj, const MArray* tangentsObj, const MArray* uvObj, const MArray* colorsObj);
|
||||
API_FUNCTION(NoProxy) MArray* DownloadBuffer(bool forceGpu, MTypeObject* resultType, int32 typeI);
|
||||
#if USE_EDITOR
|
||||
API_FUNCTION(NoProxy) Array<Vector3> GetCollisionProxyPoints() const;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
int32 LightmapUVsIndex = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Global translation for this mesh to be at its local origin.
|
||||
/// Local translation for this mesh to be at it's local origin.
|
||||
/// </summary>
|
||||
Vector3 OriginTranslation = Vector3::Zero;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user