Panda3D
 All Classes Functions Variables Enumerations
configVariableColor.cxx
1 // Filename: configVariableColor.cxx
2 // Created by: rdb (02Feb14)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "configVariableColor.h"
16 #include "pdtoa.h"
17 
18 ////////////////////////////////////////////////////////////////////
19 // Function: ConfigVariableColor::set_default_value
20 // Access: Private
21 // Description:
22 ////////////////////////////////////////////////////////////////////
23 void ConfigVariableColor::
24 set_default_value(const LColor &default_value) {
25  char buffer[128];
26  char *p = buffer;
27  pdtoa(default_value[0], p);
28 
29  p += strlen(p);
30  *p++ = ' ';
31  pdtoa(default_value[1], p);
32 
33  p += strlen(p);
34  *p++ = ' ';
35  pdtoa(default_value[2], p);
36 
37  p += strlen(p);
38  *p++ = ' ';
39  pdtoa(default_value[3], p);
40 
41  _core->set_default_value(buffer);
42 }
This is the base class for all three-component vectors and points.
Definition: lvecBase4.h:111