smntc
an in-memory multimodal graph database
Main Page
Data Structures
Files
File List
Globals
Loading...
Searching...
No Matches
src
Scene.c
Go to the documentation of this file.
1
#include "
errors.h
"
2
#include "
Scene.h
"
3
#include "
Graph.h
"
4
#include "
Shape.h
"
5
#include "
Colors.h
"
6
7
struct
Shape
Scene_addShape
(const struct
Scene
*
this
,
int
*error)
8
{
9
unsigned
int
vertex
=
Graph_addVertex
(this->
graph
, error);
10
11
if
(*error) {
12
struct
Shape
shape = {0};
13
return
shape;
14
}
15
16
Graph_addEdge
(this->
graph
, this->vertex,
vertex
, error);
17
18
if
(*error) {
19
struct
Shape
shape = {0};
20
return
shape;
21
}
22
23
struct
Shape
shape = {
24
.
vertex
=
vertex
,
25
.graph = this->
graph
,
26
.colors = this->
colors
27
};
28
29
return
shape;
30
}
Colors.h
Graph_addEdge
void Graph_addEdge(struct Graph *this, unsigned int source, unsigned int target, int *error)
It adds a directed edge from a source vertex to a target vertex.
Definition
Graph.c:298
Graph_addVertex
unsigned int Graph_addVertex(struct Graph *this, int *error)
It adds a vertex into a graph storage.
Definition
Graph.c:136
Graph.h
Scene_addShape
struct Shape Scene_addShape(const struct Scene *this, int *error)
Definition
Scene.c:7
Scene.h
Shape.h
errors.h
Scene
Definition
Scene.h:7
Shape
Definition
Shape.h:8
Shape::colors
struct Colord * colors
Definition
Shape.h:11
Shape::graph
struct Graph * graph
Definition
Shape.h:10
Shape::vertex
unsigned int vertex
Definition
Shape.h:9
Generated by
1.10.0