本文整理汇总了C#中NSMutableArray.ValueAt方法的典型用法代码示例。如果您正苦于以下问题:C# NSMutableArray.ValueAt方法的具体用法?C# NSMutableArray.ValueAt怎么用?C# NSMutableArray.ValueAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NSMutableArray
的用法示例。
在下文中一共展示了NSMutableArray.ValueAt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupSlide
public override void SetupSlide (PresentationViewController presentationViewController)
{
// Create a node to own the "sign" model, make it to be close to the camera, rotate by 90 degree because it's oriented with z as the up axis
var intermediateNode = SCNNode.Create ();
intermediateNode.Position = new SCNVector3 (0, 0, 7);
intermediateNode.Rotation = new SCNVector4 (1, 0, 0, -(float)(Math.PI / 2));
GroundNode.AddChildNode (intermediateNode);
// Load the "sign" model
var signNode = Utils.SCAddChildNode (intermediateNode, "sign", "Scenes/intersection/intersection", 30);
signNode.Position = new SCNVector3 (4, -2, 0.05f);
// Re-parent every node that holds a camera otherwise they would inherit the scale from the "sign" model.
// This is not a problem except that the scale affects the zRange of cameras and so it would be harder to get the transition from one camera to another right
var cameraNodes = new NSMutableArray ();
foreach (SCNNode child in signNode) {
if (child.Camera != null)
cameraNodes.Add (child);
}
for (nuint i = 0; i < cameraNodes.Count; i++) {
var cameraNode = new SCNNode (cameraNodes.ValueAt ((uint)i));
var previousWorldTransform = cameraNode.WorldTransform;
intermediateNode.AddChildNode (cameraNode); // re-parent
cameraNode.Transform = intermediateNode.ConvertTransformFromNode (previousWorldTransform, null);
cameraNode.Scale = new SCNVector3 (1, 1, 1);
}
}