Files
mtgodot-poc/src/port/EterLib/Decal.h
T
shenleiandClaude Opus 5.5 a46093104c layout: restructure into src/ tests/ android/ scripts/ tools/
- extension/src/{port,platform,codepage} -> src/; native_render -> src/host
  (+ dxt, shaders/); libgr2 -> src/gr2; extension/third_party -> third_party
- extension/tests -> tests/port, libgr2/tests -> tests/gr2
- android-native -> android (build.sh, push-client.sh moved in)
- script -> scripts; tools/40250 -> tools/server; oracle -> tools/granny-oracle;
  perf tools -> tools/perf
- all build trees under build/ (native, release, android, port-gate)
- xrender:: CMake aliases -> mt::; port-map ledger impl paths rewritten

No code changes. ctest 15/15, port_gate macos+android PASS, port_map check 0 errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:08:19 +09:00

104 lines
2.4 KiB
C++

// Decal.h: interface for the CDecal class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DECAL_H__E3D27DFC_30CB_4995_B9B9_396B5E8A5F02__INCLUDED_)
#define AFX_DECAL_H__E3D27DFC_30CB_4995_B9B9_396B5E8A5F02__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "GrpBase.h"
class CDecal
{
public:
enum
{
MAX_DECAL_VERTICES = 256,
};
CDecal();
virtual ~CDecal();
void Clear();
virtual void Make(D3DXVECTOR3 v3Center, D3DXVECTOR3 v3Normal, D3DXVECTOR3 v3Tangent, float fWidth, float fHeight, float fDepth) = 0;
// virtual void Update();
virtual void Render();
protected:
//
D3DXVECTOR3 m_v3Center;
D3DXVECTOR3 m_v3Normal;
// Clip Plane
D3DXPLANE m_v4LeftPlane;
D3DXPLANE m_v4RightPlane;
D3DXPLANE m_v4BottomPlane;
D3DXPLANE m_v4TopPlane;
D3DXPLANE m_v4FrontPlane;
D3DXPLANE m_v4BackPlane;
// 개수
DWORD m_dwVertexCount;
DWORD m_dwPrimitiveCount;
// 버택스 버퍼와 인댁스 버퍼
// CGraphicVertexBuffer m_GraphicVertexBuffer;
// CGraphicIndexBuffer m_GraphicIndexBuffer;
// 버택스 버퍼와 인댁스 버퍼 대신에 배열 만들고 DrawIndexedPrimitiveUP로 그리자.
typedef struct
{
WORD m_wMinIndex;
DWORD m_dwVertexCount;
DWORD m_dwPrimitiveCount;
DWORD m_dwVBOffset;
} TTRIANGLEFANSTRUCT;
std::vector<TTRIANGLEFANSTRUCT> m_TriangleFanStructVector;
TPDTVertex m_Vertices[MAX_DECAL_VERTICES];
WORD m_Indices[MAX_DECAL_VERTICES];
const float m_cfDecalEpsilon;
protected:
bool AddPolygon(DWORD dwAddCount, const D3DXVECTOR3 *c_pv3Vertex, const D3DXVECTOR3 *c_pv3Normal);
void ClipMesh(DWORD dwPrimitiveCount, const D3DXVECTOR3 *c_pv3Vertex, const D3DXVECTOR3 *c_pv3Normal);
DWORD ClipPolygon(DWORD dwVertexCount,
const D3DXVECTOR3 *c_pv3Vertex,
const D3DXVECTOR3 *c_pv3Normal,
D3DXVECTOR3 *c_pv3NewVertex,
D3DXVECTOR3 *c_pv3NewNormal) const;
static DWORD ClipPolygonAgainstPlane(const D3DXPLANE& v4Plane,
DWORD dwVertexCount,
const D3DXVECTOR3 *c_pv3Vertex,
const D3DXVECTOR3 *c_pv3Normal,
D3DXVECTOR3 *c_pv3NewVertex,
D3DXVECTOR3 *c_pv3NewNormal);
};
/*
class CDecalManager : public CSingleton<CDecalManager>
{
public:
CDecalManager();
~CDecalManager();
void Add(CDecal * pDecal);
void Remove(CDecal * pDecal);
void Update();
void Render();
private:
std::vector<CDecal *> m_DecalPtrVector;
};
*/
#endif // !defined(AFX_DECAL_H__E3D27DFC_30CB_4995_B9B9_396B5E8A5F02__INCLUDED_)