ronghester
Member
|
Extrude?
Hi,
I have a quad in XZ plane and i want to extrude it in Y direction by 20 unit? How should i accomplish this?
The quad vertices and indices are set into meshbase object.
Thanks
|
|
12-25-2017 05:42 PM |
|
Zervox
Member
|
RE: Extrude?
base.vtx.pos("index of vertex you want to move").set(x,y,z)
(This post was last modified: 12-25-2017 05:59 PM by Zervox.)
|
|
12-25-2017 05:58 PM |
|
ronghester
Member
|
RE: Extrude?
(12-25-2017 05:58 PM)Zervox Wrote: base.vtx.pos("index of vertex you want to move").set(x,y,z)
I think you did not understand my questions. I want to extrude the quad. The function you provided will simply move the vertex to that position.
Graphical Explanation
|
|
12-26-2017 05:47 PM |
|
Esenthel
Administrator
|
RE: Extrude?
MeshBase has various functions for adding vertexes/faces:
Code:
MeshBase& addVtx (C Vec &pos ); // add empty vertex at 'pos' position
MeshBase& addEdge(C VecI2 &ind ); // add edge by giving vertex indexes
MeshBase& addTri (C VecI &ind ); // add triangle by giving vertex indexes
MeshBase& addQuad(C VecI4 &ind ); // add quad by giving vertex indexes
when you add a new element, it will always be at the last position (last index).
|
|
12-26-2017 11:07 PM |
|
ronghester
Member
|
RE: Extrude?
Yeah, I figured I had to do it different way. There is no inbuilt method in Esenthel for extruding. its natural btw even unity does not have a method to extrude.
|
|
12-29-2017 07:03 PM |
|