ON_SubDHash provides a simple way to save a SubD's vertex, edge, and face SHA1 hashes. Typically it is used when a calculation needs to know if the current SubD has is geometrically identical to a previous SubD. When speed is not important, comparing the current value of ON_SubD::GeometryHash() to a previously save value of ON_SubD::GeometryHash() is functionally identical but typically much slower when the SubDs are different.
More...
#include <opennurbs_subd.h>

 ON_SubDHash ()=default 

 ON_SubDHash (const ON_SubDHash &)=default 

 ~ON_SubDHash ()=default 

void  Dump (ON_TextLog &) const 

unsigned int  EdgeCount () const 
 Copied from the SubD when the hash is created. More...


const ON_SHA1_Hash  EdgeHash () const 
 If two SubDs have identical EdgeHash() values, then the SubD edge information associated with HashType() is identical. More...


unsigned int  FaceCount () const 
 Copied from the SubD when the hash is created. More...


const ON_SHA1_Hash  FaceHash () const 
 If two SubDs have identical FaceHash() values, then the SubD face information associated with HashType() is identical. More...


ON_SubDHashType  HashType () const 

bool  IsEmpty () const 

bool  IsNotEmpty () const 

ON_SubDHash &  operator= (const ON_SubDHash &)=default 

bool  Read (class ON_BinaryArchive &) 

ON__UINT64  SubDGeometryContentSerialNumber () const 
 The geometry content serial number can be used to quickly determine if a SubD is exactly the instance used to create this ON_SubDHash. If the geometry content serial numbers are equal, then the SubD is identical to the one use to create the hash. If the geometry content serial numbers differ, the current SubD hashes need to be checked against this to see what, if anything, changed. For example, moving a vertex will not change a topology hash. More...


const ON_SHA1_Hash  SubDHash () const 
 If two SubDs have identical SubDHash() values, then the SubD vertex, edge, and face information associated with HashType() is identical. More...


ON__UINT64  SubDRuntimeSerialNumber () const 
 The runtime serial number can be used to identify the SubD that was hashed to created this ON_SubDHash. More...


unsigned int  VertexCount () const 
 Copied from the SubD when the hash is created. More...


const ON_SHA1_Hash  VertexHash () const 
 If two SubDs have identical VertexHash() values, then the SubD vertex information associated with HashType() is identical. More...


bool  Write (class ON_BinaryArchive &) const 

ON_SubDHash provides a simple way to save a SubD's vertex, edge, and face SHA1 hashes. Typically it is used when a calculation needs to know if the current SubD has is geometrically identical to a previous SubD. When speed is not important, comparing the current value of ON_SubD::GeometryHash() to a previously save value of ON_SubD::GeometryHash() is functionally identical but typically much slower when the SubDs are different.
◆ ON_SubDHash() [1/2]
ON_SubDHash::ON_SubDHash 
( 
 ) 


default 
◆ ~ON_SubDHash()
ON_SubDHash::~ON_SubDHash 
( 
 ) 


default 
◆ ON_SubDHash() [2/2]
◆ Compare()
◆ Create() [1/2]
Saves the counts and hashs of the specified type.
Saves the counts and hashs of the specified type.
 Parameters

 Returns
◆ Create() [2/2]
◆ Dump()
◆ EdgeCount()
unsigned int ON_SubDHash::EdgeCount 
( 
 ) 
const 
Copied from the SubD when the hash is created.
 Returns
 Number of hashed edges.
◆ EdgeHash()
If two SubDs have identical EdgeHash() values, then the SubD edge information associated with HashType() is identical.
 Returns
 A SHA1 hash of the SubD's edge information associated with HashType().
◆ FaceCount()
unsigned int ON_SubDHash::FaceCount 
( 
 ) 
const 
Copied from the SubD when the hash is created.
 Returns
 Number of hashed faces.
◆ FaceHash()
If two SubDs have identical FaceHash() values, then the SubD face information associated with HashType() is identical.
 Returns
 A SHA1 hash of the SubD's face information associated with HashType().
◆ HashType()
◆ IsEmpty()
bool ON_SubDHash::IsEmpty 
( 
 ) 
const 
Returns: True if vertex count is 0 or HashType is unset.
◆ IsNotEmpty()
bool ON_SubDHash::IsNotEmpty 
( 
 ) 
const 
Returns: True if vertex count is > 0 and HashType is geometry or toplology.
◆ operator=()
◆ Read()
◆ SubDGeometryContentSerialNumber()
ON__UINT64 ON_SubDHash::SubDGeometryContentSerialNumber 
( 
 ) 
const 
The geometry content serial number can be used to quickly determine if a SubD is exactly the instance used to create this ON_SubDHash. If the geometry content serial numbers are equal, then the SubD is identical to the one use to create the hash. If the geometry content serial numbers differ, the current SubD hashes need to be checked against this to see what, if anything, changed. For example, moving a vertex will not change a topology hash.
 Returns
 Returns: If this hash was created from an ON_SubD, then the value of subd.GeometryContentSerialNumber() at the at the instant this hash was created is returned. Otherwise, 0 is returned.
◆ SubDHash()
If two SubDs have identical SubDHash() values, then the SubD vertex, edge, and face information associated with HashType() is identical.
 Returns
 A SHA1 hash of the SubD's vertex, edge, and face information associated with HashType().
◆ SubDRuntimeSerialNumber()
ON__UINT64 ON_SubDHash::SubDRuntimeSerialNumber 
( 
 ) 
const 
The runtime serial number can be used to identify the SubD that was hashed to created this ON_SubDHash.
 Returns
 If this hash was created from an ON_SubD, then the value of subd.RuntimeSerialNumber() is returned. Otherwise, 0 is returned.
◆ VertexCount()
unsigned int ON_SubDHash::VertexCount 
( 
 ) 
const 
Copied from the SubD when the hash is created.
 Returns
 Number of hashed vertices.
◆ VertexHash()
If two SubDs have identical VertexHash() values, then the SubD vertex information associated with HashType() is identical.
 Returns
 A SHA1 hash of the SubD's vertex information associated with HashType().
◆ Write()
◆ ON_SubDimple
friend class ON_SubDimple 

friend 
◆ Empty
All counts are zero and all hashes are ON_SHA1::EmptyContentHash.