OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 28 matching lines...) Expand all Loading... |
39 // http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specifica
tion.htm. | 39 // http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specifica
tion.htm. |
40 | 40 |
41 class PLATFORM_EXPORT DistanceEffect { | 41 class PLATFORM_EXPORT DistanceEffect { |
42 DISALLOW_NEW(); | 42 DISALLOW_NEW(); |
43 | 43 |
44 public: | 44 public: |
45 enum ModelType { ModelLinear = 0, ModelInverse = 1, ModelExponential = 2 }; | 45 enum ModelType { ModelLinear = 0, ModelInverse = 1, ModelExponential = 2 }; |
46 | 46 |
47 DistanceEffect(); | 47 DistanceEffect(); |
48 | 48 |
49 // Returns scalar gain for the given distance the current distance model is us
ed | 49 // Returns scalar gain for the given distance the current distance model is |
| 50 // used |
50 double gain(double distance); | 51 double gain(double distance); |
51 | 52 |
52 ModelType model() { return m_model; } | 53 ModelType model() { return m_model; } |
53 | 54 |
54 void setModel(ModelType model, bool clamped) { | 55 void setModel(ModelType model, bool clamped) { |
55 m_model = model; | 56 m_model = model; |
56 m_isClamped = clamped; | 57 m_isClamped = clamped; |
57 } | 58 } |
58 | 59 |
59 // Distance params | 60 // Distance params |
(...skipping 15 matching lines...) Expand all Loading... |
75 ModelType m_model; | 76 ModelType m_model; |
76 bool m_isClamped; | 77 bool m_isClamped; |
77 double m_refDistance; | 78 double m_refDistance; |
78 double m_maxDistance; | 79 double m_maxDistance; |
79 double m_rolloffFactor; | 80 double m_rolloffFactor; |
80 }; | 81 }; |
81 | 82 |
82 } // namespace blink | 83 } // namespace blink |
83 | 84 |
84 #endif // Distance_h | 85 #endif // Distance_h |
OLD | NEW |