Fix:Use correct encoding
This commit is contained in:
@@ -55,12 +55,6 @@ AnimEvaluator::AnimEvaluator(const aiAnimation *pAnim) :
|
||||
mLastPositions.resize(pAnim->mNumChannels, std::make_tuple(0, 0, 0));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Destructor.
|
||||
AnimEvaluator::~AnimEvaluator() {
|
||||
// empty
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Evaluates the animation tracks for a given time stamp.
|
||||
void AnimEvaluator::Evaluate(double pTime) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
AnimEvaluator(const aiAnimation *pAnim);
|
||||
|
||||
/// @brief The class destructor.
|
||||
~AnimEvaluator();
|
||||
~AnimEvaluator() = default;
|
||||
|
||||
/// @brief Evaluates the animation tracks for a given time stamp.
|
||||
/// The calculated pose can be retrieved as an array of transformation
|
||||
|
||||
@@ -77,6 +77,13 @@ public:
|
||||
pcScene = NULL;
|
||||
}
|
||||
|
||||
// set the normal set to be used
|
||||
void SetNormalSet(unsigned int iSet);
|
||||
|
||||
// flip all normal vectors
|
||||
void FlipNormals();
|
||||
void FlipNormalsInt();
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// default vertex data structure
|
||||
// (even if tangents, bitangents or normals aren't
|
||||
@@ -221,16 +228,8 @@ public:
|
||||
|
||||
// Specifies the normal set to be used
|
||||
unsigned int iNormalSet;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// set the normal set to be used
|
||||
void SetNormalSet(unsigned int iSet);
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// flip all normal vectors
|
||||
void FlipNormals();
|
||||
void FlipNormalsInt();
|
||||
};
|
||||
|
||||
} // namespace AssimpView
|
||||
|
||||
#endif // !! IG
|
||||
|
||||
@@ -175,33 +175,29 @@ VOID WINAPI FillFunc(D3DXVECTOR4* pOut,
|
||||
pOut->x = pOut->y = 1.0f;
|
||||
pOut->z = 0.0f;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int CMaterialManager::UpdateSpecularMaterials()
|
||||
{
|
||||
if (g_pcAsset && g_pcAsset->pcScene)
|
||||
{
|
||||
for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumMeshes;++i)
|
||||
{
|
||||
if (aiShadingMode_Phong == g_pcAsset->apcMeshes[i]->eShadingMode)
|
||||
{
|
||||
int CMaterialManager::UpdateSpecularMaterials() {
|
||||
if (g_pcAsset && g_pcAsset->pcScene) {
|
||||
for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumMeshes;++i) {
|
||||
if (aiShadingMode_Phong == g_pcAsset->apcMeshes[i]->eShadingMode) {
|
||||
this->DeleteMaterial(g_pcAsset->apcMeshes[i]);
|
||||
this->CreateMaterial(g_pcAsset->apcMeshes[i],g_pcAsset->pcScene->mMeshes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int CMaterialManager::SetDefaultTexture(IDirect3DTexture9** p_ppiOut)
|
||||
{
|
||||
int CMaterialManager::SetDefaultTexture(IDirect3DTexture9** p_ppiOut) {
|
||||
if (sDefaultTexture) {
|
||||
sDefaultTexture->AddRef();
|
||||
*p_ppiOut = sDefaultTexture;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(FAILED(g_piDevice->CreateTexture(
|
||||
256,
|
||||
256,
|
||||
|
||||
@@ -145,9 +145,7 @@ float g_fLoadTime = 0.0f;
|
||||
// The loader thread loads the asset while the progress dialog displays the
|
||||
// smart progress bar
|
||||
//-------------------------------------------------------------------------------
|
||||
DWORD WINAPI LoadThreadProc(LPVOID lpParameter) {
|
||||
UNREFERENCED_PARAMETER(lpParameter);
|
||||
|
||||
DWORD WINAPI LoadThreadProc(LPVOID) {
|
||||
// get current time
|
||||
double fCur = (double)timeGetTime();
|
||||
|
||||
@@ -367,7 +365,7 @@ int CalculateBounds(aiNode *piNode, aiVector3D *p_avOut, const aiMatrix4x4 &piMa
|
||||
// The function calculates the boundaries of the mesh and modifies the
|
||||
// global world transformation matrix according to the aset AABB
|
||||
//-------------------------------------------------------------------------------
|
||||
int ScaleAsset(void) {
|
||||
int ScaleAsset() {
|
||||
aiVector3D aiVecs[2] = { aiVector3D(1e10f, 1e10f, 1e10f),
|
||||
aiVector3D(-1e10f, -1e10f, -1e10f) };
|
||||
|
||||
@@ -521,8 +519,7 @@ int CreateAssetData() {
|
||||
}
|
||||
} else {
|
||||
// create 16 bit index buffer
|
||||
if (FAILED(g_piDevice->CreateIndexBuffer(2 *
|
||||
numIndices,
|
||||
if (FAILED(g_piDevice->CreateIndexBuffer(2 * numIndices,
|
||||
D3DUSAGE_WRITEONLY | dwUsage,
|
||||
D3DFMT_INDEX16,
|
||||
D3DPOOL_DEFAULT,
|
||||
|
||||
@@ -98,6 +98,12 @@ namespace AssimpView {
|
||||
//-------------------------------------------------------------------------------
|
||||
// Function prototypes
|
||||
//-------------------------------------------------------------------------------
|
||||
class AssimpVew {
|
||||
public:
|
||||
AssimpVew();
|
||||
~AssimpVew();
|
||||
};
|
||||
|
||||
int InitD3D(void);
|
||||
int ShutdownD3D(void);
|
||||
int CreateDevice(bool p_bMultiSample, bool p_bSuperSample, bool bHW = true);
|
||||
|
||||
Reference in New Issue
Block a user