AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Projekte Mein kleiner mp3-Player... Updated 13.12.04
Thema durchsuchen
Ansicht
Themen-Optionen

Mein kleiner mp3-Player... Updated 13.12.04

Ein Thema von dizzy · begonnen am 25. Sep 2004 · letzter Beitrag vom 26. Feb 2005
 
Red_Dragon

Registriert seit: 23. Okt 2004
Ort: Germany
51 Beiträge
 
Delphi 7 Enterprise
 
#23

Re: Mein kleiner mp3-Player... Updated 13.12.04

  Alt 15. Jan 2005, 13:33
Zitat von dizzy:
Hmmm Hast du evtl. was im Code verändert? Bei mir klappt das nämlich. Poste doch mal die ganze Funktion in der die Zeile vorkommt (ich kann's grad nicht identifizieren ).
nope keine veränderung in der GFX datei die hab ich nicht angefast

Delphi-Quellcode:
procedure TDotSphere.DrawSphere(out bmp: TBitmap32; Source: TBassplayer; color: TColor32; const xRot, yRot, zRot: Double);
var
  C: TVector;
  i: Integer;
  sinX, cosX,
  sinY, cosY,
  sinZ, cosZ : Double;
  h: Integer;
  sx, sy, sz: Double;
  fact: Double;
  ind: Integer;
  d: Double;
begin
  FFFT := Source.getfftdatalong;
  C.x := bmp.Width/2;
  C.y := bmp.Height/2;
  C.z := 0;
  sinX := sin(xRot);
  sinY := sin(yRot);
  sinZ := sin(zRot);
  cosX := cos(xRot);
  cosY := cos(yRot);
  cosZ := cos(zRot);
  d := 16*(FMaxRad-FBaseRad);
  h := (Length(FDrawDots) div 2)-1;

  for i := 0 to h do
  begin
    ind := 2*i+16;
    if FFFT[ind] < FFFTOld[ind] then
      FFFT[ind] := FFFTOld[ind]-0.001;

    fact := FFFT[ind]*d;
    FDrawDots[i].x := FDots[i].x + (FDots[i].x/FBaseRad)*fact;
    FDrawDots[i].y := FDots[i].y + (FDots[i].y/FBaseRad)*fact;
    FDrawDots[i].z := FDots[i].z + (FDots[i].z/FBaseRad)*fact;
  end;

  for i := h+1 to Length(FDrawDots)-1 do
  begin
    ind := 2*(i-h+1)+17;
    if FFFT[ind] < FFFTOld[ind] then
      FFFT[ind] := FFFTOld[ind]-0.001;

    fact := FFFT[ind]*d;
    FDrawDots[i].x := FDots[i].x + (FDots[i].x/FBaseRad)*fact;
    FDrawDots[i].y := FDots[i].y + (FDots[i].y/FBaseRad)*fact;
    FDrawDots[i].z := FDots[i].z + (FDots[i].z/FBaseRad)*fact;
  end;

  for i := 0 to Length(FDrawDots)-1 do
  begin
    sx := FDrawDots[i].x;
    sy := FDrawDots[i].y;
    sz := FDrawDots[i].z;
    FDrawDots[i].x := sx*( cosY*cosZ) - sy*(cosY*sinZ) + sz*(sinY);
    FDrawDots[i].y := sx*( sinX*sinY*cosZ+cosX*sinZ) - sy*(sinX*sinY*sinZ-cosX*cosZ) - sz*(sinX*cosY);
    FDrawDots[i].z := sx*(-cosX*sinY*cosZ+sinX*sinZ) + sy*(cosX*sinY*sinZ+sinX*cosZ) + sz*(cosX*cosY);
    FDrawDots[i].color := Lighten(color, trunc(FDrawDots[i].z*3));
    bmp.PixelFS[FDrawDots[i].x+C.x, FDrawDots[i].y+C.y] := FDrawDots[i].color;
  end;

  Move(FFFT[0], FFFTOld[0], Length(FFFT)*SizeOf(Float));
end;
Walter
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:59 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz