// Location.h : Declaration of the cLocation

#ifndef __LOCATION_H_
#define __LOCATION_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// cLocation
class ATL_NO_VTABLE cLocation : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<cLocation, &CLSID_Location>,
	public IDispatchImpl<ILocation, &IID_ILocation, &LIBID_DecalFilters>
{
public:
	cLocation()
	{
		m_dwLandblock = 0;

		m_fxOffset = 0.0f;
		m_fyOffset = 0.0f;
		m_fzOffset = 0.0f;

		m_fxHeading = 0.0f;
		m_fyHeading = 0.0f;
		m_fzHeading = 0.0f;
		m_fwHeading = 0.0f;
	}

DECLARE_REGISTRY_RESOURCEID(IDR_LOCATION)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(cLocation)
	COM_INTERFACE_ENTRY(ILocation)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// ILocation
public:
	STDMETHOD(Heading)(float *x, float *y, float *z, float *w);
	STDMETHOD(Offset)(float *x, float *y, float *z);
	STDMETHOD(get_Landblock)(/*[out, retval]*/ long *pVal);
	long m_dwLandblock;

	float m_fxOffset;
	float m_fyOffset;
	float m_fzOffset;

	float m_fxHeading;
	float m_fyHeading;
	float m_fzHeading;
	float m_fwHeading;
};

#endif //__LOCATION_H_
