Ejemplo n.º 1
0
        public override void Bind()
        {
            //life.BindInt( "_CurrentStep" , () => currentStep );
            //life.BindFloat( "_PercentageDone" , () => percentageDone );

            life.BindMatrix("_Transform", () => transform.localToWorldMatrix);
            life.BindMatrix("_InverseTransform", () => transform.worldToLocalMatrix);

            //life.BindForm("_VertBuffer" , mesh.verts);
            //life.BindForm("_TriBuffer" , mesh.triangles);

            life.BindVector3("_Center", () => ((Form3D)form).center);
            life.BindVector3("_Dimensions", () => ((Form3D)form).dimensions);
            life.BindVector3("_Extents", () => ((Form3D)form).extents);

            marchingLife.BindPrimaryForm("_VolumeBuffer", form);
            marchingLife.BindForm("_VertBuffer", verts);

            marchingLife.BindVector3("_Center", () => ((Form3D)form).center);
            marchingLife.BindVector3("_Dimensions", () => ((Form3D)form).dimensions);
            marchingLife.BindVector3("_Extents", () => ((Form3D)form).extents);

            marchingLife.BindMatrix("_Transform", () => transform.localToWorldMatrix);

            marchingLife.BindTexture("Texture", () => ((Form3D)form)._texture);


            resetLife.BindPrimaryForm("_VolumeBuffer", form);
            marchingResetLife.BindPrimaryForm("_VertBuffer", verts);
            marchingResetLife.BindForm("_VolumeBuffer", form);
        }
Ejemplo n.º 2
0
        public override void Bind()
        {
            life.BindPrimaryForm("_ParticleBuffer", particles);
            life.BindForm("_VertBuffer", verts);

            life.BindVector3("_Velocity", () => this.velocity);

            life.BindForm("_TransformBuffer", transformBuffer);

            life.BindFloat("_CurlStrength", () => _CurlStrength);
            life.BindFloat("_CurlSize", () => _CurlSize);
            life.BindFloat("_CurlSpeed", () => _CurlSpeed);
            life.BindFloat("_ReturnStrength", () => _ReturnStrength);
            life.BindFloat("_Dampening", () => _Dampening);


            triLocation.BindPrimaryForm("_ParticleBuffer", particles);
            triLocation.BindForm("_VertBuffer", verts);

            resolve.BindPrimaryForm("_ParticleBuffer", particles);
            resolve.BindFloat("_ResolveReduceAmount", () => _ResolveReduceAmount);
        }
Ejemplo n.º 3
0
 public void BindCameraData(Life toBind)
 {
     toBind.BindVector3("_CameraForward", () => this.camera.forward);
     toBind.BindVector3("_CameraUp", () => this.camera.up);
     toBind.BindVector3("_CameraRight", () => this.camera.right);
 }