初步修复
This commit is contained in:
parent
8fc4357cc6
commit
e4714f3f0e
46705 changed files with 12004901 additions and 0 deletions
31
Client/EngineTest/CameraData.cpp
Normal file
31
Client/EngineTest/CameraData.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include "StdAfx.h"
|
||||
#include "CameraData.h"
|
||||
|
||||
CCameraData::CCameraData(void)
|
||||
{
|
||||
}
|
||||
|
||||
CCameraData::~CCameraData(void)
|
||||
{
|
||||
}
|
||||
|
||||
void CCameraData::LoadResource( CStream *pStream )
|
||||
{
|
||||
pStream->Read( &m_Header, sizeof( SCameraFileHeader ) );
|
||||
pStream->Seek( CAMERA_HEADER_RESERVED, SEEK_CUR );
|
||||
m_vecFOV.resize( m_Header.nFOVKeyCount );
|
||||
m_vecPosition.resize( m_Header.nPositionKeyCount );
|
||||
m_vecRotation.resize( m_Header.nRotationKeyCount );
|
||||
if( m_Header.nFOVKeyCount )
|
||||
{
|
||||
pStream->Read( &m_vecFOV[ 0 ], m_Header.nFOVKeyCount * sizeof( SCameraFOVKey ) );
|
||||
}
|
||||
if( m_Header.nPositionKeyCount )
|
||||
{
|
||||
pStream->Read( &m_vecPosition[ 0 ], m_Header.nPositionKeyCount * sizeof( SCameraPostionKey ) );
|
||||
}
|
||||
if( m_Header.nRotationKeyCount )
|
||||
{
|
||||
pStream->Read( &m_vecRotation[ 0 ], m_Header.nRotationKeyCount * sizeof( SCameraRotationKey ) );
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue