C# Class BEPUphysics.CollisionRuleManagement.CollisionRules

Stores how an object can interact with other objects through collisions.
Mostrar archivo Open project: Indiefreaks/igf Class Usage Examples

Public Properties

Property Type Description
CollisionGroupRules CollisionRule>.Dictionary
DefaultCollisionRule CollisionRule
DefaultDynamicCollisionGroup BEPUphysics.CollisionRuleManagement.CollisionGroup
DefaultKinematicCollisionGroup BEPUphysics.CollisionRuleManagement.CollisionGroup

Public Methods

Method Description
AddRule ( CollisionRules rulesA, ICollisionRulesOwner ownerB, CollisionRule rule ) : void

Adds an entry in rulesA's Specific relationships list about ownerB.

AddRule ( ICollisionRulesOwner ownerA, CollisionRules rulesB, CollisionRule rule ) : void

Adds an entry in rulesA's Specific relationships list about ownerB.

AddRule ( ICollisionRulesOwner ownerA, ICollisionRulesOwner ownerB, CollisionRule rule ) : void

Adds an entry in ownerA's Specific relationships list about ownerB.

CollisionRules ( ) : System

Constructs a new CollisionRules instance.

GetCollisionRule ( ICollisionRulesOwner ownerA, ICollisionRulesOwner ownerB ) : CollisionRule

Uses the CollisionRuleCalculator to get the collision rule between two collision rules owners.

GetCollisionRuleDefault ( ICollisionRulesOwner aOwner, ICollisionRulesOwner bOwner ) : CollisionRule

Determines what collision rule governs the interaction between the two objects.

GetGroupCollisionRuleDefault ( CollisionRules a, CollisionRules b ) : CollisionRule

Default implementation used to calculate collision rules due to the rulesets' collision groups.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

GetPersonalCollisionRuleDefault ( CollisionRules a, CollisionRules b ) : CollisionRule

Default implementation used to calculate collision rules due to the rulesets' personal rules.

GetSpecificCollisionRuleDefault ( CollisionRules a, CollisionRules b ) : CollisionRule

Default implementation used to calculate collision rules due to the rulesets' specific relationships.

RemoveRule ( CollisionRules rulesA, ICollisionRulesOwner ownerB ) : void

Tries to remove a relationship about ownerB from rulesA's Specific list.

RemoveRule ( ICollisionRulesOwner ownerA, CollisionRules rulesB ) : void

Tries to remove a relationship about rulesB from ownerA's Specific list.

RemoveRule ( ICollisionRulesOwner ownerA, ICollisionRulesOwner ownerB ) : void

Tries to remove a relationship about ownerB from ownerA's Specific list.

Protected Methods

Method Description
OnChanged ( ) : void

Method Details

AddRule() public static method

Adds an entry in rulesA's Specific relationships list about ownerB.
public static AddRule ( CollisionRules rulesA, ICollisionRulesOwner ownerB, CollisionRule rule ) : void
rulesA CollisionRules Collision rules that will gain an entry in its Specific relationships.
ownerB ICollisionRulesOwner Owner of the collision rules that will be added to ownerA's Specific relationships.
rule CollisionRule Rule assigned to the pair.
return void

AddRule() public static method

Adds an entry in rulesA's Specific relationships list about ownerB.
public static AddRule ( ICollisionRulesOwner ownerA, CollisionRules rulesB, CollisionRule rule ) : void
ownerA ICollisionRulesOwner Owner of the collision rules that will gain an entry in its Specific relationships.
rulesB CollisionRules Collision rules that will be added to ownerA's Specific relationships.
rule CollisionRule Rule assigned to the pair.
return void

AddRule() public static method

Adds an entry in ownerA's Specific relationships list about ownerB.
public static AddRule ( ICollisionRulesOwner ownerA, ICollisionRulesOwner ownerB, CollisionRule rule ) : void
ownerA ICollisionRulesOwner Owner of the collision rules that will gain an entry in its Specific relationships.
ownerB ICollisionRulesOwner Owner of the collision rules that will be added to ownerA's Specific relationships.
rule CollisionRule Rule assigned to the pair.
return void

CollisionRules() public method

Constructs a new CollisionRules instance.
public CollisionRules ( ) : System
return System

GetCollisionRule() public static method

Uses the CollisionRuleCalculator to get the collision rule between two collision rules owners.
public static GetCollisionRule ( ICollisionRulesOwner ownerA, ICollisionRulesOwner ownerB ) : CollisionRule
ownerA ICollisionRulesOwner First owner of the pair.
ownerB ICollisionRulesOwner Second owner of the pair.
return CollisionRule

