版本
menu

Wwise SDK 2025.1.0
Ak3DObjects.h
浏览该文件的文档.
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Copyright (c) 2025 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 #pragma once
28 
31 
32 /// 3D 64-bit vector. Intended as storage for world positions of sounds and objects, benefiting from 64-bit precision range
33 struct AkVector64
34 {
35 #ifdef __cplusplus
36  inline AkVector64 operator+(const AkVector64& b) const
37  {
38  AkVector64 v;
39 
40  v.X = X + b.X;
41  v.Y = Y + b.Y;
42  v.Z = Z + b.Z;
43 
44  return v;
45  }
46 
47  inline AkVector64 operator-(const AkVector64& b) const
48  {
49  AkVector64 v;
50 
51  v.X = X - b.X;
52  v.Y = Y - b.Y;
53  v.Z = Z - b.Z;
54 
55  return v;
56  }
57 
58  inline void Zero()
59  {
60  X = 0; Y = 0; Z = 0;
61  }
62 #endif
63 
64  AkReal64 X; ///< X Position
65  AkReal64 Y; ///< Y Position
66  AkReal64 Z; ///< Z Position
67 };
68 
69 /// 3D vector for some operations in 3D space. Typically intended only for localized calculations due to 32-bit precision
70 struct AkVector
71 {
72 #ifdef __cplusplus
73 
74  inline AkVector operator+(const AkVector& b) const
75  {
76  AkVector v;
77 
78  v.X = X + b.X;
79  v.Y = Y + b.Y;
80  v.Z = Z + b.Z;
81 
82  return v;
83  }
84 
85  inline AkVector operator-(const AkVector& b) const
86  {
87  AkVector v;
88 
89  v.X = X - b.X;
90  v.Y = Y - b.Y;
91  v.Z = Z - b.Z;
92 
93  return v;
94  }
95 
96  inline AkVector operator*(const AkReal32 f) const
97  {
98  AkVector v;
99 
100  v.X = X * f;
101  v.Y = Y * f;
102  v.Z = Z * f;
103 
104  return v;
105  }
106 
107  inline AkVector operator/(const AkReal32 f) const
108  {
109  AkVector v;
110 
111  v.X = X / f;
112  v.Y = Y / f;
113  v.Z = Z / f;
114 
115  return v;
116  }
117 
118  inline void Zero()
119  {
120  X = 0; Y = 0; Z = 0;
121  }
122 
123  // Helper for implicit conversion to AkVector64. ConvertAkVectorToAkVector64 is still preferable to make it more obvious where upconversion occurs.
124  inline operator AkVector64() const { return AkVector64{ X, Y, Z }; }
125 #endif
126 
127  AkReal32 X; ///< X Position
128  AkReal32 Y; ///< Y Position
129  AkReal32 Z; ///< Z Position
130 };
131 
132 /// Position and orientation of game objects in the world (i.e. supports 64-bit-precision position)
134 {
135 #ifdef __cplusplus
136 public:
137  //
138  // Getters.
139  //
140 
141  /// Get position vector.
142  inline const AkVector64 & Position() const
143  {
144  return *reinterpret_cast<const AkVector64*>(&position);
145  }
146 
147  /// Get orientation front vector.
148  inline const AkVector & OrientationFront() const
149  {
150  return *reinterpret_cast<const AkVector*>(&orientationFront);
151  }
152 
153  /// Get orientation top vector.
154  inline const AkVector & OrientationTop() const
155  {
156  return *reinterpret_cast<const AkVector*>(&orientationTop);
157  }
158 
159  //
160  // Setters.
161  //
162 
163  /// Set position and orientation. Orientation front and top should be orthogonal and normalized.
164  inline void Set(
165  const AkVector64 & in_position, ///< Position vector.
166  const AkVector & in_orientationFront, ///< Orientation front
167  const AkVector & in_orientationTop ///< Orientation top
168  )
169  {
170  position = in_position;
171  orientationFront = in_orientationFront;
172  orientationTop = in_orientationTop;
173  }
174 
175  /// Set position and orientation. Orientation front and top should be orthogonal and normalized.
176  inline void Set(
177  AkReal64 in_positionX, ///< Position x
178  AkReal64 in_positionY, ///< Position y
179  AkReal64 in_positionZ, ///< Position z
180  AkReal32 in_orientFrontX, ///< Orientation front x
181  AkReal32 in_orientFrontY, ///< Orientation front y
182  AkReal32 in_orientFrontZ, ///< Orientation front z
183  AkReal32 in_orientTopX, ///< Orientation top x
184  AkReal32 in_orientTopY, ///< Orientation top y
185  AkReal32 in_orientTopZ ///< Orientation top z
186  )
187  {
188  position.X = in_positionX;
189  position.Y = in_positionY;
190  position.Z = in_positionZ;
191  orientationFront.X = in_orientFrontX;
192  orientationFront.Y = in_orientFrontY;
193  orientationFront.Z = in_orientFrontZ;
194  orientationTop.X = in_orientTopX;
195  orientationTop.Y = in_orientTopY;
196  orientationTop.Z = in_orientTopZ;
197  }
198 
199  /// Set position.
200  inline void SetPosition(
201  const AkVector64 & in_position ///< Position vector.
202  )
203  {
204  position = in_position;
205  }
206 
207  /// Set position.
208  inline void SetPosition(
209  AkReal64 in_x, ///< x
210  AkReal64 in_y, ///< y
211  AkReal64 in_z ///< z
212  )
213  {
214  position.X = in_x;
215  position.Y = in_y;
216  position.Z = in_z;
217  }
218 
219  /// Set orientation. Orientation front and top should be orthogonal and normalized.
220  inline void SetOrientation(
221  const AkVector & in_orientationFront, ///< Orientation front
222  const AkVector & in_orientationTop ///< Orientation top
223  )
224  {
225  orientationFront = in_orientationFront;
226  orientationTop = in_orientationTop;
227  }
228 
229  /// Set orientation. Orientation front and top should be orthogonal and normalized.
230  inline void SetOrientation(
231  AkReal32 in_orientFrontX, ///< Orientation front x
232  AkReal32 in_orientFrontY, ///< Orientation front y
233  AkReal32 in_orientFrontZ, ///< Orientation front z
234  AkReal32 in_orientTopX, ///< Orientation top x
235  AkReal32 in_orientTopY, ///< Orientation top y
236  AkReal32 in_orientTopZ ///< Orientation top z
237  )
238  {
239  orientationFront.X = in_orientFrontX;
240  orientationFront.Y = in_orientFrontY;
241  orientationFront.Z = in_orientFrontZ;
242  orientationTop.X = in_orientTopX;
243  orientationTop.Y = in_orientTopY;
244  orientationTop.Z = in_orientTopZ;
245  }
246 #endif
247 
248  struct AkVector orientationFront; ///< Orientation of the listener
249  struct AkVector orientationTop; ///< Top orientation of the listener
250  struct AkVector64 position; ///< Position of the listener
251 };
252 
253 /// Position and orientation of objects in a "local" space
255 {
256 #ifdef __cplusplus
257 public:
258  //
259  // Getters.
260  //
261 
262  /// Get position vector.
263  inline const AkVector& Position() const
264  {
265  return position;
266  }
267 
268  /// Get orientation front vector.
269  inline const AkVector& OrientationFront() const
270  {
271  return orientationFront;
272  }
273 
274  /// Get orientation top vector.
275  inline const AkVector& OrientationTop() const
276  {
277  return orientationTop;
278  }
279 
280  //
281  // Setters.
282  //
283 
284  /// Set position and orientation. Orientation front and top should be orthogonal and normalized.
285  inline void Set(
286  const AkVector& in_position, ///< Position vector.
287  const AkVector& in_orientationFront, ///< Orientation front
288  const AkVector& in_orientationTop ///< Orientation top
289  )
290  {
291  position = in_position;
292  orientationFront = in_orientationFront;
293  orientationTop = in_orientationTop;
294  }
295 
296  /// Set position and orientation. Orientation front and top should be orthogonal and normalized.
297  inline void Set(
298  AkReal32 in_positionX, ///< Position x
299  AkReal32 in_positionY, ///< Position y
300  AkReal32 in_positionZ, ///< Position z
301  AkReal32 in_orientFrontX, ///< Orientation front x
302  AkReal32 in_orientFrontY, ///< Orientation front y
303  AkReal32 in_orientFrontZ, ///< Orientation front z
304  AkReal32 in_orientTopX, ///< Orientation top x
305  AkReal32 in_orientTopY, ///< Orientation top y
306  AkReal32 in_orientTopZ ///< Orientation top z
307  )
308  {
309  position.X = in_positionX;
310  position.Y = in_positionY;
311  position.Z = in_positionZ;
312  orientationFront.X = in_orientFrontX;
313  orientationFront.Y = in_orientFrontY;
314  orientationFront.Z = in_orientFrontZ;
315  orientationTop.X = in_orientTopX;
316  orientationTop.Y = in_orientTopY;
317  orientationTop.Z = in_orientTopZ;
318  }
319 
320  /// Set position.
321  inline void SetPosition(
322  const AkVector& in_position ///< Position vector.
323  )
324  {
325  position = in_position;
326  }
327 
328  /// Set position.
329  inline void SetPosition(
330  AkReal32 in_x, ///< x
331  AkReal32 in_y, ///< y
332  AkReal32 in_z ///< z
333  )
334  {
335  position.X = in_x;
336  position.Y = in_y;
337  position.Z = in_z;
338  }
339 
340  /// Set orientation. Orientation front and top should be orthogonal and normalized.
341  inline void SetOrientation(
342  const AkVector& in_orientationFront, ///< Orientation front
343  const AkVector& in_orientationTop ///< Orientation top
344  )
345  {
346  orientationFront = in_orientationFront;
347  orientationTop = in_orientationTop;
348  }
349 
350  /// Set orientation. Orientation front and top should be orthogonal and normalized.
351  inline void SetOrientation(
352  AkReal32 in_orientFrontX, ///< Orientation front x
353  AkReal32 in_orientFrontY, ///< Orientation front y
354  AkReal32 in_orientFrontZ, ///< Orientation front z
355  AkReal32 in_orientTopX, ///< Orientation top x
356  AkReal32 in_orientTopY, ///< Orientation top y
357  AkReal32 in_orientTopZ ///< Orientation top z
358  )
359  {
360  orientationFront.X = in_orientFrontX;
361  orientationFront.Y = in_orientFrontY;
362  orientationFront.Z = in_orientFrontZ;
363  orientationTop.X = in_orientTopX;
364  orientationTop.Y = in_orientTopY;
365  orientationTop.Z = in_orientTopZ;
366  }
367 
368  // Helper for implicit conversion to AkWorldTransform. ConvertAkTransformToAkWorldTransform is still preferable to make it more obvious where upconversion occurs.
369  inline operator AkWorldTransform() const {
370  AkWorldTransform ret;
372  return ret;
373  }
374 
375 #endif
376 
377  struct AkVector orientationFront; ///< Orientation of the listener
378  struct AkVector orientationTop; ///< Top orientation of the listener
379  struct AkVector position; ///< Position of the listener
380 };
381 
382 /// Positioning information for a sound.
383 typedef struct AkWorldTransform AkSoundPosition;
384 
385 /// Positioning information for a listener.
386 typedef struct AkWorldTransform AkListenerPosition;
387 
388 /// Positioning information for a sound, with specified subset of its channels.
390 {
391  struct AkWorldTransform position; ///< Emitter position.
392  AkChannelMask uInputChannels; ///< Channels to which the above position applies.
393 };
394 
395 /// Polar coordinates.
397 {
398  AkReal32 r; ///< Norm/distance
399  AkReal32 theta; ///< Azimuth
400 };
401 
402 #ifdef __cplusplus
403 namespace AK
404 {
405  // Helper functions to make transitions between 64b and 32b conversion easier
406 
407  // Warning: this conversion incurs a loss of precision and range
409  {
410  AkVector out;
411  out.X = (AkReal32)in.X;
412  out.Y = (AkReal32)in.Y;
413  out.Z = (AkReal32)in.Z;
414  return out;
415  }
416 
417  // Warning: this conversion incurs a loss of precision and range in position data
419  {
420  AkTransform out;
422  out.Set(pos, in.OrientationFront(), in.OrientationTop());
423  return out;
424  }
425 
427  {
428  AkVector64 out;
429  out.X = (AkReal64)in.X;
430  out.Y = (AkReal64)in.Y;
431  out.Z = (AkReal64)in.Z;
432  return out;
433  }
434 
436  {
437  AkWorldTransform out;
439  out.Set(pos, in.OrientationFront(), in.OrientationTop());
440  return out;
441  }
442 
443  // \deprecated Use AkMultiPositionType.
449 }
450 
451 /// Spherical coordinates.
453 {
454  AkReal32 phi; ///< Elevation
455 };
456 
457 /// Emitter-listener pair: Positioning data pertaining to a single pair of emitter and listener.
459 {
460 public:
461  /// Constructor.
463  : fDistance(0.f)
464  , fEmitterAngle(0.f)
465  , fListenerAngle(0.f)
466  , fDryMixGain(1.f)
467  , fGameDefAuxMixGain(1.f)
468  , fUserDefAuxMixGain(1.f)
469  , fOcclusion(0.f)
470  , fObstruction(0.f)
471  , fDiffraction(0.f)
472  , fTransmissionLoss(0.f)
473  , fSpread(0.f)
474  , fAperture(100.f)
475  , fScalingFactor(1.f)
476  , fPathGain(1.f)
477  , uEmitterChannelMask(0xFFFFFFFF)
478  , id(0)
479  , m_uListenerID(0)
480  {
481  }
482  /// Destructor.
484 
485  /// Get distance.
486  inline AkReal32 Distance() const { return fDistance; }
487 
488  /// Get the absolute angle, in radians between 0 and pi, of the emitter's orientation relative to
489  /// the line that joins the emitter and the listener.
490  inline AkReal32 EmitterAngle() const { return fEmitterAngle; }
491 
492  /// Get the absolute angle, in radians between 0 and pi, of the listener's orientation relative to
493  /// the line that joins the emitter and the listener
494  inline AkReal32 ListenerAngle() const { return fListenerAngle; }
495 
496  /// Get the occlusion factor for this emitter-listener pair
497  inline AkReal32 Occlusion() const { return fOcclusion; }
498 
499  /// Get the obstruction factor for this emitter-listener pair
500  inline AkReal32 Obstruction() const { return fObstruction; }
501 
502  /// Get the diffraction factor for this emitter-listener pair
503  inline AkReal32 Diffraction() const { return fDiffraction; }
504 
505  /// Get the transmission loss factor for this emitter-listener pair
506  inline AkReal32 TransmissionLoss() const { return fTransmissionLoss; }
507 
508  /// Get the overall path-contribution gain, used to scale the dry + gamedef + userdef gains
509  inline AkReal32 PathGain() const { return fPathGain; }
510 
511  /// Get the emitter-listener-pair-specific gain (due to distance and cone attenuation), linear [0,1], for a given connection type.
513  {
514  if (in_eType == ConnectionType_Direct)
515  return fDryMixGain;
516  else if (in_eType == ConnectionType_GameDefSend)
517  return fGameDefAuxMixGain;
518  else if (in_eType == ConnectionType_UserDefSend)
519  return fUserDefAuxMixGain;
520  else
521  return 1.0f;
522  }
523 
524  /// Get the emitter-listener pair's ID.
525  inline AkRayID ID() const { return id; }
526 
527  /// Get listener ID associated with the emitter-listener pair.
528  inline AkGameObjectID ListenerID() const { return m_uListenerID; }
529 
530  AkWorldTransform emitter; ///< Emitter position.
531  AkReal32 fDistance; ///< Distance between emitter and listener.
532  AkReal32 fEmitterAngle; ///< Angle between position vector and emitter orientation.
533  AkReal32 fListenerAngle; ///< Angle between position vector and listener orientation.
534  AkReal32 fDryMixGain; ///< Emitter-listener-pair-specific gain (due to distance and cone attenuation) for direct connections.
535  AkReal32 fGameDefAuxMixGain; ///< Emitter-listener-pair-specific gain (due to distance and cone attenuation) for game-defined send connections.
536  AkReal32 fUserDefAuxMixGain; ///< Emitter-listener-pair-specific gain (due to distance and cone attenuation) for user-defined send connections.
537  AkReal32 fOcclusion; ///< Emitter-listener-pair-specific occlusion factor
538  AkReal32 fObstruction; ///< Emitter-listener-pair-specific obstruction factor
539  AkReal32 fDiffraction; ///< Emitter-listener-pair-specific diffraction coefficient
540  AkReal32 fTransmissionLoss; ///< Emitter-listener-pair-specific transmission occlusion.
541  AkReal32 fSpread; ///< Emitter-listener-pair-specific spread
542  AkReal32 fAperture; ///< Emitter-listener-pair-specific aperture
543  AkReal32 fScalingFactor; ///< Combined scaling factor due to both emitter and listener.
544  AkReal32 fPathGain; ///< Emitter-listener-pair-specific overall gain that scales fDryMixGain, fGameDefAuxMixGain and fUserDefAuxMixGain
545  AkChannelMask uEmitterChannelMask; ///< Channels of the emitter that apply to this ray.
546 
547 protected:
548  AkRayID id; ///< ID of this emitter-listener pair, unique for a given emitter.
549  AkGameObjectID m_uListenerID; ///< Listener game object ID.
550 };
551 #endif
552 
553 /// Listener information.
555 {
556 #ifdef __cplusplus
558  : fScalingFactor( 1.0f )
559  , bSpatialized( true )
560  {}
561 #endif
562  AkListenerPosition position; /// Listener position (see AK::SoundEngine::SetPosition()).
563  AkReal32 fScalingFactor; /// Listener scaling factor (see AK::SoundEngine::SetListenerScalingFactor()).
564  bool bSpatialized; /// Whether listener is spatialized or not (see AK::SoundEngine::SetListenerSpatialization()).
565 };
AkEmitterListenerPair()
Constructor.
Definition: Ak3DObjects.h:462
AkGameObjectID m_uListenerID
Listener game object ID.
Definition: Ak3DObjects.h:549
void SetOrientation(AkReal32 in_orientFrontX, AkReal32 in_orientFrontY, AkReal32 in_orientFrontZ, AkReal32 in_orientTopX, AkReal32 in_orientTopY, AkReal32 in_orientTopZ)
Set orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:351
AkConnectionType
Nature of the connection binding an input to a bus.
Definition: AkEnums.h:139
AkReal32 Occlusion() const
Get the occlusion factor for this emitter-listener pair
Definition: Ak3DObjects.h:497
void Zero()
Definition: Ak3DObjects.h:118
AkVector64 ConvertAkVectorToAkVector64(AkVector in)
Definition: Ak3DObjects.h:426
Definition of data structures for AkAudioObject
@ ConnectionType_Direct
Direct (main, dry) connection.
Definition: AkEnums.h:140
AkReal32 fEmitterAngle
Angle between position vector and emitter orientation.
Definition: Ak3DObjects.h:532
AkReal32 Diffraction() const
Get the diffraction factor for this emitter-listener pair
Definition: Ak3DObjects.h:503
void SetOrientation(const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:220
void Set(const AkVector64 &in_position, const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set position and orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:164
AkReal32 phi
Elevation
Definition: Ak3DObjects.h:454
void Zero()
Definition: Ak3DObjects.h:58
void SetOrientation(AkReal32 in_orientFrontX, AkReal32 in_orientFrontY, AkReal32 in_orientFrontZ, AkReal32 in_orientTopX, AkReal32 in_orientTopY, AkReal32 in_orientTopZ)
Set orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:230
AkReal32 Distance() const
Get distance.
Definition: Ak3DObjects.h:486
AkUInt64 AkGameObjectID
Game object ID
Definition: AkTypedefs.h:47
AkVector operator/(const AkReal32 f) const
Definition: Ak3DObjects.h:107
AkReal32 fSpread
Emitter-listener-pair-specific spread
Definition: Ak3DObjects.h:541
AkReal32 r
Norm/distance
Definition: Ak3DObjects.h:398
struct AkVector orientationFront
Orientation of the listener
Definition: Ak3DObjects.h:377
const AkVector & OrientationTop() const
Get orientation top vector.
Definition: Ak3DObjects.h:275
AkVector64 operator-(const AkVector64 &b) const
Definition: Ak3DObjects.h:47
AkUInt32 AkRayID
Unique (per emitter) identifier for an emitter-listener ray.
Definition: AkTypedefs.h:74
AkReal32 fDistance
Distance between emitter and listener.
Definition: Ak3DObjects.h:531
void Set(AkReal64 in_positionX, AkReal64 in_positionY, AkReal64 in_positionZ, AkReal32 in_orientFrontX, AkReal32 in_orientFrontY, AkReal32 in_orientFrontZ, AkReal32 in_orientTopX, AkReal32 in_orientTopY, AkReal32 in_orientTopZ)
Set position and orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:176
struct AkVector64 position
Position of the listener
Definition: Ak3DObjects.h:250
@ ConnectionType_GameDefSend
Connection by a game-defined send.
Definition: AkEnums.h:141
AkReal32 PathGain() const
Get the overall path-contribution gain, used to scale the dry + gamedef + userdef gains
Definition: Ak3DObjects.h:509
const AkMultiPositionType MultiPositionType_SingleSource
Definition: Ak3DObjects.h:445
void Set(AkReal32 in_positionX, AkReal32 in_positionY, AkReal32 in_positionZ, AkReal32 in_orientFrontX, AkReal32 in_orientFrontY, AkReal32 in_orientFrontZ, AkReal32 in_orientTopX, AkReal32 in_orientTopY, AkReal32 in_orientTopZ)
Set position and orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:297
void SetPosition(const AkVector64 &in_position)
Set position.
Definition: Ak3DObjects.h:200
void SetPosition(const AkVector &in_position)
Set position.
Definition: Ak3DObjects.h:321
void SetPosition(AkReal32 in_x, AkReal32 in_y, AkReal32 in_z)
Set position.
Definition: Ak3DObjects.h:329
AkWorldTransform emitter
Emitter position.
Definition: Ak3DObjects.h:530
@ AkMultiPositionType_Last
End of enum, invalid value.
Definition: AkEnums.h:320
Position and orientation of objects in a "local" space
Definition: Ak3DObjects.h:255
float AkReal32
32-bit floating point
AkReal32 fObstruction
Emitter-listener-pair-specific obstruction factor
Definition: Ak3DObjects.h:538
Emitter-listener pair: Positioning data pertaining to a single pair of emitter and listener.
Definition: Ak3DObjects.h:459
@ ConnectionType_UserDefSend
Connection by a user-defined send.
Definition: AkEnums.h:142
AkReal32 fGameDefAuxMixGain
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for game-defined send conn...
Definition: Ak3DObjects.h:535
AkReal32 fPathGain
Emitter-listener-pair-specific overall gain that scales fDryMixGain, fGameDefAuxMixGain and fUserDefA...
Definition: Ak3DObjects.h:544
struct AkWorldTransform position
Emitter position.
Definition: Ak3DObjects.h:391
AkReal32 EmitterAngle() const
Definition: Ak3DObjects.h:490
AkReal32 Y
Y Position
Definition: Ak3DObjects.h:128
const AkVector64 & Position() const
Get position vector.
Definition: Ak3DObjects.h:142
AkWorldTransform ConvertAkTransformToAkWorldTransform(AkTransform in)
Definition: Ak3DObjects.h:435
AkListenerPosition position
Definition: Ak3DObjects.h:562
AkVector operator+(const AkVector &b) const
Definition: Ak3DObjects.h:74
AkGameObjectID ListenerID() const
Get listener ID associated with the emitter-listener pair.
Definition: Ak3DObjects.h:528
AkReal32 X
X Position
Definition: Ak3DObjects.h:127
struct AkVector orientationTop
Top orientation of the listener
Definition: Ak3DObjects.h:249
void SetOrientation(const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:341
Spherical coordinates.
Definition: Ak3DObjects.h:453
AkReal32 fDiffraction
Emitter-listener-pair-specific diffraction coefficient
Definition: Ak3DObjects.h:539
@ AkMultiPositionType_MultiDirections
Simulate one sound coming from multiple directions. Useful for repositionning sounds based on wall op...
Definition: AkEnums.h:318
const AkMultiPositionType MultiPositionType_MultiSources
Definition: Ak3DObjects.h:446
AkReal32 Obstruction() const
Get the obstruction factor for this emitter-listener pair
Definition: Ak3DObjects.h:500
void Set(const AkVector &in_position, const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set position and orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:285
Positioning information for a sound, with specified subset of its channels.
Definition: Ak3DObjects.h:390
AkMultiPositionType
Definition: AkEnums.h:315
const AkVector & OrientationFront() const
Get orientation front vector.
Definition: Ak3DObjects.h:269
AkReal32 Z
Z Position
Definition: Ak3DObjects.h:129
const AkVector & Position() const
Get position vector.
Definition: Ak3DObjects.h:263
Polar coordinates.
Definition: Ak3DObjects.h:397
AkVector operator-(const AkVector &b) const
Definition: Ak3DObjects.h:85
AkReal32 GetGainForConnectionType(AkConnectionType in_eType) const
Get the emitter-listener-pair-specific gain (due to distance and cone attenuation),...
Definition: Ak3DObjects.h:512
AkTransform ConvertAkWorldTransformToAkTransform(AkWorldTransform in)
Definition: Ak3DObjects.h:418
double AkReal64
64-bit floating point
AkVector operator*(const AkReal32 f) const
Definition: Ak3DObjects.h:96
bool bSpatialized
Listener scaling factor (see AK::SoundEngine::SetListenerScalingFactor()).
Definition: Ak3DObjects.h:564
AkVector ConvertAkVector64ToAkVector(AkVector64 in)
Definition: Ak3DObjects.h:408
AkReal32 fScalingFactor
Combined scaling factor due to both emitter and listener.
Definition: Ak3DObjects.h:543
AkReal32 fDryMixGain
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for direct connections.
Definition: Ak3DObjects.h:534
AkReal32 fOcclusion
Emitter-listener-pair-specific occlusion factor
Definition: Ak3DObjects.h:537
AkReal64 Y
Y Position
Definition: Ak3DObjects.h:65
const AkVector & OrientationFront() const
Get orientation front vector.
Definition: Ak3DObjects.h:148
AkReal32 fListenerAngle
Angle between position vector and listener orientation.
Definition: Ak3DObjects.h:533
AkChannelMask uEmitterChannelMask
Channels of the emitter that apply to this ray.
Definition: Ak3DObjects.h:545
AkReal32 fTransmissionLoss
Emitter-listener-pair-specific transmission occlusion.
Definition: Ak3DObjects.h:540
void SetPosition(AkReal64 in_x, AkReal64 in_y, AkReal64 in_z)
Set position.
Definition: Ak3DObjects.h:208
const AkMultiPositionType MultiPositionType_Last
Definition: Ak3DObjects.h:448
AkReal32 theta
Azimuth
Definition: Ak3DObjects.h:399
struct AkVector orientationFront
Orientation of the listener
Definition: Ak3DObjects.h:248
AkRayID ID() const
Get the emitter-listener pair's ID.
Definition: Ak3DObjects.h:525
3D 64-bit vector. Intended as storage for world positions of sounds and objects, benefiting from 64-b...
Definition: Ak3DObjects.h:34
AkRayID id
ID of this emitter-listener pair, unique for a given emitter.
Definition: Ak3DObjects.h:548
Position and orientation of game objects in the world (i.e. supports 64-bit-precision position)
Definition: Ak3DObjects.h:134
AkReal32 fUserDefAuxMixGain
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for user-defined send conn...
Definition: Ak3DObjects.h:536
struct AkVector position
Position of the listener
Definition: Ak3DObjects.h:379
~AkEmitterListenerPair()
Destructor.
Definition: Ak3DObjects.h:483
AkVector64 operator+(const AkVector64 &b) const
Definition: Ak3DObjects.h:36
3D vector for some operations in 3D space. Typically intended only for localized calculations due to ...
Definition: Ak3DObjects.h:71
const AkMultiPositionType MultiPositionType_MultiDirections
Definition: Ak3DObjects.h:447
@ AkMultiPositionType_MultiSources
Simulate multiple sources in one sound playing, adding volumes. For instance, all the torches on your...
Definition: AkEnums.h:317
AkChannelMask uInputChannels
Channels to which the above position applies.
Definition: Ak3DObjects.h:392
AkReal32 fScalingFactor
Listener position (see AK::SoundEngine::SetPosition()).
Definition: Ak3DObjects.h:563
AkReal32 ListenerAngle() const
Definition: Ak3DObjects.h:494
Listener information.
Definition: Ak3DObjects.h:555
AkUInt32 AkChannelMask
Channel mask (similar to extensibleWavFormat). Bit values are defined in AkSpeakerConfig....
Definition: AkTypedefs.h:68
AkReal32 TransmissionLoss() const
Get the transmission loss factor for this emitter-listener pair
Definition: Ak3DObjects.h:506
AkReal32 fAperture
Emitter-listener-pair-specific aperture
Definition: Ak3DObjects.h:542
@ AkMultiPositionType_SingleSource
Used for normal sounds, not expected to pass to AK::SoundEngine::SetMultiplePosition() (if done,...
Definition: AkEnums.h:316
AkReal64 Z
Z Position
Definition: Ak3DObjects.h:66
AkReal64 X
X Position
Definition: Ak3DObjects.h:64
struct AkVector orientationTop
Top orientation of the listener
Definition: Ak3DObjects.h:378
const AkVector & OrientationTop() const
Get orientation top vector.
Definition: Ak3DObjects.h:154

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