BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
BrawlLib.Modeling.Triangle_Converter.Policy Class Reference

Public Member Functions

 Policy (uint MinStripSize, bool Cache)
 
void Challenge (Strip Strip, uint Degree, uint CacheHits)
 

Properties

Strip BestStrip [get]
 

Constructor & Destructor Documentation

◆ Policy()

BrawlLib.Modeling.Triangle_Converter.Policy.Policy ( uint  MinStripSize,
bool  Cache 
)
inline
11 {
12 m_MinStripSize = MinStripSize;
13 m_Cache = Cache;
14 }

Member Function Documentation

◆ Challenge()

void BrawlLib.Modeling.Triangle_Converter.Policy.Challenge ( Strip  Strip,
uint  Degree,
uint  CacheHits 
)
inline
19 {
20 if (Strip.Size < m_MinStripSize)
21 {
22 return;
23 }
24
25 if (!m_Cache)
26 {
27 //Cache is disabled, take the longest strip
28 if (Strip.Size > m_Strip.Size)
29 {
30 m_Strip = Strip;
31 }
32 }
33 else
34 {
35 //Cache simulator enabled
36 if (CacheHits > m_CacheHits)
37 {
38 //Priority 1: Keep the strip with the best cache hit count
39 m_Strip = Strip;
40 m_Degree = Degree;
41 m_CacheHits = CacheHits;
42 }
43 else if (CacheHits == m_CacheHits &&
44 (m_Strip.Size != 0 && Degree < m_Degree || Strip.Size > m_Strip.Size))
45 {
46 //Priority 2: Keep the strip with the loneliest start triangle
47 //Priority 3: Keep the longest strip
48 m_Strip = Strip;
49 m_Degree = Degree;
50 }
51 }
52 }
uint Size
Definition: Types.cs:158

Property Documentation

◆ BestStrip

Strip BrawlLib.Modeling.Triangle_Converter.Policy.BestStrip
get

The documentation for this class was generated from the following file: