mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
initial commit jolt
This commit is contained in:
parent
0c2aa5328c
commit
8acf7da95b
1086 changed files with 214612 additions and 4 deletions
41
Engine/lib/JoltPhysics/TestFramework/Image/ZoomImage.h
Normal file
41
Engine/lib/JoltPhysics/TestFramework/Image/ZoomImage.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
||||
// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Jolt/Core/Reference.h>
|
||||
|
||||
class Surface;
|
||||
|
||||
/// Filter function used to rescale the image
|
||||
enum EFilter
|
||||
{
|
||||
FilterBox,
|
||||
FilterTriangle,
|
||||
FilterBell,
|
||||
FilterBSpline,
|
||||
FilterLanczos3,
|
||||
FilterMitchell,
|
||||
};
|
||||
|
||||
/// Zoom settings for ZoomImage
|
||||
class ZoomSettings
|
||||
{
|
||||
public:
|
||||
/// Constructor
|
||||
ZoomSettings();
|
||||
|
||||
/// Comparison operators
|
||||
bool operator == (const ZoomSettings &inRHS) const;
|
||||
|
||||
/// Default settings
|
||||
static const ZoomSettings sDefault;
|
||||
|
||||
EFilter mFilter; ///< Filter function for image scaling
|
||||
bool mWrapFilter; ///< If true, the filter will be applied wrapping around the image, this provides better results for repeating textures
|
||||
float mBlur; ///< If > 1 then the image will be blurred, if < 1 the image will be sharpened
|
||||
};
|
||||
|
||||
/// Function to resize an image
|
||||
bool ZoomImage(RefConst<Surface> inSrc, Ref<Surface> ioDst, const ZoomSettings &inZoomSettings = ZoomSettings::sDefault);
|
||||
Loading…
Add table
Add a link
Reference in a new issue