public override void RemoveContactEntity(idEntity entity) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } }
public idClipModel(idClipModel model) { _id = model.ID; _owner = model.Owner; _enabled = model.Enabled; _entity = model.Entity; _origin = model.Origin; _axis = model.Axis; _bounds = model.Bounds; _absBounds = model.AbsoluteBounds; _material = model.Material; _contents = model.Contents; _collisionModelHandle = model.CollisionModelHandle; _traceModelCache = null; if (model.TraceModelCache != null) { idConsole.Warning("TODO: LoadModel( *GetCachedTraceModel( model->traceModelIndex ) );"); } _renderModelHandle = model.RenderModelHandle; _touchCount = -1; }
public override void AddContactEntity(idEntity entity) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } bool found = false; for (int i = 0; i < _contactEntities.Count; i++) { idEntity ent = _contactEntities[i]; if (ent == null) { _contactEntities.RemoveAt(i--); } if (ent == entity) { found = true; } } if (found == false) { _contactEntities.Add(entity); } }
public override void SetMaster(idEntity master, bool orientated = true) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } }
public void Link(idClip clip, idEntity entity, int newID, Vector3 newOrigin, Matrix newAxis, int renderModelHandle) { if (this.Disposed == true) { throw new ObjectDisposedException("idClipModel"); } _entity = entity; _id = newID; _origin = newOrigin; _axis = newAxis; if (_renderModelHandle != -1) { _renderModelHandle = renderModelHandle; RenderEntityComponent renderEntity = idR.Game.RenderWorld.GetRenderEntity(renderModelHandle); if (renderEntity != null) { _bounds = renderEntity.Bounds; } } Link(clip); }
public override void AddForce(idEntity entity, int id, Vector3 point, Vector3 force) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idAFEntity.AddForce"); }
public override void Damage(idEntity inflictor, idEntity attacker, Microsoft.Xna.Framework.Vector3 direction, string damageDefName, float damageScale, int location) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idAFEntity_Gibbable.Damage"); }
public override void Damage(idEntity inflictor, idEntity attacker, Vector3 direction, string damageDefName, float damageScale, int location) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idActor.Damage"); }
public override void Teleport(Vector3 origin, idAngles angles, idEntity destination) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idActor.Teleport"); }
public override void SetMaster(idEntity master, bool orientated = true) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idPhysics_Player.SetMaster"); }
public override object GetImpactInfo(idEntity entity, int id, Vector3 point) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idAFEntity.GetImpactInfo"); return(null); }
public override bool Pain(idEntity inflictor, idEntity attacker, int damage, Vector3 direction, int location) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idActor.Pain"); return(false); }
/// <summary> /// Add contact entity links to contact entities. /// </summary> protected void AddContactEntitiesForContacts() { int count = _contacts.Count; for (int i = 0; i < count; i++) { idEntity ent = idR.Game.Entities[_contacts[i].EntityIndex]; if ((ent != null) && (ent != this.Self)) { ent.AddContactEntity(this.Self); } } }
/// <summary> /// Active all contact entities. /// </summary> protected void ActivateContactEntities() { for (int i = 0; i < _contactEntities.Count; i++) { idEntity ent = _contactEntities[i]; if (ent != null) { ent.ActivatePhysics(this.Self); } else { _contactEntities.RemoveAt(i--); } } }
public idAnimator(idEntity entity) { _entity = entity; _lastTransformTime = -1; idConsole.Warning("TODO: ClearAFPose();"); for (int i = (int)AnimationChannel.All; i < (int)AnimationChannel.Count; i++) { for (int j = 0; j < idR.AnimationCountPerChannel; j++) { _channels[i, j] = new idAnimBlend(); _channels[i, j].Reset(null); } } }
public idAnimator(idEntity entity) { _entity = entity; _lastTransformTime = -1; idConsole.Warning("TODO: ClearAFPose();"); for(int i = (int) AnimationChannel.All; i < (int) AnimationChannel.Count; i++) { for(int j = 0; j < idR.AnimationCountPerChannel; j++) { _channels[i, j] = new idAnimBlend(); _channels[i, j].Reset(null); } } }
public override void ClearContacts() { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } int count = _contacts.Count; for (int i = 0; i < count; i++) { idEntity ent = idR.Game.Entities[_contacts[i].EntityIndex]; if (ent != null) { ent.RemoveContactEntity(_self); } } _contacts.Clear(); }
public override void RemoveContactEntity(idEntity entity) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } for (int i = 0; i < _contactEntities.Count; i++) { idEntity ent = _contactEntities[i]; if (ent == null) { _contactEntities.RemoveAt(i--); } else if (ent == entity) { _contactEntities.RemoveAt(i--); return; } } }
public override void SetMaster(idEntity master, bool orientated = true) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } Vector3 masterOrigin; Matrix masterAxis; if (master != null) { if (_hasMaster == false) { // transform from world space to master space _self.GetMasterPosition(out masterOrigin, out masterAxis); _localOrigin = Vector3.Transform(_origin - masterOrigin, Matrix.Transpose(masterAxis)); if (orientated == true) { _localAxis = _axis * Matrix.Transpose(masterAxis); } else { _localAxis = _axis; } _hasMaster = true; _isOrientated = orientated; } } else { if (_hasMaster == true) { _hasMaster = false; } } }
public override void SetMaster(idEntity master, bool orientated = true) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idPhysics_Player.SetMaster"); }
public idClipModel(idClipModel model) { _id = model.ID; _owner = model.Owner; _enabled = model.Enabled; _entity = model.Entity; _origin = model.Origin; _axis = model.Axis; _bounds = model.Bounds; _absBounds = model.AbsoluteBounds; _material = model.Material; _contents = model.Contents; _collisionModelHandle = model.CollisionModelHandle; _traceModelCache = null; if(model.TraceModelCache != null) { idConsole.Warning("TODO: LoadModel( *GetCachedTraceModel( model->traceModelIndex ) );"); } _renderModelHandle = model.RenderModelHandle; _touchCount = -1; }
/// <summary> /// /// </summary> /// <remarks> /// an ent will be excluded from testing if: /// cm->entity == passEntity (don't clip against the pass entity) /// cm->entity == passOwner (missiles don't clip with owner) /// cm->owner == passEntity (don't interact with your own missiles) /// cm->owner == passOwner (don't interact with other missiles from same owner) /// </remarks> /// <param name="bounds"></param> /// <param name="contentMask"></param> /// <param name="passEntity"></param> /// <returns></returns> private idClipModel[] GetTraceClipModels(idBounds bounds, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.GetTraceClipModels"); // TODO /*int i, num; idClipModel *cm; idEntity *passOwner; num = ClipModelsTouchingBounds( bounds, contentMask, clipModelList, MAX_GENTITIES ); if ( !passEntity ) { return num; } if ( passEntity->GetPhysics()->GetNumClipModels() > 0 ) { passOwner = passEntity->GetPhysics()->GetClipModel()->GetOwner(); } else { passOwner = NULL; } for ( i = 0; i < num; i++ ) { cm = clipModelList[i]; // check if we should ignore this entity if ( cm->entity == passEntity ) { clipModelList[i] = NULL; // don't clip against the pass entity } else if ( cm->entity == passOwner ) { clipModelList[i] = NULL; // missiles don't clip with their owner } else if ( cm->owner ) { if ( cm->owner == passEntity ) { clipModelList[i] = NULL; // don't clip against own missiles } else if ( cm->owner == passOwner ) { clipModelList[i] = NULL; // don't clip against other missiles from same owner } } } return num;*/ return null; }
public override void SetMaster(idEntity master, bool orientated = true) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } Vector3 masterOrigin; Matrix masterAxis; if(master != null) { if(_hasMaster == false) { // transform from world space to master space _self.GetMasterPosition(out masterOrigin, out masterAxis); _localOrigin = Vector3.Transform(_origin - masterOrigin, Matrix.Transpose(masterAxis)); if(orientated == true) { _localAxis = _axis * Matrix.Transpose(masterAxis); } else { _localAxis = _axis; } _hasMaster = true; _isOrientated = orientated; } } else { if(_hasMaster == true) { _hasMaster = false; } } }
public bool Rotation(out TraceResult result, Vector3 start, idRotation rotation, idClipModel model, Matrix traceModelAxis, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.Rotation"); /*idTraceModel traceModel = TraceModelForClipModel(model); * idBounds traceBounds = new idBounds(); * TraceResult traceResult; * * if((passEntity == null) || (passEntity.Index != idR.EntityIndexWorld)) * { * // test world * _rotationCount++; * * // TODO: NEED ENGINE SOURCE idR.CollisionModelManager.Rotation(out result, start, rotation, traceModel, traceModelAxis, contentMask, 0, Vector3.Zero, Matrix.Identity); * result.ContactInformation.EntityIndex = (result.Fraction != 1.0f) ? idR.EntityIndexWorld : idR.EntityIndexNone; * * if(result.Fraction == 0.0f) * { * return true; // blocked immediately by the world * } * } * else * { * result = new TraceResult(); * result.Fraction = 1.0f; * result.EndPosition = start; * result.EndAxis = traceModelAxis * rotation.ToMatrix(); * } * * if(traceModel == null) * { * traceBounds = idBounds.FromPointRotation(start, rotation); * } * else * { * traceBounds = idBounds.FromBoundsRotation(traceModel.Bounds, start, traceModelAxis, rotation); * } * * idClipModel[] clipModelList = GetTraceClipModels(traceBounds, contentMask, passEntity); * * foreach(idClipModel touch in clipModelList) * { * if(touch == null) * { * continue; * } * * if(touch.RenderModelHandle != -1) * { * continue; * } * * _rotationCount++; * // TODO: traceResult = idR.CollisionModelManager.Rotation(start, rotation, traceModel, traceModelAxis, contentMask, touch.Handle, touch.Origin, touch.Axis); * * if(traceResult.Fraction < result.Fraction) * { * result = traceResult; * result.ContactInformation.EntityIndex = touch.Entity.Index; * result.ContactInformation.ID = touch.ID; * * if(result.Fraction == 0.0f) * { * break; * } * } * } * * return (result.Fraction < 1.0f);*/ result = new TraceResult(); return(false); }
public bool Translation(out TraceResult result, Vector3 start, Vector3 end, idClipModel model, Matrix traceModelAxis, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.Translation"); // TODO /*if(TestHugeTranslation(result, model, start, end, traceModelAxis) == true) * { * return true; * }*/ // TODO /*idTraceModel traceModel = TraceModelForClipModel(model); * idBounds traceBounds = new idBounds(); * TraceResult traceResult; * float radius = 0; * * if((passEntity == null) || (passEntity.Index != idR.EntityIndexWorld)) * { * // test world * _translationCount++; * * // TODO: idR.CollisionModelManager.Translation(out result, start, end, traceModel, traceModelAxis, contentMask, 0, Vector3.Zero, Matrix.Identity); * result.ContactInformation.EntityIndex = (result.Fraction != 1.0f) ? idR.EntityIndexWorld : idR.EntityIndexNone; * * if(result.Fraction == 0.0f) * { * return true; // blocked immediately by the world * } * } * else * { * result = new TraceResult(); * result.Fraction = 1.0f; * result.EndPosition = end; * result.EndAxis = traceModelAxis; * } * * if(traceModel == null) * { * traceBounds = idBounds.FromPointTranslation(start, result.EndPosition - start); * radius = 0.0f; * } * else * { * traceBounds = idBounds.FromBoundsTranslation(traceModel.Bounds, start, traceModelAxis, result.EndPosition - start); * radius = traceModel.Bounds.GetRadius(); * } * * idClipModel[] clipModelList = GetTraceClipModels(traceBounds, contentMask, passEntity); * * foreach(idClipModel touch in clipModelList) * { * if(touch == null) * { * continue; * } * * if(touch.RenderModelHandle != -1) * { * _renderModelTraceCount++; * traceResult = TraceRenderModel(start, end, radius, traceModelAxis, touch); * } * else * { * _translationCount++; * // TODO: traceResult = idR.CollisionModelManager.Translation(start, end, traceModel, traceModelAxis, contentMask, touch.Handle, touch.Origin, touch.Axis); * } * * if(traceResult.Fraction < result.Fraction) * { * result = traceResult; * result.ContactInformation.EntityIndex = touch.Entity.Index; * result.ContactInformation.ID = touch.ID; * * if(result.Fraction == 0.0f) * { * break; * } * } * } * * return (result.Fraction < 1.0f);*/ result = new TraceResult(); return(false); }
public void Link(idClip clip, idEntity entity, int newID, Vector3 newOrigin, Matrix newAxis) { Link(clip, entity, newID, newOrigin, newAxis, -1); }
public override bool Pain(idEntity inflictor, idEntity attacker, int damage, Vector3 direction, int location) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idActor.Pain"); return false; }
public override void SetMaster(idEntity master, bool orientated = true) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } }
public override void RemoveContactEntity(idEntity entity) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } for(int i = 0; i < _contactEntities.Count; i++) { idEntity ent = _contactEntities[i]; if(ent == null) { _contactEntities.RemoveAt(i--); } else if(ent == entity) { _contactEntities.RemoveAt(i--); return; } } }
public override void AddContactEntity(idEntity entity) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } bool found = false; for(int i = 0; i < _contactEntities.Count; i++) { idEntity ent = _contactEntities[i]; if(ent == null) { _contactEntities.RemoveAt(i--); } if(ent == entity) { found = true; } } if(found == false) { _contactEntities.Add(entity); } }
public void Link(idClip clip, idEntity entity, int newID, Vector3 newOrigin, Matrix newAxis, int renderModelHandle) { if(this.Disposed == true) { throw new ObjectDisposedException("idClipModel"); } _entity = entity; _id = newID; _origin = newOrigin; _axis = newAxis; if(_renderModelHandle != -1) { _renderModelHandle = renderModelHandle; RenderEntityComponent renderEntity = idR.Game.RenderWorld.GetRenderEntity(renderModelHandle); if(renderEntity != null) { _bounds = renderEntity.Bounds; } } Link(clip); }
public override void Teleport(Vector3 origin, idAngles angles, idEntity destination) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idActor.Teleport"); }
public ContentFlags Contents(Vector3 start, idClipModel model, Matrix traceModelAxis, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.Contents"); ContentFlags contents = ContentFlags.None; idBounds traceModelBounds = new idBounds(); // TODO /*idTraceModel traceModel = TraceModelForClipModel(model); * * if((passEntity == null) || (passEntity.Index != idR.EntityIndexWorld)) * { * // test world * _contentCount++; * // TODO: NEED ENGINE SOURCE contents = idR.CollisionModelManager.Contents(start, traceModel, traceModelAxis, contentMask, 0, Vector3.Zero, Matrix.Identity); * } * else * { * contents = ContentFlags.None; * } * * if(traceModel == null) * { * traceModelBounds.Min = start; * traceModelBounds.Max = start; * } * else if(traceModelAxis != Matrix.Identity) * { * traceModelBounds = idBounds.FromTransformedBounds(traceModel.Bounds, start, traceModelAxis); * } * else * { * traceModelBounds.Min = traceModel.Bounds.Min + start; * traceModelBounds.Max = traceModel.Bounds.Max + start; * } * * idClipModel[] traceModelList = GetTraceClipModels(traceModelBounds, -1, passEntity); * * foreach(idClipModel touch in traceModelList) * { * if(touch == null) * { * continue; * } * * // no contents test with render models * if(touch.RenderModelHandle != -1) * { * continue; * } * * // if the entity does not have any contents we are looking for * if((touch.Contents & contentMask) == ContentFlags.None) * { * continue; * } * * // if the entity has no new contents flags * if((touch.Contents & contents) == touch.Contents) * { * continue; * } * * _contentCount++; * * // TODO * /*if(idR.CollisionModelManager.Contents(start, traceModel, traceModelAxis, contentMask, touch.Handle, touch.Origin, touch.Axis) > 0) * { * contents |= (touch.Contents & contentMask); * }*/ /*}*/ return(contents); }
public abstract void AddContactEntity(idEntity entity);
/// <summary> /// /// </summary> /// <remarks> /// an ent will be excluded from testing if: /// cm->entity == passEntity (don't clip against the pass entity) /// cm->entity == passOwner (missiles don't clip with owner) /// cm->owner == passEntity (don't interact with your own missiles) /// cm->owner == passOwner (don't interact with other missiles from same owner) /// </remarks> /// <param name="bounds"></param> /// <param name="contentMask"></param> /// <param name="passEntity"></param> /// <returns></returns> private idClipModel[] GetTraceClipModels(idBounds bounds, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.GetTraceClipModels"); // TODO /*int i, num; * idClipModel *cm; * idEntity *passOwner; * * num = ClipModelsTouchingBounds( bounds, contentMask, clipModelList, MAX_GENTITIES ); * * if ( !passEntity ) { * return num; * } * * if ( passEntity->GetPhysics()->GetNumClipModels() > 0 ) { * passOwner = passEntity->GetPhysics()->GetClipModel()->GetOwner(); * } else { * passOwner = NULL; * } * * for ( i = 0; i < num; i++ ) { * * cm = clipModelList[i]; * * // check if we should ignore this entity * if ( cm->entity == passEntity ) { * clipModelList[i] = NULL; // don't clip against the pass entity * } else if ( cm->entity == passOwner ) { * clipModelList[i] = NULL; // missiles don't clip with their owner * } else if ( cm->owner ) { * if ( cm->owner == passEntity ) { * clipModelList[i] = NULL; // don't clip against own missiles * } else if ( cm->owner == passOwner ) { * clipModelList[i] = NULL; // don't clip against other missiles from same owner * } * } * } * * return num;*/ return(null); }
public abstract void SetMaster(idEntity master, bool orientated = true);
public abstract void RemoveContactEntity(idEntity entity);
public override object GetImpactInfo(idEntity entity, int id, Vector3 point) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idAFEntity.GetImpactInfo"); return null; }
public bool Translation(out TraceResult result, Vector3 start, Vector3 end, idClipModel model, Matrix traceModelAxis, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.Translation"); // TODO /*if(TestHugeTranslation(result, model, start, end, traceModelAxis) == true) { return true; }*/ // TODO /*idTraceModel traceModel = TraceModelForClipModel(model); idBounds traceBounds = new idBounds(); TraceResult traceResult; float radius = 0; if((passEntity == null) || (passEntity.Index != idR.EntityIndexWorld)) { // test world _translationCount++; // TODO: idR.CollisionModelManager.Translation(out result, start, end, traceModel, traceModelAxis, contentMask, 0, Vector3.Zero, Matrix.Identity); result.ContactInformation.EntityIndex = (result.Fraction != 1.0f) ? idR.EntityIndexWorld : idR.EntityIndexNone; if(result.Fraction == 0.0f) { return true; // blocked immediately by the world } } else { result = new TraceResult(); result.Fraction = 1.0f; result.EndPosition = end; result.EndAxis = traceModelAxis; } if(traceModel == null) { traceBounds = idBounds.FromPointTranslation(start, result.EndPosition - start); radius = 0.0f; } else { traceBounds = idBounds.FromBoundsTranslation(traceModel.Bounds, start, traceModelAxis, result.EndPosition - start); radius = traceModel.Bounds.GetRadius(); } idClipModel[] clipModelList = GetTraceClipModels(traceBounds, contentMask, passEntity); foreach(idClipModel touch in clipModelList) { if(touch == null) { continue; } if(touch.RenderModelHandle != -1) { _renderModelTraceCount++; traceResult = TraceRenderModel(start, end, radius, traceModelAxis, touch); } else { _translationCount++; // TODO: traceResult = idR.CollisionModelManager.Translation(start, end, traceModel, traceModelAxis, contentMask, touch.Handle, touch.Origin, touch.Axis); } if(traceResult.Fraction < result.Fraction) { result = traceResult; result.ContactInformation.EntityIndex = touch.Entity.Index; result.ContactInformation.ID = touch.ID; if(result.Fraction == 0.0f) { break; } } } return (result.Fraction < 1.0f);*/ result = new TraceResult(); return false; }
public bool Rotation(out TraceResult result, Vector3 start, idRotation rotation, idClipModel model, Matrix traceModelAxis, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.Rotation"); /*idTraceModel traceModel = TraceModelForClipModel(model); idBounds traceBounds = new idBounds(); TraceResult traceResult; if((passEntity == null) || (passEntity.Index != idR.EntityIndexWorld)) { // test world _rotationCount++; // TODO: NEED ENGINE SOURCE idR.CollisionModelManager.Rotation(out result, start, rotation, traceModel, traceModelAxis, contentMask, 0, Vector3.Zero, Matrix.Identity); result.ContactInformation.EntityIndex = (result.Fraction != 1.0f) ? idR.EntityIndexWorld : idR.EntityIndexNone; if(result.Fraction == 0.0f) { return true; // blocked immediately by the world } } else { result = new TraceResult(); result.Fraction = 1.0f; result.EndPosition = start; result.EndAxis = traceModelAxis * rotation.ToMatrix(); } if(traceModel == null) { traceBounds = idBounds.FromPointRotation(start, rotation); } else { traceBounds = idBounds.FromBoundsRotation(traceModel.Bounds, start, traceModelAxis, rotation); } idClipModel[] clipModelList = GetTraceClipModels(traceBounds, contentMask, passEntity); foreach(idClipModel touch in clipModelList) { if(touch == null) { continue; } if(touch.RenderModelHandle != -1) { continue; } _rotationCount++; // TODO: traceResult = idR.CollisionModelManager.Rotation(start, rotation, traceModel, traceModelAxis, contentMask, touch.Handle, touch.Origin, touch.Axis); if(traceResult.Fraction < result.Fraction) { result = traceResult; result.ContactInformation.EntityIndex = touch.Entity.Index; result.ContactInformation.ID = touch.ID; if(result.Fraction == 0.0f) { break; } } } return (result.Fraction < 1.0f);*/ result = new TraceResult(); return false; }
public override void AddForce(idEntity entity, int id, Vector3 point, Vector3 force) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idAFEntity.AddForce"); }
public ContentFlags Contents(Vector3 start, idClipModel model, Matrix traceModelAxis, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.Contents"); ContentFlags contents = ContentFlags.None; idBounds traceModelBounds = new idBounds(); // TODO /*idTraceModel traceModel = TraceModelForClipModel(model); if((passEntity == null) || (passEntity.Index != idR.EntityIndexWorld)) { // test world _contentCount++; // TODO: NEED ENGINE SOURCE contents = idR.CollisionModelManager.Contents(start, traceModel, traceModelAxis, contentMask, 0, Vector3.Zero, Matrix.Identity); } else { contents = ContentFlags.None; } if(traceModel == null) { traceModelBounds.Min = start; traceModelBounds.Max = start; } else if(traceModelAxis != Matrix.Identity) { traceModelBounds = idBounds.FromTransformedBounds(traceModel.Bounds, start, traceModelAxis); } else { traceModelBounds.Min = traceModel.Bounds.Min + start; traceModelBounds.Max = traceModel.Bounds.Max + start; } idClipModel[] traceModelList = GetTraceClipModels(traceModelBounds, -1, passEntity); foreach(idClipModel touch in traceModelList) { if(touch == null) { continue; } // no contents test with render models if(touch.RenderModelHandle != -1) { continue; } // if the entity does not have any contents we are looking for if((touch.Contents & contentMask) == ContentFlags.None) { continue; } // if the entity has no new contents flags if((touch.Contents & contents) == touch.Contents) { continue; } _contentCount++; // TODO /*if(idR.CollisionModelManager.Contents(start, traceModel, traceModelAxis, contentMask, touch.Handle, touch.Origin, touch.Axis) > 0) { contents |= (touch.Contents & contentMask); }*/ /*}*/ return contents; }
public override void RemoveContactEntity(idEntity entity) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } }