////////////////////////////////////////////////////////////////
//
//	plotdata3 class
//
//	holds x,y,z plot data
//
//	Copyright (C) 2008 Michael V. Newberry. All Rights Reserved.
//
//	This copyright notice must be included in any portion of this source
//	code that is used in any form and for any purpose.
//

///////////////////////////////////////////////////////////////////////
function point3( x, y, z )
{
	this.x = x;
	this.y = y;
	this.z = z;
}

///////////////////////////////////////////////////////////////////////
function add( x, y, z )
{
	this.array[ this.array.length ] = new point3( x, y, z );

	this.Xmin = Math.min( this.Xmin, x );
	this.Xmax = Math.max( this.Xmax, x );
	this.Ymin = Math.min( this.Ymin, y );
	this.Ymax = Math.max( this.Ymax, y );
	this.Zmin = Math.min( this.Zmin, z );
	this.Zmax = Math.max( this.Zmax, z );
}

///////////////////////////////////////////////////////////////////////
function init()
{
	if ( this.array )
		delete this.array;
	this.array = new Array();
	
	this.Xmin = 1.e10;
	this.Xmax = -1.e10;
	this.Ymin = 1.e10;
	this.Ymax = -1.e10;
	this.Zmin = 1.e10;
	this.Zmax = -1.e10;

	this.sTitle = '';
	this.sLabelX = '';
	this.sLabelY = '';
	this.sLabelZ = '';
}

///////////////////////////////////////////////////////////////////////
function plotdata3( str, delimiter )
{
	this.array = new Array();
	
	this.Xmin = 1.e10;
	this.Xmax = -1.e10;
	this.Ymin = 1.e10;
	this.Ymax = -1.e10;
	this.Zmin = 1.e10;
	this.Zmax = -1.e10;
	this.sTitle = '';
	this.sLabelX = '';
	this.sLabelY = '';
	this.sLabelZ = '';

	this.add = add;
	this.init = init;
}
