00001 /******************************************************************************* 00002 The content of this file includes portions of the AUDIOKINETIC Wwise Technology 00003 released in source code form as part of the SDK installer package. 00004 00005 Commercial License Usage 00006 00007 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology 00008 may use this file in accordance with the end user license agreement provided 00009 with the software or, alternatively, in accordance with the terms contained in a 00010 written agreement between you and Audiokinetic Inc. 00011 00012 Apache License Usage 00013 00014 Alternatively, this file may be used under the Apache License, Version 2.0 (the 00015 "Apache License"); you may not use this file except in compliance with the 00016 Apache License. You may obtain a copy of the Apache License at 00017 http://www.apache.org/licenses/LICENSE-2.0. 00018 00019 Unless required by applicable law or agreed to in writing, software distributed 00020 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 00021 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for 00022 the specific language governing permissions and limitations under the License. 00023 00024 Version: <VERSION> Build: <BUILDNUMBER> 00025 Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc. 00026 *******************************************************************************/ 00027 00028 #ifndef _AK_REFLECT_GAMEDATA_H_ 00029 #define _AK_REFLECT_GAMEDATA_H_ 00030 00031 #include <AK/SoundEngine/Common/AkTypes.h> 00032 00033 #define AK_MAX_NUM_TEXTURE 4 00034 00035 /// Data used to describe one image source in Wwise Reflect. 00036 struct AkReflectImageSource 00037 { 00038 AkImageSourceID uID; ///< Image source ID (for matching delay lines across frames) 00039 AkVector sourcePosition; ///< Image source position, relative to the world. 00040 AkReal32 fDistanceScalingFactor; ///< Image source distance scaling. This number effectively scales the sourcePosition vector with respect to the listener, and consequently, scales distance and preserves orientation. 00041 AkReal32 fLevel; ///< Game-controlled level for this source, linear. 00042 AkUInt32 uNumTexture; ///< Number of valid textures in the texture array. 00043 AkUniqueID arTextureID[AK_MAX_NUM_TEXTURE]; ///< Unique IDs of the Acoustics Textures Shareset used to filter this image source. 00044 AkUInt32 uNumChar; ///< Number of characters of image source name. 00045 const char * pName; ///< Optional image source name. Appears in Wwise Reflect's editor when profiling. 00046 }; 00047 00048 /// Data structure sent by the game to an instance of the Wwise Reflect plugin. 00049 struct AkReflectGameData 00050 { 00051 AkGameObjectID listenerID; ///< ID of the listener used to compute spatialization and distance evaluation from within the targetted Reflect plugin instance. It needs to be one of the listeners that are listening to the game object associated with the targetted plugin instance. See AK::SoundEngine::SetListeners and AK::SoundEngine::SetGameObjectAuxSendValues. 00052 AkUInt32 uNumImageSources; ///< Number of image sources passed in the variable array, below. 00053 AkReflectImageSource arSources[1]; ///< Variable array of image sources. You should allocate storage for the structure by calling AkReflectGameData::GetSize() with the desired number of sources. 00054 00055 /// Default constructor. 00056 AkReflectGameData() 00057 : listenerID( AK_INVALID_GAME_OBJECT ) 00058 , uNumImageSources(0) 00059 {} 00060 00061 /// Helper function for computing the size required to allocate the AkReflectGameData structure. 00062 static AkUInt32 GetSize(AkUInt32 in_uNumSources) 00063 { 00064 return (in_uNumSources > 0) ? sizeof(AkReflectGameData) + (in_uNumSources - 1) * sizeof(AkReflectImageSource) : sizeof(AkReflectGameData); 00065 } 00066 }; 00067 #endif // _AK_REFLECT_GAMEDATA_H_