public Vector3f[] GetVertexPositionInRange(int nObjectID, int nVertexIDStart, int nCount, bool bInWorld = true) { StoredCommands sc = new StoredCommands(); uint[] keys = new uint[nCount]; for (int k = 0; k < nCount; ++k) { keys[k] = sc.AppendSceneCommand_GetVertexPosition(nObjectID, nVertexIDStart + k); } ExecuteCommands(sc); Vector3f[] vPositions = new Vector3f[nCount]; for (int k = 0; k < nCount; ++k) { vec3f v = new vec3f(); bool bOK = sc.GetSceneCommandResult_GetVertexPosition(keys[k], v); vPositions[k] = (bOK) ? g3Extensions.ToVector3f(v) : Vector3f.Invalid; } if (bInWorld) { ToWorld(vPositions, nCount); } return(vPositions); }
public Vector3f GetVertexPosition(int nObjectID, int nVertexID) { StoredCommands sc = new StoredCommands(); uint key = sc.AppendSceneCommand_GetVertexPosition(nObjectID, nVertexID); ExecuteCommands(sc); vec3f v = new vec3f(); bool bOK = sc.GetSceneCommandResult_GetVertexPosition(key, v); return((bOK) ? g3Extensions.ToVector3f(v) : Vector3f.Invalid); }