Assimp  v3.1.1 (June 2014)
AssimpView Namespace Reference

Calculates a pose for a given time of an animation. More...

Classes

class  AnimEvaluator
 Calculates transformations for a given timestamp from a set of animation tracks. More...
 
class  AssetHelper
 Class to wrap ASSIMP's asset output structures. More...
 
class  CBackgroundPainter
 
class  CDisplay
 
class  CLogDisplay
 Class to display log strings in the upper right corner of the view. More...
 
class  CLogWindow
 Class to display log strings in a separate window. More...
 
class  CMaterialManager
 
class  CMeshRenderer
 
class  CMyLogStream
 Subclass of Assimp::LogStream used to add all log messages to the log window. More...
 
class  SceneAnimator
 Calculates the animated node transformations for a given scene and timestamp. More...
 
struct  SceneAnimNode
 A little tree structure to match the scene's node structure, but holding additional data. More...
 
struct  SkyBoxVertex
 Vertex structure for the skybox. More...
 
struct  SVertex
 

Enumerations

enum  EClickPos { EClickPos_Circle, EClickPos_CircleVert, EClickPos_CircleHor, EClickPos_Outside }
 

Functions

INT_PTR CALLBACK AboutMessageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void AddTextureMem (IDirect3DTexture9 *pcTex, unsigned int &out)
 
int CalculateBounds (aiNode *piNode, aiVector3D *p_avOut, const aiMatrix4x4 &piMatrix)
 
void ChooseBGColor ()
 
template<class type , class intype >
type clamp (intype in)
 
void ClearBG ()
 
void ClearHistory ()
 
int CreateAssetData ()
 
int CreateDevice (bool p_bMultiSample, bool p_bSuperSample, bool bHW)
 
int CreateDevice (void)
 
int CreateHUDTexture ()
 
int CreateMaterial (AssetHelper::MeshHelper *pcMesh, const aiMesh *pcSource)
 
int DeleteAsset (void)
 
int DeleteAssetData (bool bNoMaterials)
 
void DisplayColorDialog (D3DCOLOR *pclrResult)
 
void DisplayColorDialog (D3DXVECTOR4 *pclrResult)
 
void DisplayMemoryConsumption ()
 
void DoExport (size_t formatId)
 
VOID WINAPI FillFunc (D3DXVECTOR4 *pOut, CONST D3DXVECTOR2 *pTexCoord, CONST D3DXVECTOR2 *pTexelSize, LPVOID pData)
 
int GenerateNormalsAsLineList (AssetHelper::MeshHelper *pcMesh, const aiMesh *pcSource)
 
aiVector3D GetCameraMatrix (aiMatrix4x4 &p_mOut)
 
void GetNodeCount (aiNode *pcNode, unsigned int *piCnt)
 
int GetProjectionMatrix (aiMatrix4x4 &p_mOut)
 
void HandleCommandLine (char *p_szCommand)
 
void HandleKeyboardInputFPS (void)
 
void HandleKeyboardInputTextureView (void)
 
void HandleMouseInputFPS (void)
 
void HandleMouseInputLightIntensityAndColor (void)
 
void HandleMouseInputLightRotate (void)
 
void HandleMouseInputLocal (void)
 
void HandleMouseInputSkyBox (void)
 
void HandleMouseInputTextureView (void)
 
INT_PTR CALLBACK HelpDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
int InitD3D (void)
 
void InitUI ()
 
int LoadAsset (void)
 
void LoadBGTexture ()
 
void LoadCheckerPatternColors ()
 
void LoadHistory ()
 
void LoadLightColors ()
 
void LoadSkybox ()
 
DWORD WINAPI LoadThreadProc (LPVOID lpParameter)
 
INT_PTR CALLBACK LogDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void MakeFileAssociations ()
 
INT_PTR CALLBACK MessageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void OpenAsset ()
 
void PopulateExportMenu ()
 
INT_PTR CALLBACK ProgressMessageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void SaveCheckerPatternColors ()
 
void SaveHistory ()
 
void SaveLightColors ()
 
void SaveScreenshot ()
 
int ScaleAsset (void)
 
int SetupFPSView ()
 
void SetupPPUIState ()
 
