Muto 0.0.1
Cross-Platform Application Template
GitHub Repo | Muto Updates | Muto's Author
Loading...
Searching...
No Matches
YAML::convert< glm::vec2 > Struct Reference

Static Public Member Functions

static bool decode (const Node &node, glm::vec2 &rhs)
 
static bool decode (const Node &node, glm::vec2 &rhs)
 
static Node encode (const glm::vec2 &rhs)
 
static Node encode (const glm::vec2 &rhs)
 

Member Function Documentation

◆ decode() [1/2]

static bool YAML::convert< glm::vec2 >::decode ( const Node &  node,
glm::vec2 &  rhs 
)
inlinestatic
27 {
28 if (!node.IsSequence() || node.size() != 2)
29 return false;
30
31 rhs.x = node[0].as<float>();
32 rhs.y = node[1].as<float>();
33 return true;
34 }

◆ decode() [2/2]

static bool YAML::convert< glm::vec2 >::decode ( const Node &  node,
glm::vec2 &  rhs 
)
inlinestatic
27 {
28 if (!node.IsSequence() || node.size() != 2)
29 return false;
30
31 rhs.x = node[0].as<float>();
32 rhs.y = node[1].as<float>();
33 return true;
34 }

◆ encode() [1/2]

static Node YAML::convert< glm::vec2 >::encode ( const glm::vec2 &  rhs)
inlinestatic
18 {
19 Node node;
20 node.push_back(rhs.x);
21 node.push_back(rhs.y);
22 node.SetStyle(EmitterStyle::Flow);
23 return node;
24 }

◆ encode() [2/2]

static Node YAML::convert< glm::vec2 >::encode ( const glm::vec2 &  rhs)
inlinestatic
18 {
19 Node node;
20 node.push_back(rhs.x);
21 node.push_back(rhs.y);
22 node.SetStyle(EmitterStyle::Flow);
23 return node;
24 }

The documentation for this struct was generated from the following file: