b2dMeshCopyVertsX

Bulk-copies the mesh's current-pose vertex X coordinates into a Double array.

2D Overlay

Parameters & Returns

Parameters

handle Int
out Double[]

Returns

Void

Quick Summary

Bulk-copies the mesh's current-pose vertex X coordinates into a Double array.

Technical Exegesis...

Fills the supplied Double array with the X coordinate of every vertex in the mesh's CURRENT pose, in one call (out must be at least b2dMeshVertCount elements). The current pose is frame 0 for a static mesh, or the pose set by the last b2dMeshAnimate for an animated one. Pair with b2dMeshCopyVertsY / b2dMeshCopyVertsZ to pull the full positions, then project and draw yourself. Re-pull each frame when animating; for a static mesh, pull once.

Example

Example.bam
Global mvx:Double[4096]
Global mvy:Double[4096]
Global mvz:Double[4096]
b2dMeshAnimate(mesh, fa, fb, t)      ; set the pose (omit for static)
b2dMeshCopyVertsX(mesh, mvx)
b2dMeshCopyVertsY(mesh, mvy)
b2dMeshCopyVertsZ(mesh, mvz)