Пример #1
0
 /// <summary>
 /// </summary>
 /// <param name="entry">
 /// </param>
 /// <param name="block">
 /// </param>
 public static void CreationFuncForMeshes(AbstractMesh entry, OctreeBlock <AbstractMesh> block)
 {
     if (entry.getBoundingInfo().boundingBox.intersectsMinMax(block.minPoint, block.maxPoint))
     {
         block.entries.Add(entry);
     }
 }
Пример #2
0
        /// <summary>
        /// </summary>
        /// <param name="materialIndex">
        /// </param>
        /// <param name="verticesStart">
        /// </param>
        /// <param name="verticesCount">
        /// </param>
        /// <param name="indexStart">
        /// </param>
        /// <param name="indexCount">
        /// </param>
        /// <param name="mesh">
        /// </param>
        /// <param name="renderingMesh">
        /// </param>
        /// <param name="createBoundingBox">
        /// </param>
        public SubMesh(
            int materialIndex,
            int verticesStart,
            int verticesCount,
            int indexStart,
            int indexCount,
            AbstractMesh mesh,
            Mesh renderingMesh     = null,
            bool createBoundingBox = true)
        {
            this.materialIndex = materialIndex;
            this.verticesStart = verticesStart;
            this.verticesCount = verticesCount;
            this.indexStart    = indexStart;
            this.indexCount    = indexCount;

            this._mesh          = mesh;
            this._renderingMesh = renderingMesh ?? (Mesh)mesh;
            mesh.subMeshes.Add(this);
            this._id = mesh.subMeshes.Length - 1;
            if (createBoundingBox)
            {
                this.refreshBoundingInfo();
            }
        }
Пример #3
0
        /// <summary>
        /// </summary>
        /// <param name="newMesh">
        /// </param>
        /// <param name="newRenderingMesh">
        /// </param>
        /// <returns>
        /// </returns>
        public virtual SubMesh clone(AbstractMesh newMesh, Mesh newRenderingMesh = null)
        {
            var result = new SubMesh(
                this.materialIndex, this.verticesStart, this.verticesCount, this.indexStart, this.indexCount, newMesh, newRenderingMesh, false);

            result._boundingInfo = new BoundingInfo(this._boundingInfo.minimum, this._boundingInfo.maximum);
            return(result);
        }
 public async ValueTask addCPUSkinningFallback(decimal rank, AbstractMesh mesh)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "addCPUSkinningFallback" }, rank, mesh
     }
         );
 }
Пример #5
0
 public async ValueTask <bool> canAffectMesh(AbstractMesh mesh)
 {
     return(await EventHorizonBlazorInterop.Func <bool>(
                new object[]
     {
         new string[] { this.___guid, "canAffectMesh" }, mesh
     }
                ));
 }
Пример #6
0
 public ValueTask set_meshMap(AbstractMesh value)
 {
     __meshMap = null;
     return(EventHorizonBlazorInterop.Set(
                this.___guid,
                "meshMap",
                value
                ));
 }
Пример #7
0
 public async ValueTask forceCompilation(AbstractMesh mesh, ActionCallback <Material> onCompiled = null, IMaterialCompilationOptions options = null, ActionCallback <string> onError = null)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "forceCompilation" }, mesh, onCompiled, options, onError
     }
         );
 }
 public async ValueTask start(AbstractMesh emitter = null)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "start" }, emitter
     }
         );
 }
Пример #9
0
 public ValueTask set_originMesh(AbstractMesh value)
 {
     __originMesh = null;
     return(EventHorizonBlazorInterop.Set(
                this.___guid,
                "originMesh",
                value
                ));
 }
Пример #10
0
 public async ValueTask setTarget(AbstractMesh target, System.Nullable <bool> toBoundingCenter = null, System.Nullable <bool> allowSamePosition = null)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "setTarget" }, target, toBoundingCenter, allowSamePosition
     }
         );
 }
 public bool needAlphaBlendingForMesh(AbstractMesh mesh)
 {
     return(EventHorizonBlazorInterop.Func <bool>(
                new object[]
     {
         new string[] { this.___guid, "needAlphaBlendingForMesh" }, mesh
     }
                ));
 }
Пример #12
0
 public async ValueTask prepareDefines(AbstractMesh mesh, NodeMaterial nodeMaterial, NodeMaterialDefines defines)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "prepareDefines" }, mesh, nodeMaterial, defines
     }
         );
 }
Пример #13
0
 public void getPositionToRef(AbstractMesh mesh, Vector3 result, System.Nullable <int> space = null)
 {
     EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "getPositionToRef" }, space, mesh, result
     }
         );
 }
