1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
4
<title>Castle Game Engine: X3DFields: Class TMFVec3d</title>
5
<meta name="generator" content="PasDoc 0.12.1">
6
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
7
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
10
<table class="container"><tr><td class="navigation">
11
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
12
<a name="TMFVec3d"></a><h1 class="cio">Class TMFVec3d</h1>
13
<table class="sections wide_list">
15
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
16
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
18
<a href="X3DFields.html">X3DFields</a></p>
19
<h2 class="declaration">Declaration</h2>
20
<p class="declaration">
21
<code>type TMFVec3d = class(<a class="normal" href="X3DFields.TX3DSimpleMultField.html">TX3DSimpleMultField</a>)</code></p>
22
<h2 class="description">Description</h2>
23
<div class="nodescription">no description available, TX3DSimpleMultField description follows</div><p>
24
Field holding multiple values. Remember that such field may always have any number of items, including zero.
26
<p>Note that we keep MF fields contents in TFPSList or <a class="normal" href="CastleStringUtils.TCastleStringList.html">TCastleStringList</a> instances (<a class="normal" href="X3DFields.TX3DSimpleMultField.html#RawItems">RawItems</a> in this class, also accessible as Items (with more concrete class) in descendants). This means that they are in compact form, easy for reading, or even for feeding the list into OpenGL. That's the main reason why I did not simply implement <code>TX3DSimpleMultField</code> as a descendant of TX3DSingleFieldsList: A long list of vertexes, MFVec3f, would be kept as a list of pointers to a lot of <a class="normal" href="X3DFields.TSFVec3f.html">TSFVec3f</a> instances. This would be quite memory-consuming, and very uncomfortable for access. On the contrary, current implementation keeps all these vertexes inside one <a class="normal" href="CastleVectors.TVector3SingleList.html">TVector3SingleList</a> instance, that internally keeps all items in one continuos piece of memory.
28
<p><i>Descendants implementors notes</i>: to make new descendant:
32
<ul class="paragraph_spacing">
33
<li><p>In <a class="normal" href="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a> you have to initialize FItemClass and create <a class="normal" href="X3DFields.TX3DSimpleMultField.html#RawItems">RawItems</a>. In destructor of this class, <a class="normal" href="X3DFields.TX3DSimpleMultField.html#RawItems">RawItems</a> are freed, so don't worry about this.</p></li>
34
<li><p>Override RawItemsAdd.</p></li>
35
<li><p> If your <a class="normal" href="X3DFields.TX3DSimpleMultField.html#ItemClass">ItemClass</a> doesn't work 100% correctly when it's initialized by <a class="normal" href="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a>, you may have to override CreateItemBeforeParse. Fortunately, VRML specification was careful to choose as multi-valued field types' only fields that can behave nicely when initialized by <a class="normal" href="X3DFields.TX3DField.html#CreateUndefined">CreateUndefined</a> (and in fact VRML 2.0 removed the "bad fields" entirely).</p></li>
36
<li><p>Not strictly required, but usually it's comfortable to have a constructor that allows you to init default field value from some "array of TXxx".</p></li>
40
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
41
<ul class="hierarchy"><li class="ancestor">TPersistent</li>
42
<li class="ancestor"><a class="normal" href="CastleInterfaces.TNonRefCountedInterfacedPersistent.html">TNonRefCountedInterfacedPersistent</a></li>
43
<li class="ancestor"><a class="normal" href="X3DFields.TX3DFileItem.html">TX3DFileItem</a></li>
44
<li class="ancestor"><a class="normal" href="X3DFields.TX3DFieldOrEvent.html">TX3DFieldOrEvent</a></li>
45
<li class="ancestor"><a class="normal" href="X3DFields.TX3DField.html">TX3DField</a></li>
46
<li class="ancestor"><a class="normal" href="X3DFields.TX3DMultField.html">TX3DMultField</a></li>
47
<li class="ancestor"><a class="normal" href="X3DFields.TX3DSimpleMultField.html">TX3DSimpleMultField</a></li>
48
<li class="thisitem">TMFVec3d</li></ul><h2 class="overview">Overview</h2>
49
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
50
<table class="summary wide_list">
52
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
53
<td class="itemcode"><code>procedure <b><a href="X3DFields.TMFVec3d.html#RawItemsAdd">RawItemsAdd</a></b>(Item: <a href="X3DFields.TX3DSingleField.html">TX3DSingleField</a>); override;</code></td>
56
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
57
<td class="itemcode"><code>constructor <b><a href="X3DFields.TMFVec3d.html#Create">Create</a></b>(AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string; const InitialContent: array of <a href="CastleVectors.html#TVector3Double">TVector3Double</a>);</code></td>
60
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
61
<td class="itemcode"><code>constructor <b><a href="X3DFields.TMFVec3d.html#CreateUndefined">CreateUndefined</a></b>(AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string; const AExposed: boolean); override;</code></td>
64
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
65
<td class="itemcode"><code>function <b><a href="X3DFields.TMFVec3d.html#EqualsDefaultValue">EqualsDefaultValue</a></b>: boolean; override;</code></td>
68
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
69
<td class="itemcode"><code>function <b><a href="X3DFields.TMFVec3d.html#Equals">Equals</a></b>(SecondValue: <a href="X3DFields.TX3DField.html">TX3DField</a>; const EqualityEpsilon: Double): boolean; override;</code></td>
72
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
73
<td class="itemcode"><code>procedure <b><a href="X3DFields.TMFVec3d.html#AssignLerp">AssignLerp</a></b>(const A: Double; Value1, Value2: <a href="X3DFields.TX3DField.html">TX3DField</a>); override;</code></td>
76
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
77
<td class="itemcode"><code>function <b><a href="X3DFields.TMFVec3d.html#CanAssignLerp">CanAssignLerp</a></b>: boolean; override;</code></td>
80
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
81
<td class="itemcode"><code>procedure <b><a href="X3DFields.TMFVec3d.html#Assign">Assign</a></b>(Source: TPersistent); override;</code></td>
84
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
85
<td class="itemcode"><code>procedure <b><a href="X3DFields.TMFVec3d.html#AssignValue">AssignValue</a></b>(Source: <a href="X3DFields.TX3DField.html">TX3DField</a>); override;</code></td>
88
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
89
<td class="itemcode"><code>procedure <b><a href="X3DFields.TMFVec3d.html#AssignDefaultValueFromValue">AssignDefaultValueFromValue</a></b>; override;</code></td>
92
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
93
<td class="itemcode"><code>class function <b><a href="X3DFields.TMFVec3d.html#TypeName">TypeName</a></b>: string; override;</code></td>
96
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
97
<td class="itemcode"><code>procedure <b><a href="X3DFields.TMFVec3d.html#Send">Send</a></b>(const AValue: array of <a href="CastleVectors.html#TVector3Double">TVector3Double</a>); overload;</code></td>
100
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
101
<table class="summary wide_list">
103
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
104
<td class="itemcode"><code>property <b><a href="X3DFields.TMFVec3d.html#Items">Items</a></b>: <a href="CastleVectors.TVector3DoubleList.html">TVector3DoubleList</a> read GetItems write SetItems;</code></td>
107
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
108
<td class="itemcode"><code>property <b><a href="X3DFields.TMFVec3d.html#ItemsSafe">ItemsSafe</a></b>[Index:Integer]: <a href="CastleVectors.html#TVector3Double">TVector3Double</a>
109
read GetItemsSafe write SetItemsSafe;</code></td>
112
<h2 class="description">Description</h2>
113
<h3 class="detail">Methods</h3>
114
<table class="detail wide_list">
116
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
117
<td class="itemcode"><a name="RawItemsAdd"></a><code>procedure <b>RawItemsAdd</b>(Item: <a href="X3DFields.TX3DSingleField.html">TX3DSingleField</a>); override;</code></td>
122
<table class="detail wide_list">
124
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
125
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>(AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string; const InitialContent: array of <a href="CastleVectors.html#TVector3Double">TVector3Double</a>);</code></td>
130
<table class="detail wide_list">
132
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
133
<td class="itemcode"><a name="CreateUndefined"></a><code>constructor <b>CreateUndefined</b>(AParentNode: <a href="X3DFields.TX3DFileItem.html">TX3DFileItem</a>; const AName: string; const AExposed: boolean); override;</code></td>
138
<table class="detail wide_list">
140
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
141
<td class="itemcode"><a name="EqualsDefaultValue"></a><code>function <b>EqualsDefaultValue</b>: boolean; override;</code></td>
146
<table class="detail wide_list">
148
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
149
<td class="itemcode"><a name="Equals"></a><code>function <b>Equals</b>(SecondValue: <a href="X3DFields.TX3DField.html">TX3DField</a>; const EqualityEpsilon: Double): boolean; override;</code></td>
154
<table class="detail wide_list">
156
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
157
<td class="itemcode"><a name="AssignLerp"></a><code>procedure <b>AssignLerp</b>(const A: Double; Value1, Value2: <a href="X3DFields.TX3DField.html">TX3DField</a>); override;</code></td>
162
<table class="detail wide_list">
164
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
165
<td class="itemcode"><a name="CanAssignLerp"></a><code>function <b>CanAssignLerp</b>: boolean; override;</code></td>
170
<table class="detail wide_list">
172
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
173
<td class="itemcode"><a name="Assign"></a><code>procedure <b>Assign</b>(Source: TPersistent); override;</code></td>
178
<table class="detail wide_list">
180
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
181
<td class="itemcode"><a name="AssignValue"></a><code>procedure <b>AssignValue</b>(Source: <a href="X3DFields.TX3DField.html">TX3DField</a>); override;</code></td>
186
<table class="detail wide_list">
188
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
189
<td class="itemcode"><a name="AssignDefaultValueFromValue"></a><code>procedure <b>AssignDefaultValueFromValue</b>; override;</code></td>
194
<table class="detail wide_list">
196
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
197
<td class="itemcode"><a name="TypeName"></a><code>class function <b>TypeName</b>: string; override;</code></td>
202
<table class="detail wide_list">
204
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
205
<td class="itemcode"><a name="Send"></a><code>procedure <b>Send</b>(const AValue: array of <a href="CastleVectors.html#TVector3Double">TVector3Double</a>); overload;</code></td>
210
<h3 class="detail">Properties</h3>
211
<table class="detail wide_list">
213
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
214
<td class="itemcode"><a name="Items"></a><code>property <b>Items</b>: <a href="CastleVectors.TVector3DoubleList.html">TVector3DoubleList</a> read GetItems write SetItems;</code></td>
219
<table class="detail wide_list">
221
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
222
<td class="itemcode"><a name="ItemsSafe"></a><code>property <b>ItemsSafe</b>[Index:Integer]: <a href="CastleVectors.html#TVector3Double">TVector3Double</a>
223
read GetItemsSafe write SetItemsSafe;</code></td>
227
Access Items[] checking for range errors. In case of errors, Get will return zero vector, Set will do nothing, and both will produce clear <a class="normal" href="CastleWarnings.html#OnWarning">OnWarning</a>.</p>
230
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.12.1</a> on 2013-02-04 20:26:54</em>
232
</td></tr></table></body></html>