/******************************************************************************* The content of this file includes portions of the proprietary AUDIOKINETIC Wwise Technology released in source code form as part of the game integration package. The content of this file may not be used without valid licenses to the AUDIOKINETIC Wwise Technology. Note that the use of the game engine is subject to the Unreal(R) Engine End User License Agreement at https://www.unrealengine.com/en-US/eula/unreal License Usage Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use this file in accordance with the end user license agreement provided with the software or, alternatively, in accordance with the terms contained in a written agreement between you and Audiokinetic Inc. Copyright (c) 2023 Audiokinetic Inc. *******************************************************************************/ /*============================================================================= Array2D.h: =============================================================================*/ #pragma once template class Array2D : public TArray { public: typedef int32 size_type; typedef T reference; Array2D(size_type in_sizeX, size_type in_sizeY) : TArray() , m_sizeX(in_sizeX) , m_sizeY(in_sizeY) { TArray::Init(0, in_sizeX * in_sizeY); } Array2D(size_type in_sizeX, size_type in_sizeY, T in_defaultValue) : TArray() , m_sizeX(in_sizeX) , m_sizeY(in_sizeY) { TArray::Init(in_defaultValue, in_sizeX * in_sizeY); } inline reference& operator() (size_type in_x, size_type in_y) { return At(in_x, in_y); } inline const reference& operator() (size_type in_x, size_type in_y) const { return At(in_x, in_y); } inline reference& At(size_type in_x, size_type in_y) { return TArray::GetData()[in_y*m_sizeX + in_x]; } inline const reference& At(size_type in_x, size_type in_y) const { return TArray::GetData()[in_y*m_sizeX + in_x]; } size_type m_sizeX; size_type m_sizeY; };