www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Irony on November 09, 2014, 03:50:48 pm

Title: Which comes first: setvertexcontroller or build?
Post by: Irony on November 09, 2014, 03:50:48 pm
When I setvertexcontroller before build(), there is a warning about normals. When I set vertexcontroller after build, applyvertexcontroller seems to have no effect.
I have read and experienced some contradicting things about the topic.

Maybe it's important to mention that there is a rotateMesh call in there as well.
Title: Re: Which comes first: setvertexcontroller or build?
Post by: EgonOlsen on November 09, 2014, 05:04:43 pm
The best way is to call calcNormals(), then set the controller, then call build().
Title: Re: Which comes first: setvertexcontroller or build?
Post by: Irony on November 09, 2014, 06:31:35 pm
Works perfectly, thanks!
Title: Re: Which comes first: setvertexcontroller or build?
Post by: Irony on November 10, 2014, 11:25:01 am
One related question: Why does a cube have 10 vertices and not 8?
Title: Re: Which comes first: setvertexcontroller or build?
Post by: lawless_c on November 10, 2014, 11:55:13 am
vertices are the lines not the faces
http://t-machine.org/wp-content/uploads/cube-of-simple-verts.png
Title: Re: Which comes first: setvertexcontroller or build?
Post by: EgonOlsen on November 10, 2014, 12:30:19 pm
vertices are the lines not the faces
Neither...they are the end points of the lines.
Title: Re: Which comes first: setvertexcontroller or build?
Post by: EgonOlsen on November 10, 2014, 12:31:18 pm
One related question: Why does a cube have 10 vertices and not 8?
Depends on your cube. The ones creates by Primitives have 10, because they are actual lathe objects with addtional points in the center.
Title: Re: Which comes first: setvertexcontroller or build?
Post by: Irony on November 10, 2014, 12:46:54 pm
Yes I meant the one from Primitives. Thanks.
Title: Re: Which comes first: setvertexcontroller or build?
Post by: lawless_c on November 10, 2014, 03:02:28 pm
vertices are the lines not the faces
Neither...they are the end points of the lines.

oh right, sorry.