Draw3D.Canvas Initialization

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Draw3D.Canvas Initialization

Post by Thomas Klingler » Thu Jun 22, 2006 9:55 am

Hello,

I am trying to make some 3D objects using the TDraw3D. When i draw an object it doesn't appear on the canvas. Probably because the actuall coordinates of the points of the object are pretty huge numbers and very far away from the current view of the canvas. I was wondering, is there any way to initialize the canvas and general bring it in a position that i can view this object? Thank you in advance.

King Regards
Dimitrios

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jun 22, 2006 10:19 am

Hi Dimitrios,

It may help you retrieving chart's rectangle coordinates using Draw3D1.ChartRect. It could also help having a look at the All Features\Components\Draw3D panel and All Features\Components\OpenGL\Football example in the TeeChart features demo. You'll find the demo at TeeChart's program group.

If the problem persists please send us an example we can run "as-is" to reproduce the problem here. You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Draw3D.Canvas Understanding

Post by Thomas Klingler » Thu Jun 22, 2006 2:39 pm

Hello Narcis

Thanks for the suggestions but it didn't make any difference. Could you please try the following scenarion and see if it works? In a new project add a TDraw3D and a TeeCommander components to the form. Then simply on the OnPaint Event of the TDraw3D try to draw on the canvas (e.g. Draw3D1.Canvas) a point with x:-4129749 and y:190627496. Can you view the point, what setup in terms of zooming or offesets do you have to do in order to accomplice that? Thanks you.

King Regards
Dimitrios
narcis wrote:Hi Dimitrios,

It may help you retrieving chart's rectangle coordinates using Draw3D1.ChartRect. It could also help having a look at the All Features\Components\Draw3D panel and All Features\Components\OpenGL\Football example in the TeeChart features demo. You'll find the demo at TeeChart's program group.

If the problem persists please send us an example we can run "as-is" to reproduce the problem here. You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jun 22, 2006 3:00 pm

Hi Dimitrios,

I did:

Code: Select all

procedure TForm1.Draw3D1Paint(Sender: TObject; const ARect: TRect);
begin
  Draw3D1.Canvas.Sphere(-4129749,190627496,0,10);
  Draw3D1.Canvas.Sphere(100,100,0,10);
end;
And could only see the second sphere. The first sphere is far away from Draw3D1 bounds. The available surface will be limited for Draw3D1's width and height.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Thu Jun 22, 2006 3:57 pm

Hi Narcís

Ok thanks a lot, i think i'll have to modify my values to fit the canvas bounds. Thanks for your time.

King Regards
Dimitrios
narcis wrote:Hi Dimitrios,

I did:

Code: Select all

procedure TForm1.Draw3D1Paint(Sender: TObject; const ARect: TRect);
begin
  Draw3D1.Canvas.Sphere(-4129749,190627496,0,10);
  Draw3D1.Canvas.Sphere(100,100,0,10);
end;
And could only see the second sphere. The first sphere is far away from Draw3D1 bounds. The available surface will be limited for Draw3D1's width and height.

Post Reply