Jump to content

Guest mantragora

Recommended Posts

Guest mantragora

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 by mantragora
Link to comment
Share on other sites

Guest mantragora

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 by mantragora
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest mantragora

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 by mantragora
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...