/** Delegated to by ParticleTechnique::_notifyAttached */ public void _notifyAttached(Mogre.Node parent, bool isTagPoint = false) { if (parent == null) { throw new ArgumentNullException("parent cannot be null!"); } ParticleRenderer__notifyAttached(nativePtr, (IntPtr)parent.NativePtr, isTagPoint); }
/// <summary> /// Create a sound that may be rendered in 3D space. /// </summary> /// <param name="package">Zip file to load sound from.</param> /// <param name="soundFile">Name of file to use.</param> /// <param name="node">Node to attach the 3D sound to.</param> /// <param name="name">Name of the 3D sound.</param> /// <param name="loop">Sets whether the sound should automatically loop.</param> public SoundEntity CreateSoundEntity(string package, string soundFile, Mogre.Node node, string name, bool loop) { _soundEntities.Add(new SoundEntity(package, soundFile, node, name, loop)); return(_soundEntities[_soundEntities.Count - 1]); }
/// <summary> /// Sets which node the SoundEntity is attached to. /// </summary> /// <param name="node"></param> public void SetNode(Mogre.Node node) { _node = node; }
internal SoundEntity(string package, string soundFile, Mogre.Node node, string name, bool loop) : base(package, soundFile, name, loop) { _node = node; SetReferenceDistance(80.0f); }
internal SoundEntity(string soundFile, Mogre.Node node, string name, bool loop, bool streaming) : base(soundFile, name, loop, streaming) { _node = node; SetReferenceDistance(80.0f); }
public PlayerController(Mogre.Node node, Mogre.Entity entity, float mass) { //init logic states for controler initLogicStates(); //force direction m_GoTo = Mogre.Quaternion.IDENTITY; //node to update m_PlayerNode = node; //Ball MogreNewt.ConvexCollision collision = new MogreNewt.CollisionPrimitives.Ellipsoid( Core.Singleton.NewtonWorld, new Mogre.Vector3(0.25f, 0.25f, 0.25f), new Mogre.Quaternion(new Mogre.Radian(1.57f), new Mogre.Vector3(0, 1, 0)), Core.Singleton.GetUniqueBodyId()); Mogre.Vector3 inertia, offset; collision.CalculateInertialMatrix(out inertia, out offset); inertia *= mass;//mass m_MainBody = new MogreNewt.Body(Core.Singleton.NewtonWorld, collision, true); m_MainBody.SetMassMatrix(mass, inertia); m_MainBody.AutoSleep = false; m_MainBody.LinearDamping = 1.0f; m_MainBody.Transformed += BodyTransformCallback; m_MainBody.ForceCallback += BodyForceCallback; m_MainBody.UserData = this; m_MainBody.Type = (int)PhysicsManager.BodyTypes.PLAYER; collision.Dispose(); m_MainBody.MaterialGroupID = Core.Singleton.PhysicsManager.getMaterialID("Player"); //Ball end m_Pose = m_myPoses["normal"]; ///Second helper body Mogre.Vector3 inertia2, offset2; m_Pose.m_collision.CalculateInertialMatrix(out inertia2, out offset2); inertia2 *= 1; m_SecondBody = new MogreNewt.Body(Core.Singleton.NewtonWorld, m_Pose.m_collision, true); m_SecondBody.SetMassMatrix(1, inertia2); m_SecondBody.AutoSleep = false; m_SecondBody.IsGravityEnabled = false; m_SecondBody.SetPositionOrientation(new Mogre.Vector3(0, 1f, 0), Mogre.Quaternion.IDENTITY); m_SecondBody.MaterialGroupID = Core.Singleton.PhysicsManager.getMaterialID("Player"); m_SecondBody.UserData = null; //set Y joint for second body MogreNewt.Joint upVector = new MogreNewt.BasicJoints.UpVector( Core.Singleton.NewtonWorld, m_SecondBody, Mogre.Vector3.UNIT_Y); //connections between player bodies! player_join = new MogreNewt.BasicJoints.BallAndSocket(Core.Singleton.NewtonWorld, m_MainBody, m_SecondBody, new Mogre.Vector3(0, 0, 0)); }