<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://jimandi.com/SDK/index.php?action=history&amp;feed=atom&amp;title=CadObjectList</id>
	<title>CadObjectList - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://jimandi.com/SDK/index.php?action=history&amp;feed=atom&amp;title=CadObjectList"/>
	<link rel="alternate" type="text/html" href="https://jimandi.com/SDK/index.php?title=CadObjectList&amp;action=history"/>
	<updated>2026-10-25T11:57:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://jimandi.com/SDK/index.php?title=CadObjectList&amp;diff=36&amp;oldid=prev</id>
		<title>WikiSysop: Created page with &quot; link=High Level Objects Category:SDK This object holds a list of CadObjects    Constructor    CadObjectList(bool owns_objects)    Creates a n...&quot;</title>
		<link rel="alternate" type="text/html" href="https://jimandi.com/SDK/index.php?title=CadObjectList&amp;diff=36&amp;oldid=prev"/>
		<updated>2021-08-04T02:42:37Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; &lt;a href=&quot;/SDK/index.php/File:Back.jpg&quot; title=&quot;File:Back.jpg&quot;&gt;right|50px|link=High Level Objects&lt;/a&gt; &lt;a href=&quot;/SDK/index.php?title=Category:SDK&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:SDK (page does not exist)&quot;&gt;Category:SDK&lt;/a&gt; This object holds a list of CadObjects    Constructor    CadObjectList(bool owns_objects)    Creates a n...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; [[File:Back.jpg|right|50px|link=High Level Objects]]&lt;br /&gt;
[[Category:SDK]]&lt;br /&gt;
This object holds a list of CadObjects  &lt;br /&gt;
&lt;br /&gt;
Constructor  &lt;br /&gt;
&lt;br /&gt;
CadObjectList(bool owns_objects)  &lt;br /&gt;
&lt;br /&gt;
Creates a new CadObjectList owns_objects -bool – true if this list owns the objects it contains. If this is true and the list still contains objects when it goes out of scope the objects will be deleted.  &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== .Count  ===&lt;br /&gt;
&lt;br /&gt;
Read Only - integer – return the number of objects in the list  &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== .IsEmpty  ===&lt;br /&gt;
&lt;br /&gt;
Read Only - bool – return true if the list is empty  &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
== Methods == &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :AddHead( CadObject obj)  ===&lt;br /&gt;
&lt;br /&gt;
Add the passed object to the front of the list     &lt;br /&gt;
&lt;br /&gt;
::''obj –CadObject –object to put in list  ''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :AddTail( CadObject obj)  ===&lt;br /&gt;
&lt;br /&gt;
Add the passed object to the end of the list     &lt;br /&gt;
&lt;br /&gt;
::''obj –CadObject –object to put in list  ''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :CanTransform( integer flags)  ===&lt;br /&gt;
&lt;br /&gt;
Return true if object can be transformed  &lt;br /&gt;
&lt;br /&gt;
::''flags –integer –value indicating type of transform – these can be combined e.g 3 (1+2) will check for both Move and Rotate''   &lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
        1 = Move  &lt;br /&gt;
        2 = Rotate  &lt;br /&gt;
        4 = Mirror  &lt;br /&gt;
        8 = Scale Symetric  &lt;br /&gt;
       16 = Scale Asymetric  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :GetAt( POSITION pos)  ===&lt;br /&gt;
&lt;br /&gt;
Returns the object at the current position       &lt;br /&gt;
&lt;br /&gt;
::''pos – POSITION – current position in list  ''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :GetHeadPosition()  ===&lt;br /&gt;
&lt;br /&gt;
Returns a POSITION variable to allow access to the head of the list   &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :GetNext( POSITION pos)  ===&lt;br /&gt;
&lt;br /&gt;
Returns the object at the current position AND a new value for position pointing to the next item in the list (or nil if at end of list)  &lt;br /&gt;
&lt;br /&gt;
::''pos – POSITION – current position in list  ''&lt;br /&gt;
&lt;br /&gt;
::''note that GetNext(pos) is returning two values ... ''&lt;br /&gt;
   &lt;br /&gt;
==== Usage Syntax: =====&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         local pos = obj_list:GetHeadPosition() &lt;br /&gt;
         local object &lt;br /&gt;
         while pos ~= nil do&lt;br /&gt;
            object, pos = obj_list:GetNext(pos)&lt;br /&gt;
            DO SOMETHING WITH OBJECT .... &lt;br /&gt;
         end  -- while end  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :GetPrev( POSITION pos)  ===&lt;br /&gt;
&lt;br /&gt;
Returns the object at the current position AND a new value for position, pointing to the previous item in the list (or nil if at start of list)  &lt;br /&gt;
&lt;br /&gt;
::''pos – POSITION – current position in list    ''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :GetTailPosition()  ===&lt;br /&gt;
&lt;br /&gt;
Returns a POSITION variable to allow access to the tail (end) of the list   &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :RemoveHead()  ===&lt;br /&gt;
&lt;br /&gt;
Remove the id at the front of the list and return it  &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== :RemoveTail()  ===&lt;br /&gt;
&lt;br /&gt;
Remove the id at the end of the list and return it  &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
=== :Transform( Matrix2D xform) === &lt;br /&gt;
&lt;br /&gt;
Transform all objects in list by passed transform  &lt;br /&gt;
&lt;br /&gt;
::''xform – Matrix2D – transformation matrix to apply to objects  ''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Back.jpg|right|50px|link=High Level Objects]]&lt;br /&gt;
==References==&lt;br /&gt;
'''Please Note:''' The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information]&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
</feed>