Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12th September 2003, 12:44 PM   #1
ray
Junior Member
Junior member
 
Join Date: Sep 2003
Posts: 1
Default how can i do a triangles file in C for read in ac3d

i have this problem:

my C-code comes output the next format in general to a file (ascci)

x1 y1 z1 x2 y2 z2 x3 y3 z3 r g b

every space is a tabulator \t & ovbiously is a triangle whit color r g b (0-255).

then i want to transform this file to an other such that Ac3d can read.

if you know the sintaxis of a triangle in ac3d please this is the solution.

thanks :wink:
__________________
i like 3d animation and all think about that.
ray is offline   Reply With Quote
Old 12th September 2003, 06:18 PM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: how can i do a triangles file in C for read in ac3d

Hi Ray,

The format of triangle files is in the AC3D manual. if you can change your c code to output lines like this:

fprintf(f, "%g %g %g %g %g %g %g %g %g 0x%X\n",
p1->x, p1->y, p1->z,
p2->x, p2->y, p2->z,
p3->x, p3->y, p3->z,
rgb);

that will load into AC3D as a .tri file.

Andy
Andy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 04:45 PM.


AC3D Forum
(C) Inivis Limited 2020