coastline 0.0.4
Loading...
Searching...
No Matches
tricache.h
Go to the documentation of this file.
1#ifndef COASTLINE_TRICACHE_H
2#define COASTLINE_TRICACHE_H
3
9
10#include <PR/ultratypes.h>
11
12#include "common/vecmath.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
19#define TRI_CACHE_SLOTS 4
20
22#define TRI_CACHE_TRIANGLES 150
23
33
45
57
69
70#if !TGR_BOSS_RALLY
80
90#endif
91
103
104#if !TGR_BOSS_RALLY
116#endif /* !TGR_BOSS_RALLY */
117
130
146
147#ifdef __cplusplus
148}
149#endif
150
151#endif /* COASTLINE_TRICACHE_H */
A triangle of the track with its plane.
Definition tricache.h:25
f32 planeOffset
Definition tricache.h:27
s16 index
Definition tricache.h:29
Vec3f normal
Definition tricache.h:26
u8 surface
Definition tricache.h:31
Vec3f * vertices[3]
Definition tricache.h:28
A point or direction in space.
Definition vecmath.h:17
u32 g_dwTriCacheLruCounter
The count of the uses of the cache.
u32 g_adwTriCacheLruStamp[TRI_CACHE_SLOTS]
When each slot was last used.
#define TRI_CACHE_SLOTS
The cells of the grid the cache holds at once.
Definition tricache.h:19
s32 InvalidateTriCacheSectorAt(f32 x, f32 y)
Empty the slot that holds the cell under a point.
TrackTriangle g_aTriCacheTriangles[TRI_CACHE_SLOTS][TRI_CACHE_TRIANGLES]
The track triangles stored in each slot of the collision cache.
Vec3f g_vRayCeilingNormalInit
The initial ceiling normal for a vertical ray cast.
Vec3f g_vRayGroundNormalInit
The initial ground normal for a vertical ray cast.
s16 BuildTrackTriangleCache(f32 x, f32 y)
Find or fill the slot of the cache that holds the triangles of the cell under a point,...
u16 g_awTriCacheTriCount[TRI_CACHE_SLOTS]
The triangles in each slot.
u16 g_awTriCacheSectorId[TRI_CACHE_SLOTS]
The cell each slot holds, as its row times 64 plus its column.
#define TRI_CACHE_TRIANGLES
The triangles a slot of the cache holds.
Definition tricache.h:22
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
short s16
Definition ultratypes.h:24
float f32
Definition ultratypes.h:38
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18
The vector and matrix arithmetic of the game, its arctangent and power, the triangle and segment test...