GetCollisionRuleDefault() public static method

Determines what collision rule governs the interaction between the two objects.
public static GetCollisionRuleDefault ( ICollisionRulesOwner aOwner, ICollisionRulesOwner bOwner ) : CollisionRule
aOwner ICollisionRulesOwner First ruleset owner in the pair. This entity's space is used to determine the collision detection settings that contain special collision group interaction rules.
bOwner ICollisionRulesOwner Second ruleset owner in the pair.
return CollisionRule

GetGroupCollisionRuleDefault() public static method

Default implementation used to calculate collision rules due to the rulesets' collision groups.
public static GetGroupCollisionRuleDefault ( CollisionRules a, CollisionRules b ) : CollisionRule
a CollisionRules First ruleset in the pair.
b CollisionRules Second ruleset in the pair.
return CollisionRule

GetHashCode() public method

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
return int

GetPersonalCollisionRuleDefault() public static method

Default implementation used to calculate collision rules due to the rulesets' personal rules.
public static GetPersonalCollisionRuleDefault ( CollisionRules a, CollisionRules b ) : CollisionRule
a CollisionRules First ruleset in the pair.
b CollisionRules Second ruleset in the pair.
return CollisionRule

GetSpecificCollisionRuleDefault() public static method

Default implementation used to calculate collision rules due to the rulesets' specific relationships.
public static GetSpecificCollisionRuleDefault ( CollisionRules a, CollisionRules b ) : CollisionRule
a CollisionRules First ruleset in the pair.
b CollisionRules Second ruleset in the pair.
return CollisionRule

OnChanged() protected method

protected OnChanged ( ) : void
return void

RemoveRule() public static method

Tries to remove a relationship about ownerB from rulesA's Specific list.
public static RemoveRule ( CollisionRules rulesA, ICollisionRulesOwner ownerB ) : void
rulesA CollisionRules Collision rules that will lose an entry in its Specific relationships.
ownerB ICollisionRulesOwner Owner of the collision rules that will be removed from ownerA's Specific relationships.
return void

RemoveRule() public static method

Tries to remove a relationship about rulesB from ownerA's Specific list.
public static RemoveRule ( ICollisionRulesOwner ownerA, CollisionRules rulesB ) : void
ownerA ICollisionRulesOwner Owner of the collision rules that will lose an entry in its Specific relationships.
rulesB CollisionRules Collision rules that will be removed from ownerA's Specific relationships.
return void

RemoveRule() public static method

Tries to remove a relationship about ownerB from ownerA's Specific list.
public static RemoveRule ( ICollisionRulesOwner ownerA, ICollisionRulesOwner ownerB ) : void
ownerA ICollisionRulesOwner Owner of the collision rules that will lose an entry in its Specific relationships.
ownerB ICollisionRulesOwner Owner of the collision rules that will be removed from ownerA's Specific relationships.
return void

Property Details

CollisionGroupRules public_oe static_oe property

Defines any special collision rules between collision groups.
public static Dictionary CollisionGroupRules
return CollisionRule>.Dictionary

DefaultCollisionRule public_oe static_oe property

If a CollisionRule calculation between two colliding objects results in no defined CollisionRule, this value will be used.
public static CollisionRule DefaultCollisionRule
return CollisionRule

DefaultDynamicCollisionGroup public_oe static_oe property

When a dynamic entity is created and added to a space without having a specific collision group set beforehand, it inherits this collision group. There are no special rules associated with this group by default; entities within this group have normal, full interaction with all other entities. Collision group interaction rules can be overriden by entity personal collision rules or entity-to-entity specific collision rules.
public static CollisionGroup,BEPUphysics.CollisionRuleManagement DefaultDynamicCollisionGroup
return BEPUphysics.CollisionRuleManagement.CollisionGroup

DefaultKinematicCollisionGroup public_oe static_oe property

When a kinematic entity is created and added to a space without having a specific collision group set beforehand, it inherits this collision group. Entities in this collision group will not create collision pairs with other entities of this collision group by default. All other interactions are normal. Collision group interaction rules can be overriden by entity personal collision rules or entity-to-entity specific collision rules. Non-entity collidable objects like static triangle meshes also use this collision group by default.
public static CollisionGroup,BEPUphysics.CollisionRuleManagement DefaultKinematicCollisionGroup
return BEPUphysics.CollisionRuleManagement.CollisionGroup