Merge remote-tracking branch 'origin/master' into 1.9
# Conflicts: # Content/Editor/Camera/M_Camera.flax # Content/Editor/CubeTexturePreviewMaterial.flax # Content/Editor/DebugMaterials/DDGIDebugProbes.flax # Content/Editor/DebugMaterials/SingleColor/Decal.flax # Content/Editor/DebugMaterials/SingleColor/Particle.flax # Content/Editor/DebugMaterials/SingleColor/Surface.flax # Content/Editor/DebugMaterials/SingleColor/SurfaceAdditive.flax # Content/Editor/DebugMaterials/SingleColor/Terrain.flax # Content/Editor/DefaultFontMaterial.flax # Content/Editor/Gizmo/FoliageBrushMaterial.flax # Content/Editor/Gizmo/Material.flax # Content/Editor/Gizmo/MaterialWire.flax # Content/Editor/Gizmo/SelectionOutlineMaterial.flax # Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax # Content/Editor/Highlight Material.flax # Content/Editor/Icons/IconsMaterial.flax # Content/Editor/IesProfilePreviewMaterial.flax # Content/Editor/Particles/Particle Material Color.flax # Content/Editor/Particles/Smoke Material.flax # Content/Editor/SpriteMaterial.flax # Content/Editor/Terrain/Circle Brush Material.flax # Content/Editor/Terrain/Highlight Terrain Material.flax # Content/Editor/TexturePreviewMaterial.flax # Content/Editor/Wires Debug Material.flax # Content/Engine/DefaultDeformableMaterial.flax # Content/Engine/DefaultMaterial.flax # Content/Engine/DefaultTerrainMaterial.flax # Content/Engine/SingleColorMaterial.flax # Content/Engine/SkyboxMaterial.flax # Source/Engine/Graphics/Materials/MaterialShader.h
This commit is contained in:
@@ -1281,8 +1281,8 @@ namespace FlaxEngine
|
||||
/// <returns>The position snapped to the grid.</returns>
|
||||
public static Float2 SnapToGrid(Float2 pos, Float2 gridSize)
|
||||
{
|
||||
pos.X = Mathf.Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.Y) * gridSize.X;
|
||||
pos.Y = Mathf.Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.X) * gridSize.Y;
|
||||
pos.X = Mathf.Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X;
|
||||
pos.Y = Mathf.Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y;
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
@@ -774,7 +774,7 @@ void Matrix::Transformation(const Float3& scalingCenter, const Quaternion& scali
|
||||
result = Translation(-scalingCenter) * Transpose(sr) * Scaling(scaling) * sr * Translation(scalingCenter) * Translation(-rotationCenter) * RotationQuaternion(rotation) * Translation(rotationCenter) * Translation(translation);
|
||||
}
|
||||
|
||||
void Matrix::Transformation2D(Float2& scalingCenter, float scalingRotation, const Float2& scaling, const Float2& rotationCenter, float rotation, const Float2& translation, Matrix& result)
|
||||
void Matrix::Transformation2D(const Float2& scalingCenter, float scalingRotation, const Float2& scaling, const Float2& rotationCenter, float rotation, const Float2& translation, Matrix& result)
|
||||
{
|
||||
result = Translation((Float3)-scalingCenter) * RotationZ(-scalingRotation) * Scaling((Float3)scaling) * RotationZ(scalingRotation) * Translation((Float3)scalingCenter) * Translation((Float3)-rotationCenter) * RotationZ(rotation) * Translation((Float3)rotationCenter) * Translation((Float3)translation);
|
||||
result.M33 = 1.0f;
|
||||
|
||||
@@ -941,7 +941,7 @@ public:
|
||||
// @param rotation The rotation of the transformation.
|
||||
// @param translation The translation factor of the transformation.
|
||||
// @param result When the method completes, contains the created transformation matrix.
|
||||
static void Transformation2D(Float2& scalingCenter, float scalingRotation, const Float2& scaling, const Float2& rotationCenter, float rotation, const Float2& translation, Matrix& result);
|
||||
static void Transformation2D(const Float2& scalingCenter, float scalingRotation, const Float2& scaling, const Float2& rotationCenter, float rotation, const Float2& translation, Matrix& result);
|
||||
|
||||
// Creates a world matrix with the specified parameters.
|
||||
// @param position Position of the object. This value is used in translation operations.
|
||||
|
||||
@@ -99,7 +99,7 @@ Rectangle Rectangle::FromPoints(const Float2& p1, const Float2& p2)
|
||||
return Rectangle(upperLeft, Math::Max(rightBottom - upperLeft, Float2::Zero));
|
||||
}
|
||||
|
||||
Rectangle Rectangle::FromPoints(Float2* points, int32 pointsCount)
|
||||
Rectangle Rectangle::FromPoints(const Float2* points, int32 pointsCount)
|
||||
{
|
||||
ASSERT(pointsCount > 0);
|
||||
Float2 upperLeft = points[0];
|
||||
|
||||
@@ -287,7 +287,7 @@ public:
|
||||
// @returns Rectangle that contains both p1 and p2
|
||||
static Rectangle FromPoints(const Float2& p1, const Float2& p2);
|
||||
|
||||
static Rectangle FromPoints(Float2* points, int32 pointsCount);
|
||||
static Rectangle FromPoints(const Float2* points, int32 pointsCount);
|
||||
};
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user