root/OpenSceneGraph/trunk/src/osgUtil/tristripper/include/detail/policy.h @ 10894

Revision 10894, 1.1 kB (checked in by robert, 5 years ago)

From Tanguy Fautre and Robert Osfield, updated tristripper code to use the latest tristripper_r94 code.

Line 
1//
2// Copyright (C) 2004 Tanguy Fautré.
3// For conditions of distribution and use,
4// see copyright notice in tri_stripper.h
5//
6//////////////////////////////////////////////////////////////////////
7// SVN: $Id: policy.h 86 2005-06-08 17:47:27Z gpsnoopy $
8//////////////////////////////////////////////////////////////////////
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
19namespace triangle_stripper {
20
21        namespace detail {
22
23
24
25
26class policy
27{
28public:
29        policy(size_t MinStripSize, bool Cache);
30
31        strip BestStrip() const;
32        void Challenge(strip Strip, size_t Degree, size_t CacheHits);
33
34private:
35        strip   m_Strip;
36        size_t  m_Degree;
37        size_t  m_CacheHits;
38
39        const size_t    m_MinStripSize;
40        const bool              m_Cache;
41};
42
43
44
45
46
47inline policy::policy(size_t MinStripSize, bool Cache)
48: m_Degree(0), m_CacheHits(0), m_MinStripSize(MinStripSize), m_Cache(Cache) { }
49
50
51inline 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
Note: See TracBrowser for help on using the browser.