예제 #1
0
        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.");
            }
        }
예제 #2
0
 public static MDLMesh CreateBox(Vector3 dimensions, Vector3i segments, MDLGeometryType geometryType, bool inwardNormals, IMDLMeshBufferAllocator allocator)
 {
     return(CreateBox(dimensions, segments, geometryType, inwardNormals, allocator, MDLMeshVectorType.Dimensions));
 }
예제 #3
0
 internal MDLMesh(Vector3 extent, Vector3i segments, bool inwardNormals, MDLGeometryType geometryType, IMDLMeshBufferAllocator allocator)
 {
     InitializeHandle(InitBox(extent, segments, inwardNormals, geometryType, allocator), "initBoxWithExtent:segments:inwardNormals:geometryType:allocator:");
 }