I’m figuring out how to create a ribbon path similar to this:
So I know I need to do a custom mesh.
As it’s my first time doing this I’m a bit lost even after reading the documentation.
Also I get the impression that there is some other mesh I could build upon to do this or at least use as reference.
So I looked at the Cylinder shape and there are a lot of variables I don’t understand in the updateGeometry (this is where everything happens right? ):
1. What are samples? There are axisSamples and radialSamples, how does this affect the shape?
2. What is the logic behind creating the normals like this [java] int vertCount = axisSamples * (radialSamples + 1) + (closed ? 2 : 0);
setBuffer(Type.Normal, 3, createVector3Buffer(getFloatBuffer(Type.Normal), vertCount));[/java]
3. Where are createVector3Buffer() and createVector2Buffer() methods declared? I can't find it in Mesh or Cylinder and don't understand what they do.
4. What is the math behind [java]int triCount = ((closed ? 2 : 0) + 2 * (axisSamples - 1)) * radialSamples;[/java]
I have more but I think is a lot already so I'll stop.