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
Draw3D.Canvas Initialization
-
- Advanced
- Posts: 103
- Joined: Tue Mar 02, 2004 5:00 am
- Location: Bad Wurzach
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
-
- Advanced
- Posts: 103
- Joined: Tue Mar 02, 2004 5:00 am
- Location: Bad Wurzach
- Contact:
Draw3D.Canvas Understanding
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
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.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dimitrios,
I did:
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.
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;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Advanced
- Posts: 103
- Joined: Tue Mar 02, 2004 5:00 am
- Location: Bad Wurzach
- Contact:
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
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:
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.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;