Drag[en]gine Script Module DragonScript Script API  1.0
CollisionFilter Class Reference

Immutable collision filter. More...

Inheritance diagram for CollisionFilter:

Public Member Functions

Constructors
CollisionFilter new ()
 Create collision filter with empty category and full filter. More...
 
CollisionFilter new (LayerMask layerMask)
 Create collision filter with category and filter set to the same layer mask. More...
 
CollisionFilter new (LayerMask category, LayerMask filter)
 Create collision filter. More...
 
Management
LayerMask getCategory ()
 Category. More...
 
LayerMask getFilter ()
 Filter. More...
 
bool collides (CollisionFilter collisionFilter)
 Collision filters can collider. More...
 
bool collidesNot (CollisionFilter collisionFilter)
 Collision filters can not collide. More...
 
String toString ()
 Convert to string representation. More...
 
bool equals (Object other)
 Collision filter is equal to another object. More...
 
int hashCode ()
 Hash code for use as dictionary keys. More...
 

Detailed Description

Immutable collision filter.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ collides()

bool collides ( CollisionFilter  collisionFilter)

Collision filters can collider.

To collide the filter of one collision filter and the category of the other collision filter have to share at least one bit. This has to be true for both collision filters.

§ collidesNot()

bool collidesNot ( CollisionFilter  collisionFilter)

Collision filters can not collide.

To not collide the filter of one collision filter and the category of the other collision filter have to share no bits. This has to be true for both collision filters.

§ equals()

bool equals ( Object  other)

Collision filter is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type CollisionFilter and both have the same bits set in the filter and category.

§ getCategory()

LayerMask getCategory ( )

Category.

§ getFilter()

LayerMask getFilter ( )

Filter.

§ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ new() [1/3]

CollisionFilter new ( )

Create collision filter with empty category and full filter.

§ new() [2/3]

CollisionFilter new ( LayerMask  layerMask)

Create collision filter with category and filter set to the same layer mask.

§ new() [3/3]

CollisionFilter new ( LayerMask  category,
LayerMask  filter 
)

Create collision filter.

§ toString()

String toString ( )

Convert to string representation.


The documentation for this class was generated from the following file: