File: s_147.html

package info (click to toggle)
povray 1%3A3.6.1-6
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 31,052 kB
  • ctags: 20,305
  • sloc: ansic: 110,032; cpp: 86,573; sh: 13,595; pascal: 5,942; asm: 2,994; makefile: 1,747; ada: 1,637
file content (204 lines) | stat: -rw-r--r-- 5,778 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

<!--  This file copyright Persistence of Vision Raytracer Pty. Ltd. 2003-2004  -->
<html> 
<head>
  
<!--  NOTE: In order to users to help find information about POV-Ray using  -->
 
<!--  web search engines, we ask you to *not* let them index documentation  -->
 
<!--  mirrors because effectively, when searching, users will get hundreds  -->
 
<!--  of results containing the same information! For this reason, the two  -->
 
<!--  meta tags below disable archiving and indexing of this page by all  -->
 
<!--  search engines that support these meta tags.  -->
 
 <meta content="noarchive" name="robots">
   
 <meta content="noindex" name="robots">
   
 <meta content="no-cache" http-equiv="Pragma">
   
 <meta content="0" http-equiv="expires">
   
<title>3.7.16 strings.inc</title>
 <link href="povray35.css" rel="stylesheet" type="text/css"> 
</head>
 <body> 
<table class="NavBar" width="100%">
  
 <tr>
   
  <td align="left" nowrap="" valign="middle" width="32">
    <a href="s_146.html"><img alt="previous" border="0" src="prev.png"></a> 
   
  </td>
   
  <td align="left" valign="middle" width="30%">
    <a href="s_146.html">3.7.15 stdinc.inc</a> 
  </td>
   
  <td align="center" valign="middle">
    <strong class="NavBar">POV-Ray 3.6 for UNIX documentation</strong><br> <strong>3.7.16 
   strings.inc</strong> 
  </td>
   
  <td align="right" valign="middle" width="30%">
    <a href="s_148.html">3.7.17 textures.inc</a> 
  </td>
   
  <td align="right" nowrap="" valign="middle" width="32">
    <a href="s_148.html"><img alt="next" border="0" src="next.png"></a> 
   
  </td>
   
 </tr>
  
</table>
 
<h3><a name="s03_07_16">3.7.16 </a>strings.inc</h3>

<p>
  This include contains macros for manipulating and generating text strings.<a name="s03_07_16_i1"><a name="CRGBStr"></a> 
 
</p>

<p>
  <code>CRGBStr(C, MinLen, Padding)</code> and <code>CRGBFTStr(C, MinLen, Padding)</code><br> These macros convert a 
 color to a string. The format of the output string is &quot;rgb &lt; R, G, B&gt;&quot; or &quot;rgbft &lt; R, G, B, F, 
 T&gt;&quot;, depending on the macro being called.<br> Parameters: 
</p>

<ul>
 
 <li>
   <code>C</code> = The color to be turned into a string. 
 </li>

 <li>
   <code>MinLen</code> = The minimum length of the individual components, analogous to the second parameter of 
  str(). 
 </li>

 <li>
   <code>Padding</code> = The padding to use for the components, see the third parameter of the str() function for 
  details. 
 </li>

</ul>
<a name="s03_07_16_i2"><a name="Str, strings.inc"></a>
<p>
  <code>Str(A)</code>. This macro creates a string containing a float with the systems default precision. It is a 
 shortcut for using the str() function.<br> Parameters: 
</p>

<ul>
 
 <li>
   <code>A</code> = The float to be converted to a string. 
 </li>

</ul>
<a name="s03_07_16_i3"><a name="Vstr, strings.inc"></a><a name="s03_07_16_i4"><a name="VStr2D, short form"></a>
<p>
  <code>VStr2D(V), VStr(V)</code>. These macros create strings containing vectors using POV syntax (&lt;X,Y,Z&gt;) 
 with the default system precision. VStr2D() works with 2D vectors, VStr() with 3D vectors. They are shortcuts for 
 using the <code>vstr()</code> function.<br> Parameters: 
</p>

<ul>
 
 <li>
   <code>V</code> = The vector to be converted to a string. 
 </li>

</ul>
<a name="s03_07_16_i5"><a name="Vstr2D, long form"></a>
<p>
  <code>Vstr2D(V,L,P), Vstr(V,L,P)</code>. These macros create strings containing vectors using POV syntax 
 (&lt;X,Y,Z&gt;) with user specified precision. Vstr2D() works with 2D vectors, Vstr() with 3D vectors. They are 
 shortcuts for using the vstr() function. The function of L and P is the same as in <code>vstr</code> specified in <a href="s_97.html#s03_02_01_07_03">String 
 Functions</a>.<br> Parameters: 
</p>

<ul>
 
 <li>
   <code>V</code> = The vector to be converted to a string. 
 </li>

 <li>
   <code>L</code> = Minimum length of the string and the type of left padding used if the string's representation is 
  shorter than the minimum. 
 </li>

 <li>
   <code>P</code> = Number of digits after the decimal point.&quot; 
 </li>

</ul>
<a name="s03_07_16_i6"><a name="Triangle_Str"></a>
<p>
  <code>Triangle_Str(A, B, C)</code> and <code>Smooth_Triangle_Str(A, NA, B, NB, C, NC)</code><br> These macros take 
 vertex and normal information and return a string representing a triangle in POV-Ray syntax. They are mainly useful 
 for generating mesh files.<br> Parameters: 
</p>

<ul>
 
 <li>
   <code>A, B, C</code> = Triangle vertex points. 
 </li>

 <li>
   <code>NA, NB, NC</code> = Triangle vertex normals (Smooth_Triangle_Str() only). 
 </li>

</ul>
<a name="s03_07_16_i7"><a name="Parse_String"></a>
<p>
  <code>Parse_String(String)</code>. This macro takes a string, writes it to a file, and then includes that file. 
 This has the effect of parsing that string: &quot;<code>Parse_String(&quot;MyColor&quot;)</code>&quot; will be seen by 
 POV-Ray as &quot;<code>MyColor</code>&quot;.<br> Parameters: 
</p>

<ul>
 
 <li>
   <code>String</code> = The string to be parsed. 
 </li>

</ul>
 <br> 
<table class="NavBar" width="100%">
  
 <tr>
   
  <td align="left" nowrap="" valign="middle" width="32">
    <a href="s_146.html"><img alt="previous" border="0" src="prev.png"></a> 
   
  </td>
   
  <td align="left" valign="middle" width="30%">
    <a href="s_146.html">3.7.15 stdinc.inc</a> 
  </td>
   
  <td align="center" valign="middle">
    <strong>3.7.16 strings.inc</strong> 
  </td>
   
  <td align="right" valign="middle" width="30%">
    <a href="s_148.html">3.7.17 textures.inc</a> 
  </td>
   
  <td align="right" nowrap="" valign="middle" width="32">
    <a href="s_148.html"><img alt="next" border="0" src="next.png"></a> 
   
  </td>
   
 </tr>
  
</table>
 </body> </html>