82 lines
2.0 KiB
C++
82 lines
2.0 KiB
C++
/*=========================================================================
|
|
* CAMDLLB.cpp : Implementation of camera DLL base.
|
|
* This is a part of the CPA project.
|
|
*
|
|
* Version 1.0
|
|
* Creation date 03/25/97
|
|
* Revision date
|
|
*
|
|
*
|
|
* (c) Ubi Studios 1996
|
|
*=======================================================================*/
|
|
|
|
#include "stdafx.h"
|
|
#include "acp_base.h"
|
|
|
|
#ifdef ACTIVE_EDITOR
|
|
|
|
#include "geo.h"
|
|
#include "gli.h"
|
|
#include "col.h"
|
|
#define HieFriend
|
|
#include "lst.hpp"
|
|
#include "spo.h"
|
|
#undef HieFriend
|
|
#include "itf/Camdllb.hpp"
|
|
|
|
#define C_PI 3.14159265
|
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
////////////////////////////// CPA_CameraCoords /////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
CPA_CameraCoords::CPA_CameraCoords(tdeAxisSystem eAxis, float fX, float fY, float fZ)
|
|
{
|
|
m_fX = fX;
|
|
m_fY = fY;
|
|
m_fZ = fZ;
|
|
m_eAxisSystem = eAxis;
|
|
}
|
|
|
|
void CPA_CameraCoords::SetCoords(MTH3D_tdstVector *p_stVector)
|
|
{
|
|
m_fX = MTH3D_M_xGetXofVector(p_stVector);
|
|
m_fY = MTH3D_M_xGetYofVector(p_stVector);
|
|
m_fZ = MTH3D_M_xGetZofVector(p_stVector);
|
|
}
|
|
|
|
void CPA_CameraCoords::SetCoords(POS_tdstCompletePosition *p_stMatrix)
|
|
{
|
|
MTH3D_tdstVector stTransVector;
|
|
|
|
POS_fn_vGetTranslationVector(p_stMatrix,&stTransVector);
|
|
SetCoords(&stTransVector);
|
|
}
|
|
|
|
|
|
void CPA_CameraCoords::GetCoords(MTH3D_tdstVector &r_stVector)
|
|
{
|
|
MTH3D_M_vSetVectorElements(&r_stVector,m_fX,m_fY,m_fZ);
|
|
}
|
|
|
|
|
|
void CPA_CameraCoords::GetCoords(POS_tdstCompletePosition &r_stMatrix)
|
|
{
|
|
MTH3D_tdstVector stTransVector;
|
|
|
|
GetCoords(stTransVector);
|
|
POS_fn_vSetTranslationVector(&r_stMatrix,&stTransVector);
|
|
}
|
|
|
|
void CPA_CameraCoords::SetXYZ(float fX, float fY, float fZ)
|
|
{
|
|
m_fX = fX;
|
|
m_fY = fY;
|
|
m_fZ = fZ;
|
|
}
|
|
|
|
|
|
#endif //ACTIVE_EDITOR
|