internal MDLMesh(Vector3 extent, Vector2i segments, bool inwardNormals, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator, int?hemisphereSegments, bool?cap, bool?isCone) { if (hemisphereSegments.HasValue) { // initCapsule InitializeHandle(InitCapsule(extent, segments, hemisphereSegments.Value, inwardNormals, geometryType, allocator), "initCapsuleWithExtent:cylinderSegments:hemisphereSegments:inwardNormals:geometryType:allocator:"); } else if (cap.HasValue && isCone.HasValue) { // initHemisphere || initCone if (isCone.Value) { InitializeHandle(InitCone(extent, segments, inwardNormals, cap.Value, geometryType, allocator), "initConeWithExtent:segments:inwardNormals:cap:geometryType:allocator:"); } else { InitializeHandle(InitHemisphere(extent, segments, inwardNormals, cap.Value, geometryType, allocator), "initHemisphereWithExtent:segments:inwardNormals:cap:geometryType:allocator:"); } } else { // initSphere InitializeHandle(InitSphere(extent, segments, inwardNormals, geometryType, allocator), "initSphereWithExtent:segments:inwardNormals:geometryType:allocator:"); } }
public MDLNoiseTexture(float input, string name, Vector2i textureDimensions, MDLTextureChannelEncoding channelEncoding, MDLNoiseTextureType type) { // two different `init*` would share the same C# signature switch (type) { case MDLNoiseTextureType.Vector: Handle = InitVectorNoiseWithSmoothness(input, name, textureDimensions, channelEncoding); break; case MDLNoiseTextureType.Cellular: Handle = InitCellularNoiseWithFrequency(input, name, textureDimensions, channelEncoding); break; default: throw new ArgumentException("type"); } }
public MDLNoiseTexture(float input, string name, Vector2i textureDimensions, MDLTextureChannelEncoding channelEncoding) : this(input, name, textureDimensions, channelEncoding, MDLNoiseTextureType.Vector) { }
public NodeType GetNodeAt <NodeType> (Vector2i position) where NodeType : GKGridGraphNode { return(Runtime.GetNSObject <NodeType> (_GetNodeAt(position))); }
public virtual GKGridGraphNode GetNodeAt(Vector2i position) { return(GetNodeAt <GKGridGraphNode> (position)); }
internal MDLMesh(Vector3 extent, Vector2i segments, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator) { InitializeHandle(InitPlane(extent, segments, geometryType, allocator), "initPlaneWithExtent:segments:geometryType:allocator:"); }
internal MDLMesh(Vector3 extent, Vector2i segments, bool inwardNormals, bool topCap, bool bottomCap, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator) { InitializeHandle(InitCylinder(extent, segments, inwardNormals, topCap, bottomCap, geometryType, allocator), "initCylinderWithExtent:segments:inwardNormals:topCap:bottomCap:geometryType:allocator:"); }
public static MDLMesh CreatePlane(Vector3 extent, Vector2i segments, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator) { return(new MDLMesh(extent, segments, geometryType, allocator)); }
public static MDLMesh CreateCone(Vector3 dimensions, Vector2i segments, MDLGeometryType geometryType, bool inwardNormals, bool cap, IMDLMeshBufferAllocator allocator) { return(new MDLMesh(dimensions, segments, inwardNormals, geometryType, allocator, null, cap, true)); }
public static MDLMesh CreateCapsule(Vector3 dimensions, Vector2i segments, MDLGeometryType geometryType, bool inwardNormals, int hemisphereSegments, IMDLMeshBufferAllocator allocator) { return(new MDLMesh(dimensions, segments, inwardNormals, geometryType, allocator, hemisphereSegments, null, null)); }
public static MDLMesh CreateCylinder(Vector3 extent, Vector2i segments, bool inwardNormals, bool topCap, bool bottomCap, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator) { return(new MDLMesh(extent, segments, inwardNormals, topCap, bottomCap, geometryType, allocator)); }