( self )
| 211 | self.assertEqual( m.maxVerticesPerFace(), 4 ) |
| 212 | |
| 213 | def testHash( self ) : |
| 214 | |
| 215 | m = IECoreScene.MeshPrimitive( IECore.IntVectorData(), IECore.IntVectorData(), "linear", IECore.V3fVectorData() ) |
| 216 | h = m.hash() |
| 217 | t = m.topologyHash() |
| 218 | |
| 219 | m2 = m.copy() |
| 220 | self.assertEqual( m2.hash(), h ) |
| 221 | self.assertEqual( m2.topologyHash(), t ) |
| 222 | |
| 223 | m.setTopology( IECore.IntVectorData( [ 3 ] ), IECore.IntVectorData( [ 0, 1, 2 ] ), "linear" ) |
| 224 | self.assertNotEqual( m.hash(), h ) |
| 225 | self.assertNotEqual( m.topologyHash(), t ) |
| 226 | h = m.hash() |
| 227 | t = m.topologyHash() |
| 228 | |
| 229 | m.setTopology( IECore.IntVectorData( [ 3 ] ), IECore.IntVectorData( [ 0, 2, 1 ] ), "linear" ) |
| 230 | self.assertNotEqual( m.hash(), h ) |
| 231 | self.assertNotEqual( m.topologyHash(), t ) |
| 232 | h = m.hash() |
| 233 | t = m.topologyHash() |
| 234 | |
| 235 | m.setTopology( IECore.IntVectorData( [ 3 ] ), IECore.IntVectorData( [ 0, 2, 1 ] ), "catmullClark" ) |
| 236 | self.assertNotEqual( m.hash(), h ) |
| 237 | self.assertEqual( m.topologyHash(), t ) |
| 238 | h = m.hash() |
| 239 | t = m.topologyHash() |
| 240 | |
| 241 | m["primVar"] = IECoreScene.PrimitiveVariable( IECoreScene.PrimitiveVariable.Interpolation.Constant, IECore.IntData( 10 ) ) |
| 242 | self.assertNotEqual( m.hash(), h ) |
| 243 | self.assertEqual( m.topologyHash(), t ) |
| 244 | |
| 245 | def testBox( self ) : |
| 246 |
nothing calls this directly
no test coverage detected