@@ -63,7 +63,7 @@ impl Vertex {
63
63
* # Arguments
64
64
* * position - Position of the vertex
65
65
* * color - Color of the vertex
66
- * * texCoords - Texture coordinate of the vertex
66
+ * * tex_coords - Texture coordinate of the vertex
67
67
*
68
68
* Return a Vertex
69
69
*/
@@ -75,6 +75,16 @@ impl Vertex {
75
75
}
76
76
}
77
77
78
+ /**
79
+ * Create a new default Vertex
80
+ *
81
+ * # Default
82
+ * * position - (0., 0.)
83
+ * * color - white
84
+ * * tex_coords - (0., 0.)
85
+ *
86
+ * Return a Vertex
87
+ */
78
88
pub fn default ( ) -> Vertex {
79
89
Vertex {
80
90
position : Vector2f { x : 0. , y : 0. } ,
@@ -83,6 +93,18 @@ impl Vertex {
83
93
}
84
94
}
85
95
96
+ /**
97
+ * Create a new Vertex whit a position
98
+ *
99
+ * # Arguments
100
+ * * position - Position of the vertex
101
+ *
102
+ * # Default
103
+ * * color - white
104
+ * * tex_coords - (0., 0.)
105
+ *
106
+ * Return a Vertex
107
+ */
86
108
pub fn new_with_pos ( position : & Vector2f ) -> Vertex {
87
109
Vertex {
88
110
position : * position,
@@ -91,6 +113,18 @@ impl Vertex {
91
113
}
92
114
}
93
115
116
+ /**
117
+ * Create a new Vertex with the position and the color
118
+ *
119
+ * # Arguments
120
+ * * position - Position of the vertex
121
+ * * color - Color of the vertex
122
+ *
123
+ * # Default
124
+ * * tex_coords - (0., 0)
125
+ *
126
+ * Return a Vertex
127
+ */
94
128
pub fn new_with_pos_color ( position : & Vector2f , color : & Color ) -> Vertex {
95
129
Vertex {
96
130
position : * position,
@@ -99,6 +133,18 @@ impl Vertex {
99
133
}
100
134
}
101
135
136
+ /**
137
+ * Create a new Vertex whit the position and the texture coordinates
138
+ *
139
+ * # Arguments
140
+ * * position - Position of the vertex
141
+ * * tex_coords - Texture coordinate of the vertex
142
+ *
143
+ * # Default
144
+ * * color - white
145
+ *
146
+ * Return a Vertex
147
+ */
102
148
pub fn new_with_pos_coords ( position : & Vector2f , tex_coords : & Vector2f ) -> Vertex {
103
149
Vertex {
104
150
position : * position,
0 commit comments