Einzelnen Beitrag anzeigen

blackfin
(Gast)

n/a Beiträge
 
#199

AW: Eure besten Quellcode Kommentare...

  Alt 5. Jul 2010, 21:57
Aus dem GLScene Source:

Delphi-Quellcode:
// a function returning some integer based on the root^exponant concept,
// result is crap and is only for "random" usage... eg perlin.
function ExponateCrap(root, exponant : Integer) : Integer;
Result := 1.0 - X / 1073741824.0 // make it a [-1;1] affair!
Delphi-Quellcode:
{: Damping applied to rotation speed (yuck!).<br>
Well, this one is not "exact", like TranslationDamping, and neither
it is "physical" since I'm reusing the mass and... and... well don't
show this to your science teacher 8).<br>
Anyway that's easier to use than the realworld formulas, calculated
faster, and properly used can give a good illusion of reality. }

property RotationDamping : TGLDamping read FRotationDamping write SetRotationDamping;
  Mit Zitat antworten Zitat