logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

s3d_push_polygon - push polygon

Author

SimonWunderlich
           Author of s3d

s3d                                                                                          S3D_PUSH_POLYGON(3)

Description

       Push one polygon on the polygon stack of the object. It takes 3 vertex-index numbers and one material
       material-index-no. as argument.

            int oid = s3d_new_object();   // create a new object
            s3d_push_vertex(oid, 0.0, 0.0, 0.0);
            s3d_push_vertex(oid, 0.0, 1.0, 0.0);
            s3d_push_vertex(oid, 1.0, 0.0, 0.0);
            s3d_push_material(oid, 0.3, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0);
            s3d_push_polygon(oid, 0, 1, 2, 0);
            // this will create a red polygon

Name

       s3d_push_polygon - push polygon

Synopsis

#include<s3d.h>ints3d_push_polygon(intobject,uint32_tv1,uint32_tv2,uint32_tv3,uint32_tmaterial);

See Also