Panda3D
fltVertex.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file fltVertex.I
10  * @author drose
11  * @date 2000-08-30
12  */
13 
14 /**
15  * Returns true if the vertex has a primary color indicated, false otherwise.
16  */
17 INLINE bool FltVertex::
18 has_color() const {
19  // Even if the no_color bit is not set, if the color_index is -1, the vertex
20  // doesn't have a color (unless we've got packed color).
21  return ((_flags & F_no_color) == 0 &&
22  (_color_index != -1 || ((_flags & F_packed_color) != 0)));
23 }
24 
25 /**
26  * Sets the color of the vertex, using the packed color convention. The alpha
27  * component is ignored.
28  */
29 INLINE void FltVertex::
30 set_color(const LColor &color) {
31  set_rgb(LRGBColor(color[0], color[1], color[2]));
32 }
void set_color(const LColor &color)
Sets the color of the vertex, using the packed color convention.
Definition: fltVertex.I:30
bool has_color() const
Returns true if the vertex has a primary color indicated, false otherwise.
Definition: fltVertex.I:18
void set_rgb(const LRGBColor &rgb)
Sets the color of the vertex, using the packed color convention.
Definition: fltVertex.cxx:134