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 static MDLMesh CreateBox(Vector3 vector, Vector3i segments, MDLGeometryType geometryType, bool inwardNormals, IMDLMeshBufferAllocator allocator, MDLMeshVectorType type = MDLMeshVectorType.Dimensions) { switch (type) { case MDLMeshVectorType.Dimensions: return(NewBoxWithDimensions(vector, segments, geometryType, inwardNormals, allocator)); case MDLMeshVectorType.Extent: return(new MDLMesh(vector, segments, inwardNormals, geometryType, allocator)); default: throw new ArgumentException("The 'MDLMeshVectorType type' argument needs a value."); } }
public static MDLMesh CreateBox(Vector3 dimensions, Vector3i segments, MDLGeometryType geometryType, bool inwardNormals, IMDLMeshBufferAllocator allocator) { return(CreateBox(dimensions, segments, geometryType, inwardNormals, allocator, MDLMeshVectorType.Dimensions)); }
internal MDLMesh(Vector3 extent, bool inwardNormals, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator) { InitializeHandle(InitIcosahedron(extent, inwardNormals, geometryType, allocator), "initIcosahedronWithExtent:inwardNormals:geometryType:allocator:"); }
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:"); }
internal MDLMesh(Vector3 extent, Vector3i segments, bool inwardNormals, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator) { InitializeHandle(InitBox(extent, segments, inwardNormals, geometryType, allocator), "initBoxWithExtent:segments:inwardNormals:geometryType:allocator:"); }
public static MDLMesh CreateIcosahedron(Vector3 extent, bool inwardNormals, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator) { return(new MDLMesh(extent, inwardNormals, 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)); }