void ShowNormalUIComponents ()
 
int ShutdownD3D (void)
 
int ShutdownDevice (void)
 
INT_PTR CALLBACK SMMessageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void ToggleAutoRotate ()
 
void ToggleCulling ()
 
void ToggleFPSView ()
 
void ToggleLightRotate ()
 
void ToggleLowQuality ()
 
void ToggleMats ()
 
void ToggleMS ()
 
void ToggleMultipleLights ()
 
void ToggleNormals ()
 
void ToggleSkeleton ()
 
void ToggleSpecular ()
 
void ToggleTransparency ()
 
void ToggleUIState ()
 
void ToggleWireFrame ()
 
int CALLBACK TreeViewCompareFunc (LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
 
void UpdateColorFieldsInUI ()
 
void UpdateHistory ()
 
void UpdatePPSettings ()
 

Variables

static const char * AI_VIEW_RTF_LOG_HEADER
 
COLORREF g_aclCustomColors [16] = {0}
 
D3DXVECTOR4 g_aclNormalColors [14]
 
std::vector< std::string > g_aPreviousFiles
 
D3DCOLOR g_avLightColors [3]
 
aiVector3D g_avLightDirs [1]
 
bool g_bFPSView = false
 
bool g_bInvert = false
 
bool g_bLoadingCanceled = false
 
bool g_bLoadingFinished = false
 
bool g_bMousePressed = false
 
bool g_bMousePressedBoth = false
 
bool g_bMousePressedM = false
 
bool g_bMousePressedR = false
 
bool g_bPlay = false
 
bool g_bWasFlipped = false
 
unsigned short g_cubeIndices []
 Indices for the skybox. More...
 
SkyBoxVertex g_cubeVertices_indexed []
 Vertices for the skybox. More...
 
double g_dCurrent = 0.
 
EClickPos g_eClick = EClickPos_Circle
 
float g_fACMR = 3.0f
 
float g_fElpasedTime = 0.0f
 
double g_fFPS = 0.0f
 
float g_fLightColor = 1.0f
 
float g_fLightIntensity = 1.0f
 
float g_fLoadTime = 0.0f
 
float g_fWheelPos = -10.0f
 
HWND g_hDlg = NULL
 
HMENU g_hHistoryMenu = NULL
 
HINSTANCE g_hInstance = NULL
 
HKEY g_hRegistry = NULL
 
HANDLE g_hThreadHandle = NULL
 
unsigned int g_iCurrentColor = 0
 
POINT g_LastmousePos
 
POINT g_mousePos
 
aiMatrix4x4 g_mWorld
 
aiMatrix4x4 g_mWorldRotate
 
AssetHelperg_pcAsset = NULL
 
IDirect3DTexture9 * g_pcTexture = NULL
 
IDirect3D9 * g_piD3D = NULL
 
ID3DXEffect * g_piDefaultEffect = NULL
 
IDirect3DDevice9 * g_piDevice = NULL
 
ID3DXEffect * g_piNormalsEffect = NULL
 
ID3DXEffect * g_piPassThroughEffect = NULL
 
ID3DXEffect * g_piPatternEffect = NULL
 
IDirect3DQuery9 * g_piQuery
 
Camera g_sCamera
 
D3DCAPS9 g_sCaps
 
float g_smoothAngle = 80.f
 
RenderOptions g_sOptions
 
std::string g_szCheckerBackgroundShader
 
std::string g_szDefaultShader
 
char g_szFileName [MAX_PATH]
 
unsigned char * g_szImageMask = NULL
 
std::string g_szMaterialShader
 
std::string g_szNormalsShader
 
std::string g_szPassThroughShader
 
std::string g_szSkyboxShader
 
aiVector3D g_vRotateSpeed = aiVector3D(0.5f,0.5f,0.5f)
 
IDirect3DVertexDeclaration9 * gDefaultVertexDecl = NULL
 
bool nopointslines = false
 
unsigned int ppsteps
 
unsigned int ppstepsdefault = ppsteps
 

Detailed Description

Calculates a pose for a given time of an animation.

Enumeration Type Documentation

Enumerator
EClickPos_Circle 
EClickPos_CircleVert 
EClickPos_CircleHor 
EClickPos_Outside 

Function Documentation

INT_PTR CALLBACK AssimpView::AboutMessageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
void AssimpView::AddTextureMem ( IDirect3DTexture9 *  pcTex,
unsigned int &  out 
)
int AssimpView::CalculateBounds ( aiNode piNode,
aiVector3D p_avOut,
const aiMatrix4x4 piMatrix 
)
void AssimpView::ChooseBGColor ( )
template<class type , class intype >
type AssimpView::clamp ( intype  in)
void AssimpView::ClearBG ( )
void AssimpView::ClearHistory ( )
int AssimpView::CreateAssetData ( )
int AssimpView::CreateDevice ( bool  p_bMultiSample,
bool  p_bSuperSample,
bool  bHW 
)
int AssimpView::CreateDevice ( void  )
int AssimpView::CreateHUDTexture ( )
int AssimpView::CreateMaterial ( AssetHelper::MeshHelper *  pcMesh,
const aiMesh pcSource 
)
int AssimpView::DeleteAsset ( void  )
int AssimpView::DeleteAssetData ( bool  bNoMaterials)
void AssimpView::DisplayColorDialog ( D3DCOLOR *  pclrResult)
void AssimpView::DisplayColorDialog ( D3DXVECTOR4 *  pclrResult)
void AssimpView::DisplayMemoryConsumption ( )
void AssimpView::DoExport ( size_t  formatId)
VOID WINAPI AssimpView::FillFunc ( D3DXVECTOR4 *  pOut,
CONST D3DXVECTOR2 *  pTexCoord,
CONST D3DXVECTOR2 *  pTexelSize,
LPVOID  pData 
)
int AssimpView::GenerateNormalsAsLineList ( AssetHelper::MeshHelper *  pcMesh,
const aiMesh pcSource 
)
aiVector3D AssimpView::GetCameraMatrix ( aiMatrix4x4 p_mOut)
void AssimpView::GetNodeCount ( aiNode pcNode,
unsigned int *  piCnt 
)
int AssimpView::GetProjectionMatrix ( aiMatrix4x4 p_mOut)
void AssimpView::HandleCommandLine ( char *  p_szCommand)
void AssimpView::HandleKeyboardInputFPS ( void  )
void AssimpView::HandleKeyboardInputTextureView ( void  )
void AssimpView::HandleMouseInputFPS ( void  )
void AssimpView::HandleMouseInputLightIntensityAndColor ( void  )
void AssimpView::HandleMouseInputLightRotate ( void  )
void AssimpView::HandleMouseInputLocal ( void  )
void AssimpView::HandleMouseInputSkyBox ( void  )
void AssimpView::HandleMouseInputTextureView ( void  )
INT_PTR CALLBACK AssimpView::HelpDialogProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
int AssimpView::InitD3D ( void  )
void AssimpView::InitUI ( )
int AssimpView::LoadAsset ( void  )
void AssimpView::LoadBGTexture ( )
void AssimpView::LoadCheckerPatternColors ( )
void AssimpView::LoadHistory ( )
void AssimpView::LoadLightColors ( )
void AssimpView::LoadSkybox ( )
DWORD WINAPI AssimpView::LoadThreadProc ( LPVOID  lpParameter)
INT_PTR CALLBACK AssimpView::LogDialogProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
void AssimpView::MakeFileAssociations ( )
INT_PTR CALLBACK AssimpView::MessageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
void AssimpView::OpenAsset ( )
void AssimpView::PopulateExportMenu ( )
INT_PTR CALLBACK AssimpView::ProgressMessageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
void AssimpView::SaveCheckerPatternColors ( )
void AssimpView::SaveHistory ( )
void AssimpView::SaveLightColors ( )
void AssimpView::SaveScreenshot ( )
int AssimpView::ScaleAsset ( void  )
int AssimpView::SetupFPSView ( )
void AssimpView::SetupPPUIState ( )
void AssimpView::ShowNormalUIComponents ( )
int AssimpView::ShutdownD3D ( void  )
int AssimpView::ShutdownDevice ( void  )
INT_PTR CALLBACK AssimpView::SMMessageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
void AssimpView::ToggleAutoRotate ( )
void AssimpView::ToggleCulling ( )
void AssimpView::ToggleFPSView ( )
void AssimpView::ToggleLightRotate ( )
void AssimpView::ToggleLowQuality ( )
void AssimpView::ToggleMats ( )
void AssimpView::ToggleMS ( )
void AssimpView::ToggleMultipleLights ( )
void AssimpView::ToggleNormals ( )
void AssimpView::ToggleSkeleton ( )
void AssimpView::ToggleSpecular ( )
void AssimpView::ToggleTransparency ( )
void AssimpView::ToggleUIState ( )
void AssimpView::ToggleWireFrame ( )
int CALLBACK AssimpView::TreeViewCompareFunc ( LPARAM  lParam1,
LPARAM  lParam2,
LPARAM  lParamSort 
)
void AssimpView::UpdateColorFieldsInUI ( )
void AssimpView::UpdateHistory ( )
void AssimpView::UpdatePPSettings ( )

Variable Documentation

const char* AssimpView::AI_VIEW_RTF_LOG_HEADER
static
Initial value:
=
"{\\rtf1"
"\\ansi"
"\\deff0"
"{"
"\\fonttbl{\\f0 Courier New;}"
"}"
"{\\colortbl;"
"\\red255\\green0\\blue0;"
"\\red255\\green120\\blue0;"
"\\red0\\green150\\blue0;"
"\\red0\\green0\\blue180;"
"\\red0\\green0\\blue0;"
"}}"
COLORREF AssimpView::g_aclCustomColors = {0}
D3DXVECTOR4 AssimpView::g_aclNormalColors[14]
Initial value:
=
{
D3DXVECTOR4(0xFF / 255.0f,0xFF / 255.0f,0xFF / 255.0f, 1.0f),
D3DXVECTOR4(0xFF / 255.0f,0x00 / 255.0f,0x00 / 255.0f,1.0f),
D3DXVECTOR4(0x00 / 255.0f,0xFF / 255.0f,0x00 / 255.0f,1.0f),
D3DXVECTOR4(0x00 / 255.0f,0x00 / 255.0f,0xFF / 255.0f,1.0f),
D3DXVECTOR4(0xFF / 255.0f,0xFF / 255.0f,0x00 / 255.0f,1.0f),
D3DXVECTOR4(0xFF / 255.0f,0x00 / 255.0f,0xFF / 255.0f,1.0f),
D3DXVECTOR4(0x00 / 255.0f,0xFF / 255.0f,0xFF / 255.0f,1.0f),
D3DXVECTOR4(0xFF / 255.0f,0x60 / 255.0f,0x60 / 255.0f,1.0f),
D3DXVECTOR4(0x60 / 255.0f,0xFF / 255.0f,0x60 / 255.0f,1.0f),
D3DXVECTOR4(0x60 / 255.0f,0x60 / 255.0f,0xFF / 255.0f,1.0f),
D3DXVECTOR4(0xA0 / 255.0f,0x00 / 255.0f,0x00 / 255.0f,1.0f),
D3DXVECTOR4(0x00 / 255.0f,0xA0 / 255.0f,0x00 / 255.0f,1.0f),
D3DXVECTOR4(0x00 / 255.0f,0x00 / 255.0f,0xA0 / 255.0f,1.0f),
D3DXVECTOR4(0x88 / 255.0f,0x88 / 255.0f,0x88 / 255.0f, 1.0f)
}
std::vector<std::string> AssimpView::g_aPreviousFiles
D3DCOLOR AssimpView::g_avLightColors
Initial value:
=
{
D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0xFF),
D3DCOLOR_ARGB(0xFF,0xFF,0x00,0x00),
D3DCOLOR_ARGB(0xFF,0x05,0x05,0x05),
}
aiVector3D AssimpView::g_avLightDirs
Initial value:
=
{ aiVector3D(-0.5f,0.6f,0.2f) }
aiVector3t< float > aiVector3D
Definition: vector3.h:132
bool AssimpView::g_bFPSView = false
bool AssimpView::g_bInvert = false
bool AssimpView::g_bLoadingCanceled = false
bool AssimpView::g_bLoadingFinished = false
bool AssimpView::g_bMousePressed = false
bool AssimpView::g_bMousePressedBoth = false
bool AssimpView::g_bMousePressedM = false
bool AssimpView::g_bMousePressedR = false
bool AssimpView::g_bPlay = false
bool AssimpView::g_bWasFlipped = false
unsigned short AssimpView::g_cubeIndices[]
Initial value:
=
{
0, 1, 2, 3, 2, 1,4, 5, 6,
7, 6, 5, 4, 6, 0, 1, 6, 0,
5, 2, 7,3, 2, 7, 1, 6, 3,
7, 3, 6, 0, 2, 4, 5, 4, 2,
}

