// ObjectChild.h: interface for the CObjectChild class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_OBJECTCHILD_H__66461ECB_74A2_47DA_BD3A_578ED7698888__INCLUDED_)
#define AFX_OBJECTCHILD_H__66461ECB_74A2_47DA_BD3A_578ED7698888__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "AtumNode.h"
#include "ObjectRender.h"
#include ".\Src_Eff\EffectRender.h"// by dhkwon 2003.5.16

class CObjectChild : public CAtumNode  
{
public:
	CObjectChild(int objType, D3DXVECTOR3 vPos,BOOL bCheckTick);
//	CObjectChild(int objType,BOOL bRenderType, D3DXVECTOR3 vPos, D3DXVECTOR3 vVel,D3DXVECTOR3 vUp,BOOL bCheckTick);
	CObjectChild(OBJECTINFO info1,MAPOBJECTINFODETAIL info2);
	CObjectChild(D3DXVECTOR3 vPos);
	CObjectChild( D3DXVECTOR3 vPos, D3DXVECTOR3 vVel, D3DXVECTOR3 vUp, int nObjType );
	virtual ~CObjectChild();
	virtual void Render();
	virtual void Tick();
	BOOL IntersectTriangle( const D3DXVECTOR3& orig,
                           const D3DXVECTOR3& dir, D3DXVECTOR3& v0,
                           D3DXVECTOR3& v1, D3DXVECTOR3& v2,
                           FLOAT* t, FLOAT* u, FLOAT* v );
	void SetObjectMatrix( D3DXMATRIX mat );
    D3DXVECTOR3     m_vCompanionPos;     

 	FLOAT			m_fCurrentTime;
	FLOAT			m_fMaxTime;

	DWORD			m_dwState;			// -1:initializing, 0:normal, 1:exploding, 2 : close
    D3DXVECTOR3     m_vPos;             // Position
	D3DXVECTOR3     m_vVel;             // Vel
    D3DXVECTOR3     m_vUp;				// Up Vector
	BOOL			m_bExploded;		// 상태
	BOOL			m_bRenderType;		// 렌더 타입
	BOOL			m_bCheckTick;		// Tick 걸며 고저 자동조절 변수
	BOOL			m_bCheckChoose;		// 오브젝트 에디터에서 선택여부 변수
	BOOL			m_bCheckRender;		// 깜빡거림을 위한 렌더링 여부 변수
	CObjectRender *	m_pRenderer;
	D3DXMATRIX		m_mMatrix;

	INT				m_nObjScreenX;
	INT				m_nObjScreenY;
	INT				m_nObjScreenW;

	INT				m_nObjectNum;
	MAPOBJECTINFODETAIL	m_info;

	LONGLONG				m_bodyCondition;
	CCharacterInfo*			m_pCharacterInfo;
	void LoadCharacterEffect(char* strFileName);
};

#endif // !defined(AFX_OBJECTCHILD_H__66461ECB_74A2_47DA_BD3A_578ED7698888__INCLUDED_)
