Panda3D
 All Classes Functions Variables Enumerations
addHash.I
1 // Filename: add_hash.I
2 // Created by: drose (01Sep06)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: AddHash::add_hash
18 // Access: Public, Static
19 // Description: Adds a linear sequence of uint32 words to the hash.
20 ////////////////////////////////////////////////////////////////////
21 INLINE size_t AddHash::
22 add_hash(size_t start, const PN_uint32 *words, size_t num_words) {
23  return (size_t)hashword(words, num_words, (PN_uint32)start);
24 }
25 
26 ////////////////////////////////////////////////////////////////////
27 // Function: AddHash::add_hash
28 // Access: Public, Static
29 // Description: Adds a linear sequence of float32 words to the hash.
30 ////////////////////////////////////////////////////////////////////
31 INLINE size_t AddHash::
32 add_hash(size_t start, const PN_float32 *floats, size_t num_floats) {
33  return add_hash(start, (const PN_uint32 *)floats, num_floats);
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: AddHash::add_hash
38 // Access: Public, Static
39 // Description: Adds a linear sequence of float64 words to the hash.
40 ////////////////////////////////////////////////////////////////////
41 INLINE size_t AddHash::
42 add_hash(size_t start, const PN_float64 *floats, size_t num_floats) {
43  return add_hash(start, (const PN_uint32 *)floats, num_floats * 2);
44 }
45 
static size_t add_hash(size_t start, const PN_uint32 *words, size_t num_words)
Adds a linear sequence of uint32 words to the hash.
Definition: addHash.I:22
static size_t add_hash(size_t start, const PN_float32 *floats, size_t num_floats)
Adds a linear sequence of float32 words to the hash.
Definition: addHash.I:32