Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
policy.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004 Tanguy Fautré.
3 // For conditions of distribution and use,
4 // see copyright notice in tri_stripper.h
5 //
7 // SVN: $Id: policy.h 86 2005-06-08 17:47:27Z gpsnoopy $
9 
10 #ifndef TRI_STRIPPER_HEADER_GUARD_POLICY_H
11 #define TRI_STRIPPER_HEADER_GUARD_POLICY_H
12 
13 #include "../public_types.h"
14 #include "types.h"
15 
16 
17 
18 
19 namespace triangle_stripper {
20 
21  namespace detail {
22 
23 
24 
25 
26 class policy
27 {
28 public:
29  policy(size_t MinStripSize, bool Cache);
30 
31  strip BestStrip() const;
32  void Challenge(strip Strip, size_t Degree, size_t CacheHits);
33 
34 private:
35  strip m_Strip;
36  size_t m_Degree;
37  size_t m_CacheHits;
38 
39  size_t m_MinStripSize;
40  bool m_Cache;
41 };
42 
43 
44 
45 
46 
47 inline policy::policy(size_t MinStripSize, bool Cache)
48 : m_Degree(0), m_CacheHits(0), m_MinStripSize(MinStripSize), m_Cache(Cache) { }
49 
50 
51 inline strip policy::BestStrip() const
52 {
53  return m_Strip;
54 }
55 
56 
57 
58 
59  } // namespace detail
60 
61 } // namespace triangle_stripper
62 
63 
64 
65 
66 #endif // TRI_STRIPPER_HEADER_GUARD_POLICY_H
void Challenge(strip Strip, size_t Degree, size_t CacheHits)
Definition: policy.cpp:22
policy(size_t MinStripSize, bool Cache)
Definition: policy.h:47