Пример #14
0
 public void translate(Vector3 vec, System.Nullable <int> space = null, AbstractMesh mesh = null)
 {
     EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "translate" }, vec, space, mesh
     }
         );
 }
Пример #15
0
 public void initializeDefines(AbstractMesh mesh, NodeMaterial nodeMaterial, NodeMaterialDefines defines, System.Nullable <bool> useInstances = null)
 {
     EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "initializeDefines" }, mesh, nodeMaterial, defines, useInstances
     }
         );
 }
Пример #16
0
 public async ValueTask getRotationMatrixToRef(AbstractMesh mesh, Matrix result, System.Nullable <int> space = null)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "getRotationMatrixToRef" }, space, mesh, result
     }
         );
 }
 public bool isReady(AbstractMesh mesh = null, System.Nullable <bool> useInstances = null)
 {
     return(EventHorizonBlazorInterop.Func <bool>(
                new object[]
     {
         new string[] { this.___guid, "isReady" }, mesh, useInstances
     }
                ));
 }
Пример #18
0
 public async ValueTask provideFallbacks(AbstractMesh mesh, EffectFallbacks fallbacks)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "provideFallbacks" }, mesh, fallbacks
     }
         );
 }
 public decimal[] getTransformMatrices(AbstractMesh mesh)
 {
     return(EventHorizonBlazorInterop.FuncArray <decimal>(
                new object[]
     {
         new string[] { this.___guid, "getTransformMatrices" }, mesh
     }
                ));
 }
Пример #20
0
 public async ValueTask prepareDefines(AbstractMesh mesh, NodeMaterial nodeMaterial, NodeMaterialDefines defines, System.Nullable <bool> useInstances = null, SubMesh subMesh = null)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "prepareDefines" }, mesh, nodeMaterial, defines, useInstances, subMesh
     }
         );
 }
 public async ValueTask zoomOnMeshHierarchy(AbstractMesh mesh, System.Nullable <bool> focusOnOriginXZ = null, ActionCallback onAnimationEnd = null)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "zoomOnMeshHierarchy" }, mesh, focusOnOriginXZ, onAnimationEnd
     }
         );
 }
Пример #22
0
 public async ValueTask <bool> isReady(AbstractMesh mesh, NodeMaterial nodeMaterial, NodeMaterialDefines defines, System.Nullable <bool> useInstances = null)
 {
     return(await EventHorizonBlazorInterop.Func <bool>(
                new object[]
     {
         new string[] { this.___guid, "isReady" }, mesh, nodeMaterial, defines, useInstances
     }
                ));
 }
Пример #23
0
 public async ValueTask <bool> isReadyForSubMesh(AbstractMesh mesh, SubMesh subMesh, System.Nullable <bool> useInstances = null)
 {
     return(await EventHorizonBlazorInterop.Func <bool>(
                new object[]
     {
         new string[] { this.___guid, "isReadyForSubMesh" }, mesh, subMesh, useInstances
     }
                ));
 }
Пример #24
0
        /// <summary>
        /// </summary>
        /// <param name="mesh">
        /// </param>
        /// <param name="precise">
        /// </param>
        /// <returns>
        /// </returns>
        public virtual bool intersectsMesh(AbstractMesh mesh, bool precise = false)
        {
            if (this._boundingInfo == null || mesh._boundingInfo == null)
            {
                return(false);
            }

            return(this._boundingInfo.intersects(mesh._boundingInfo, precise));
        }
Пример #25
0
 public async ValueTask forceCompilationAsync(AbstractMesh mesh, IMaterialCompilationOptions options = null)
 {
     await EventHorizonBlazorInterop.Task <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "forceCompilationAsync" }, mesh, options
     }
         );
 }
Пример #26
0
 public async ValueTask setAbsolutePosition(Vector3 position, AbstractMesh mesh = null)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "setAbsolutePosition" }, position, mesh
     }
         );
 }
Пример #27
0
 public async ValueTask getAbsolutePositionToRef(AbstractMesh mesh, Vector3 result)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "getAbsolutePositionToRef" }, mesh, result
     }
         );
 }
Пример #28
0
 public async ValueTask getDirectionToRef(Vector3 localAxis, Vector3 result, AbstractMesh mesh = null)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "getDirectionToRef" }, localAxis, mesh, result
     }
         );
 }
 public static async ValueTask Parse(object parsedActions, AbstractMesh @object, Scene scene)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { "BABYLON", "ActionManager", "Parse" }, parsedActions, @object, scene
     }
         );
 }
Пример #30
0
 public void start(AbstractMesh emitter = null)
 {
     EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "start" }, emitter
     }
         );
 }