31 lines
691 B
C++
31 lines
691 B
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
#include "kprimitive.h"
|
|
|
|
class KTilePrimitive :
|
|
public KPrimitive
|
|
{
|
|
public:
|
|
struct STileVertex
|
|
{
|
|
//float x, y, z;
|
|
float x, y, z, w;
|
|
//DWORD color;
|
|
KColor color;
|
|
float u, v;
|
|
};
|
|
|
|
KTilePrimitive(void);
|
|
~KTilePrimitive(void);
|
|
void Render( KViewportObject *viewport, class K3DRenderDevice *dev, bool bUseAccum = true );
|
|
void SetTexture(K3DTexture* pTexture) {m_spTexture = pTexture;}
|
|
void SetupVerts(STileVertex min, STileVertex max);
|
|
|
|
//private:
|
|
|
|
STileVertex m_Verts[4]; ///< 반시계 방향으로 돌아가는 Triangle Fan
|
|
K3DTextureSPtr m_spTexture;
|
|
STileVertex m_Min, m_Max; ///< 원래의 min, max 좌표를 기억
|
|
};
|