Indices for the skybox.

SkyBoxVertex AssimpView::g_cubeVertices_indexed[]
Initial value:
=
{
{ -1.0f, 1.0f, -1.0f, -1.0f,1.0f,-1.0f },
{ 1.0f, 1.0f, -1.0f, 1.0f,1.0f,-1.0f },
{ -1.0f, -1.0f, -1.0f, -1.0f,-1.0f,-1.0f },
{ 1.0f,-1.0f,-1.0f, 1.0f,-1.0f,-1.0f },
{-1.0f, 1.0f, 1.0f, -1.0f,1.0f,1.0f },
{-1.0f,-1.0f, 1.0f, -1.0f,-1.0f,1.0f },
{ 1.0f, 1.0f, 1.0f, 1.0f,1.0f,1.0f },
{ 1.0f,-1.0f, 1.0f, 1.0f,-1.0f,1.0f }
}

Vertices for the skybox.

double AssimpView::g_dCurrent = 0.
EClickPos AssimpView::g_eClick = EClickPos_Circle
float AssimpView::g_fACMR = 3.0f
float AssimpView::g_fElpasedTime = 0.0f
double AssimpView::g_fFPS = 0.0f
float AssimpView::g_fLightColor = 1.0f
float AssimpView::g_fLightIntensity = 1.0f
float AssimpView::g_fLoadTime = 0.0f
float AssimpView::g_fWheelPos = -10.0f
HWND AssimpView::g_hDlg = NULL
HMENU AssimpView::g_hHistoryMenu = NULL
HINSTANCE AssimpView::g_hInstance = NULL
HKEY AssimpView::g_hRegistry = NULL
HANDLE AssimpView::g_hThreadHandle = NULL
unsigned int AssimpView::g_iCurrentColor = 0
POINT AssimpView::g_LastmousePos
POINT AssimpView::g_mousePos
aiMatrix4x4 AssimpView::g_mWorld
aiMatrix4x4 AssimpView::g_mWorldRotate
AssetHelper * AssimpView::g_pcAsset = NULL
IDirect3DTexture9 * AssimpView::g_pcTexture = NULL
IDirect3D9 * AssimpView::g_piD3D = NULL
ID3DXEffect * AssimpView::g_piDefaultEffect = NULL
IDirect3DDevice9 * AssimpView::g_piDevice = NULL
ID3DXEffect * AssimpView::g_piNormalsEffect = NULL
ID3DXEffect * AssimpView::g_piPassThroughEffect = NULL
ID3DXEffect * AssimpView::g_piPatternEffect = NULL
IDirect3DQuery9 * AssimpView::g_piQuery
Camera AssimpView::g_sCamera
D3DCAPS9 AssimpView::g_sCaps
float AssimpView::g_smoothAngle = 80.f
RenderOptions AssimpView::g_sOptions
std::string AssimpView::g_szCheckerBackgroundShader
std::string AssimpView::g_szDefaultShader
char AssimpView::g_szFileName
unsigned char * AssimpView::g_szImageMask = NULL
std::string AssimpView::g_szMaterialShader
std::string AssimpView::g_szNormalsShader
std::string AssimpView::g_szPassThroughShader
std::string AssimpView::g_szSkyboxShader
aiVector3D AssimpView::g_vRotateSpeed = aiVector3D(0.5f,0.5f,0.5f)
IDirect3DVertexDeclaration9 * AssimpView::gDefaultVertexDecl = NULL
bool AssimpView::nopointslines = false
unsigned int AssimpView::ppsteps
unsigned int AssimpView::ppstepsdefault = ppsteps