static NSString SemanticToToken(SCNGeometrySourceSemantics geometrySourceSemantic) { switch (geometrySourceSemantic) { case SCNGeometrySourceSemantics.Vertex: return(SCNGeometrySourceSemantic.Vertex); case SCNGeometrySourceSemantics.Normal: return(SCNGeometrySourceSemantic.Normal); case SCNGeometrySourceSemantics.Color: return(SCNGeometrySourceSemantic.Color); case SCNGeometrySourceSemantics.Texcoord: return(SCNGeometrySourceSemantic.Texcoord); case SCNGeometrySourceSemantics.VertexCrease: return(SCNGeometrySourceSemantic.VertexCrease); case SCNGeometrySourceSemantics.EdgeCrease: return(SCNGeometrySourceSemantic.EdgeCrease); case SCNGeometrySourceSemantics.BoneWeights: return(SCNGeometrySourceSemantic.BoneWeights); case SCNGeometrySourceSemantics.BoneIndices: return(SCNGeometrySourceSemantic.BoneIndices); default: throw new System.ArgumentException("geometrySourceSemantic"); } }
private bool isValidEnumForPlatform(SCNGeometrySourceSemantics value) { if (Asserts.IsAtLeastYosemite) { return(true); } switch (value) { case SCNGeometrySourceSemantics.Color: case SCNGeometrySourceSemantics.Normal: case SCNGeometrySourceSemantics.Texcoord: case SCNGeometrySourceSemantics.Vertex: return(true); case SCNGeometrySourceSemantics.BoneIndices: case SCNGeometrySourceSemantics.BoneWeights: case SCNGeometrySourceSemantics.EdgeCrease: case SCNGeometrySourceSemantics.VertexCrease: default: // this might need updating with 10.11 return(Asserts.IsAtLeastYosemite); } }
static NSString SemanticToToken(SCNGeometrySourceSemantics geometrySourceSemantic) { switch (geometrySourceSemantic) { case SCNGeometrySourceSemantics.Vertex: return SCNGeometrySourceSemantic.Vertex; case SCNGeometrySourceSemantics.Normal: return SCNGeometrySourceSemantic.Normal; case SCNGeometrySourceSemantics.Color: return SCNGeometrySourceSemantic.Color; case SCNGeometrySourceSemantics.Texcoord: return SCNGeometrySourceSemantic.Texcoord; case SCNGeometrySourceSemantics.VertexCrease: return SCNGeometrySourceSemantic.VertexCrease; case SCNGeometrySourceSemantics.EdgeCrease: return SCNGeometrySourceSemantic.EdgeCrease; case SCNGeometrySourceSemantics.BoneWeights: return SCNGeometrySourceSemantic.BoneWeights; case SCNGeometrySourceSemantics.BoneIndices: return SCNGeometrySourceSemantic.BoneIndices; default: throw new System.ArgumentException ("geometrySourceSemantic"); } }
public static SCNGeometrySource FromMetalBuffer(IMTLBuffer mtlBuffer, MTLVertexFormat vertexFormat, SCNGeometrySourceSemantics semantic, nint vertexCount, nint offset, nint stride) { return(FromMetalBuffer(mtlBuffer, vertexFormat, SemanticToToken(semantic), vertexCount, offset, stride)); }
public static SCNGeometrySource FromData(NSData data, SCNGeometrySourceSemantics semantic, nint vectorCount, bool floatComponents, nint componentsPerVector, nint bytesPerComponent, nint offset, nint stride) { return(FromData(data, SemanticToToken(semantic), vectorCount, floatComponents, componentsPerVector, bytesPerComponent, offset, stride)); }
public static SCNGeometrySource FromMetalBuffer(IMTLBuffer mtlBuffer, MTLVertexFormat vertexFormat, SCNGeometrySourceSemantics semantic, nint vertexCount, nint offset, nint stride) { return FromMetalBuffer (mtlBuffer, vertexFormat, SemanticToToken (semantic), vertexCount, offset, stride); }
public static SCNGeometrySource FromData(NSData data, SCNGeometrySourceSemantics semantic, nint vectorCount, bool floatComponents, nint componentsPerVector, nint bytesPerComponent, nint offset, nint stride) { return FromData (data, SemanticToToken (semantic), vectorCount, floatComponents, componentsPerVector, bytesPerComponent, offset, stride); }