0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

how to get the information of the vertices from a Primitive in Away3D 4.1

Last updated at Posted at 2013-05-15
const geom     : PrimitiveBase   = new PlaneGeometry(100, 100, 10, 10),
      vertices : Vector.<Number> = ISubGeometry(geom.subGeometries[0]).vertexData;
       
for (var i : int = 0, l : int = vertices.length; i < l; )
{
    const 
        // position
        vx : Number = vertices[i++],
        vy : Number = vertices[i++],
        vz : Number = vertices[i++],
        // normals
        nx : Number = vertices[i++],
        ny : Number = vertices[i++],
        nz : Number = vertices[i++],
        // tangents
        tx : Number = vertices[i++],
        ty : Number = vertices[i++],
        tz : Number = vertices[i++],
        // primary uv
        pu : Number = vertices[i++],
        pv : Number = vertices[i++],
        // secondary uv 
        sv : Number = vertices[i++],
        sv : Number = vertices[i++];
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?