//
// NhPlane.h
//
// 平面テンプレートクラスサンプル
// 
// Written by Nobuki HIRAMINE
// Last modified : 2005/09/10
//
#ifndef	_NHPLANE_H
#define	_NHPLANE_H

#include "NhVector3.h"

template <class T> class TNhPlane
{
public:
	TNhVector3<T>	vn;
	T				d;	// d = a x + b y + c z = 平面の法線ベクトルと平面が通るある点との内積

	// コンストラクタ
	// デフォルト
	TNhPlane() : d(0)
	{}
	// 初期化
	TNhPlane( const TNhVector3<T> vn_, const T d_ ) : vn(vn_), d(d_)
	{}
	TNhPlane( const TNhVector3<T> vn_, const TNhVector3<T> p ) : vn(vn_)
	{
		d = vn.CalcInnerProduct( p );
	}
};

typedef TNhPlane<double>	CNhPlaned;
typedef TNhPlane<float>		CNhPlanef;

#endif	/*_NHSPHERE_H*/

