Guest mantragora Posted May 13, 2013 Share Posted May 13, 2013 (edited) WTF, right ?! Yeah, I bet your first reaction for this title was the same as my when I saw this number I found this diamond while browsing HDK examples and I would really, REALLY, like to know how I could ever, EVER, possibly figure it out on my own. Basically, you bind selector to operator and this => "0x000000ff" <= is the 8 argument that you pass to "bindSelector()" method as prim/point mask selection. Q1: Is there anyone that could explain me what it means and where I could find more info about it ?. Q2: Are there any other magic numbers that I should be aware of ? Cheers PS. I found it in this example http://www.sidefx.co..._c-example.html Edited May 13, 2013 by mantragora Quote Link to comment Share on other sites More sharing options...
Macha Posted May 13, 2013 Share Posted May 13, 2013 255 ? Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted May 13, 2013 Share Posted May 13, 2013 255 ? That's answer for the first or second question ? Quote Link to comment Share on other sites More sharing options...
symek Posted May 13, 2013 Share Posted May 13, 2013 44 Quote Link to comment Share on other sites More sharing options...
Guest tar Posted May 14, 2013 Share Posted May 14, 2013 1. looks like standard hexadecimal. converting this to decimal should be (16*15)+15 = 255 more info here: http://www.codeproje...and-Hexadecimal 2. Yes, all numbers in hexadecimal look like this, you can use http://easycalculati...x-converter.php Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted May 14, 2013 Share Posted May 14, 2013 (edited) 1. looks like standard hexadecimal. converting this to decimal should be (16*15)+15 = 255 more info here: http://www.codeproje...and-Hexadecimal 2. Yes, all numbers in hexadecimal look like this, you can use http://easycalculati...x-converter.php I know how it looks.I don't know WHY it's there and WHAT it means for the code. Can I write there any number ? Or is there some specified code table that should be used there ? If I find in the middle of the code some number most of the time I prefer to know why it's there. Especially when it specifies prim/point mask selection and is not commented anywhere. Edited May 14, 2013 by mantragora Quote Link to comment Share on other sites More sharing options...
edward Posted May 14, 2013 Share Posted May 14, 2013 The primmask refers to *_FILEID enums in GEO_PrimTypeCompat.h. A regular GEO_PrimTypeCompat mask can be used if you first convert it using GEO_PrimTypeCompat::convertToFileFromMask(). I've better documented the bindSelector() method for the next major Houdini release. Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted May 14, 2013 Share Posted May 14, 2013 Thanks Edward! Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted May 14, 2013 Share Posted May 14, 2013 (edited) Oh, there is one more thing. I looked into PrimTypeCompat.h that is delivered with my Houdini build (12.5.393) and there is no Enum with this code specified inside. I got 20 positions to choose from: 0x00000001, // Polygon 0x00000002, // NURB Curve 0x00000004, // Rational Bezier Curve 0x00000010, // Linear patch 0x00000020, // NURB Surface 0x00000040, // Rational Bezier Surface 0x00000f00, // TPsurf Paste Hierarchy 0x00001000, // Ellipse/Circle 0x00002000, // Ellipsoid/Sphere 0x00004000, // Cylinder 0x00008000, // Particle 0x00100000, // Meta-ball 0x00200000, // Super quadric 0x00300000, // Meta-line 0x00400000, // Meta-bezier 0x00500000, // Meta-triangle 0x10000000, // Triangle fans 0x20000000, // Generalized triangle strips 0x30000000, // Triangular beziers 0x40000000, // Voxel volume Online verion of this file contains even less positions http://www.sidefx.co..._8h_source.html. Is it mean that the code example contains deprecated number or it's just omission in the code? Edited May 14, 2013 by mantragora Quote Link to comment Share on other sites More sharing options...
edward Posted May 14, 2013 Share Posted May 14, 2013 You see how some of those numbers are powers of 2? It means that they're bit flags. So 0xFF will match any of those first 6 primitive types. Random Google link http://forum.codecall.net/topic/56591-bit-flags-tutorial-with-example/ Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted May 14, 2013 Share Posted May 14, 2013 Again, Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.