GOOC - Game Oriented Object C

GOOC - Game Oriented Object C

Next: Volume Constants, Previous: Metre Constants, Up: Constants
[Contents]

5.3.5. Scale & Normal Constants

5.3.5. Scale & Normal Constants

A scale constant is a value that represents the scale of a three-dimensional object. One scale unit is equivalent to 16 (sixteen) units (represented as real numbers), meaning scale units can also be interpreted as Q12 fixed-point values. Data for lighting normals is stored as Q12 fixed-point units and thus scale constants can also be used for that purpose. A scale constant can be written as any integer or real number followed by the suffix S.

Either the integer part or the fractional part may be omitted, but not both. Here are some examples of valid scale constants: 1.0S 0.04S -.2S +1.2S

Keep in mind that two-dimensional objects use a Q8 fixed-point value for their scaling, meaning they are best represented as real numbers.