coastline 0.0.4
Loading...
Searching...
No Matches
shadowclip.h
Go to the documentation of this file.
1#ifndef COASTLINE_SHADOW_CLIP_H
2#define COASTLINE_SHADOW_CLIP_H
3
5
12
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
24#define SHADOW_CLIP_VERTEX_COUNT 64
25
33
41
43typedef long double (*ShadowClipDistance)(const ConvertedModelVertex *vertex);
44
56LerpShadowClipVertex(const ShadowClipVertex *first, const ShadowClipVertex *second, f32 fraction);
57
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* COASTLINE_SHADOW_CLIP_H */
void ClipShadowPolygon(ShadowClipPolygon *polygon, ShadowClipDistance distance)
Clip a circular polygon against a signed texture-boundary distance.
ShadowClipVertex g_aShadowClipVertexPool[SHADOW_CLIP_VERTEX_COUNT]
The pool of the vertices of the clipping of shadows.
#define SHADOW_CLIP_VERTEX_COUNT
The number of entries of g_aShadowClipVertexPool.
Definition shadowclip.h:24
long double(* ShadowClipDistance)(const ConvertedModelVertex *vertex)
Compute a vertex's signed distance from a shadow-clipping boundary.
Definition shadowclip.h:43
ShadowClipVertex * LerpShadowClipVertex(const ShadowClipVertex *first, const ShadowClipVertex *second, f32 fraction)
Take a clipping node from the free list and interpolate all eight vertex components.
ShadowClipVertex * g_pShadowClipVertexFreeList
The first free vertex of g_aShadowClipVertexPool.
A model vertex converted into the renderer's working format.
Definition convertedvertex.h:7
A circular list of shadow vertices being clipped to a texture boundary.
Definition shadowclip.h:14
ShadowClipVertex * pHead
Definition shadowclip.h:15
s32 nCount
Definition shadowclip.h:16
A clipping link with a pointer to its attributes and inline vertex storage.
Definition shadowclip.h:7
struct ShadowClipVertex * pNext
Definition shadowclip.h:8
ConvertedModelVertex vertex
Definition shadowclip.h:10
ConvertedModelVertex * pVertex
Definition shadowclip.h:9
float f32
Definition ultratypes.h:38
int s32
Definition ultratypes.h:25