3#include "pixelbullet/audio/audio_spatial_settings.h"
4#include "pixelbullet/filesystem/virtual_path.h"
5#include "pixelbullet/filesystem/virtual_path_serialization.h"
6#include "pixelbullet/serialization/node.h"
18 float min_distance = 1.0f;
19 float max_distance = 20.0f;
23 return enabled == other.enabled && clip.LogicalPath() == other.clip.LogicalPath() && autoplay == other.autoplay &&
24 loop == other.loop && volume == other.volume && spatial == other.spatial && min_distance == other.min_distance &&
25 max_distance == other.max_distance;
31 node[
"enabled"] << component.enabled;
32 node[
"clip"] << component.clip;
33 node[
"autoplay"] << component.autoplay;
34 node[
"loop"] << component.loop;
35 node[
"volume"] << component.volume;
36 node[
"spatial"] << component.spatial;
37 node[
"minDistance"] << component.min_distance;
38 node[
"maxDistance"] << component.max_distance;
42inline const Node& operator>>(
const Node& node, AudioSourceComponent& component)
44 if (node.HasProperty(
"enabled"))
46 node[
"enabled"] >> component.enabled;
48 if (node.HasProperty(
"clip"))
50 node[
"clip"] >> component.clip;
52 if (node.HasProperty(
"autoplay"))
54 node[
"autoplay"] >> component.autoplay;
56 if (node.HasProperty(
"loop"))
58 node[
"loop"] >> component.loop;
60 if (node.HasProperty(
"volume"))
62 node[
"volume"] >> component.volume;
64 if (node.HasProperty(
"spatial"))
66 node[
"spatial"] >> component.spatial;
68 if (node.HasProperty(
"minDistance"))
70 node[
"minDistance"] >> component.min_distance;
72 if (node.HasProperty(
"maxDistance"))
74 node[
"maxDistance"] >> component.max_distance;
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition node.h:45
Definition virtual_path.h:10
Definition audio_source_component.h:11