public static double[] GetLocalTransform(decimal[] scale, double heading, Vector3 relativeCenter) { double[] transform; var res = EnuCalculator.GetLocalEnuMapbox(heading); var m = GetMatrix(relativeCenter, res.East, res.North, res.Up); transform = Flatten(m, scale); return(transform); }
private static void CalculateArrays(List <Instance> instances, bool UseRtcCenter, bool UseScaleNonUniform, List <Vector3> positions, List <float> scales, List <Vector3> scalesNonUniform, List <Vector3> normalUps, List <Vector3> normalRights, List <JArray> tags, Point firstPosition) { foreach (var instance in instances) { var vec = GetPosition((Point)instance.Position, UseRtcCenter, firstPosition); positions.Add(vec); if (!UseScaleNonUniform) { scales.Add((float)instance.Scale); } else { scalesNonUniform.Add(new Vector3((float)instance.ScaleNonUniform[0], (float)instance.ScaleNonUniform[1], (float)instance.ScaleNonUniform[2])); } var(East, North, Up) = EnuCalculator.GetLocalEnuMapbox(instance.Rotation); normalUps.Add(Up); normalRights.Add(East); tags.Add(instance.Tags); } }