

HXA7241 Octree Component C++
======================================================================


Octree Component in C++, version 2.0
Copyright (c) 2004-2005, Harrison Ainsworth / HXA7241.

http://wwww.hxa7241.org/

2005-05-28




Contents
--------

 * Description
 * Requirements
 * Usage
 * Acknowledgements
 * License




Description
-----------

This is a general octree component in C++. It is in the form of
source-code.

It is:
 * open to various algorithms
 * non-intrusive
 * strongly typed
 * compact in code and storage

For an introductory article, see:
http://www.hxa7241.org/articles/content/octree-general-cpp_hxa7241_2005.html
For the complete code archive, see:
http://www.hxa7241.org/articles/content/octree-general-cpp_hxa7241_2005.zip

For related projects and versions in other languages, see:
http://www.hxa7241.org/articles/

The project is subject to refinement and improvement. Check back for
updates.




Requirements
------------

It is essentially ISO C++.

Some of the support classes depend on the standard C libraries through
float.h and math.c, in a probably easily removable way. Exception
handling is used for dealing with storage exceptions. RTTI is not
used. Only basic use is made of templates: just class templates.

The component and support code has been compiled with MinGW 3.1.0
GCC 3.4.2, and VC toolkit 2003.





Usage
-----

The file OctreeExample.cpp contains a 'minimal' example of usage.

For an item type to work with an octree, the octree needs to be able
to determine if an item overlaps a cell. The code to do that is
defined by the owner of the item, in the form of a concrete derivative
of the octree framework's agent type.

Operations to be made on an octree are defined in the form of concrete
derivatives of the octree framework's visitor class.

These mediate between your items and the octree. You can then insert
and remove items into/from an octree, and perform custom operations
reading an octree.




Acknowledgements
----------------

'The C++ Programming Language' 3rd ed.  Stroustrup (Addison Wesley)
'Effective C++' 2nd ed.  Meyers (Addison Wesley)
'More Effective C++'  Meyers (Addison Wesley)
'Design Patterns'  Gamma, Helm, Johnson, Vlissides (Addison Wesley)
'Object Oriented Software Construction' 2nd ed.  Meyer (PrenticeHall)




License
-------

Copyright (c) 2004-2005, Harrison Ainsworth / HXA7241.


Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, provided that the above
copyright notice(s) and this permission notice appear in all copies of
the Software and that both the above copyright notice(s) and this
permission notice appear in supporting documentation.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
of the copyright holder.
