Blender V5.0
SceneHash.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "IndexedFaceSet.h"
12#include "NodeCamera.h"
13#include "NodeViewLayer.h"
14#include "SceneVisitor.h"
15
16#include "BLI_sys_types.h"
17
18#include "MEM_guardedalloc.h"
19
20namespace Freestyle {
21
22class SceneHash : public SceneVisitor {
23 public:
25 {
26 _sum = 1;
27 }
28
29 virtual ~SceneHash() {}
30
34
35 string toString();
36
37 inline bool match()
38 {
39 return _sum == _prevSum;
40 }
41
42 inline void store()
43 {
44 _prevSum = _sum;
45 }
46
47 inline void reset()
48 {
49 _sum = 1;
50 }
51
52 private:
53 void adler32(const uchar *data, int size);
54
55 uint32_t _sum;
56 uint32_t _prevSum;
57
58 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SceneHash")
59};
60
61} /* namespace Freestyle */
unsigned char uchar
A Set of indexed faces to represent a surface object.
Read Guarded memory(de)allocation.
Class to represent a light node.
Class to represent a view layer in Blender.
Class to visit (without doing anything) a scene graph structure.
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
VISIT_DECL(NodeViewLayer)
VISIT_DECL(NodeCamera)
virtual ~SceneHash()
Definition SceneHash.h:29
VISIT_DECL(IndexedFaceSet)
inherits from class Rep
Definition AppCanvas.cpp:20