Type: |
Method |
Available as of: |
V1.0.0.0 |
Versions: |
Current version |
This chapter provides information on:
This function requires a combination of collision objects, collision groups or collision entities as inputs. As a result, it returns TRUE if the inputs are colliding and FALSE otherwise.
In case of a collision, additional information on the specific colliding objects are returned, depending on the input types.
Input |
Data type |
Description |
---|---|---|
i_ifQueryInterface1 |
A first object implementing IF_CollisionQueryInterface. This can be a collision object, a collision group or a collision entity. |
|
i_ifQueryInterface2 |
A second object implementing IF_CollisionQueryInterface. This can be a collision object, a collision group or a collision entity. |
Output |
Data type |
Description |
---|---|---|
q_xError |
BOOL |
The output is set to TRUE if an error has been detected during the execution. |
q_etResult |
POU-specific output on the diagnostic; q_xError = FALSE -> Status message; q_xError = TRUE -> Diagnostic message. |
|
q_sResultMsg |
String |
Event-triggered message that gives additional information on the diagnostic state. |
q_udiCollisionGroupIndex1 |
UDINT |
Index of the colliding group of i_ifQueryInterface1. This has a zero value if:
|
q_udiCollisionObjectIndex1 |
UDINT |
Index of the colliding object within the collision group of i_ifQueryInterface1.
This has a zero value if:
|
q_udiCollisionGroupIndex2 |
UDINT |
Index of the colliding group of i_ifQueryInterface2. This has a zero value if:
|
q_udiCollisionObjectIndex2 |
UDINT |
Index of the colliding object within the collision group of i_ifQueryInterface2.
This has a zero value if:
|
Data type |
Description |
BOOL |
The value is TRUE if the inputs are colliding, and FALSE otherwise. |
q_xError |
q_etResult |
Enumeration value |
Description |
---|---|---|---|
FALSE |
0 |
Success |
|
TRUE |
36 |
No collision groups enabled. |
|
TRUE |
11 |
The provided interface is invalid (null). |
|
TRUE |
34 |
The collision entity has not been updated. |
|
TRUE |
21 |
A collision group is not updated. |
|
TRUE |
16 |
The provided collision object type is invalid. |
|
TRUE |
12 |
The object is not configured. |
|
TRUE |
52 |
The provided collision query interface is referring to an invalid type. |
Enumeration name: |
NoCollisionGroupsEnabled |
Enumeration value: |
36 |
Description: |
No collision groups enabled. |
Issue |
Cause |
Solution |
---|---|---|
Not possible to make a collision query. |
i_ifQueryInterface1 refers to a collision entity. All the configured collision groups of that entity are disabled, meaning that the relative elements of raxEnableCollisionGroups are set to FALSE. |
Make sure to enable the groups of the entity that you want to query for collision. |
i_ifQueryInterface2 refers to a collision entity. All the configured collision groups of that entity are disabled, meaning that the relative elements of raxEnableCollisionGroups are set to FALSE. |
Make sure to enable the groups of the entity that you want to query for collision. |
Enumeration name: |
InterfaceInvalid |
Enumeration value: |
11 |
Description: |
The provided interface is invalid (null). |
Issue |
Cause |
Solution |
---|---|---|
Not possible to make a collision query. |
i_ifQueryInterface1 contains an invalid interface. |
Make sure that i_ifQueryInterface1 is not null. |
i_ifQueryInterface2 contains an invalid interface. |
Make sure that i_ifQueryInterface2 is not null. |
Enumeration name: |
CollisionEntityNotUpdated |
Enumeration value: |
34 |
Description: |
The collision entity has not been updated. |
Issue |
Cause |
Solution |
---|---|---|
Not possible to make a collision query. |
i_ifQueryInterface1 refers to a collision entity that is not updated, meaning that its property xUpdated = FALSE. |
Make sure that an entity is updated before providing it as input of this function. |
i_ifQueryInterface2 refers to a collision entity that is not updated, meaning that its property xUpdated = FALSE. |
Make sure that an entity is updated before providing it as input of this function. |
Enumeration name: |
CollisionGroupNotUpdated |
Enumeration value: |
21 |
Description: |
A collision group is not updated. |
Issue |
Cause |
Solution |
---|---|---|
Not possible to make a collision query. |
i_ifQueryInterface1 refers to a collision group that is not updated, meaning that its property xUpdated = FALSE. |
Make sure that a group is updated before providing it as input of this function. |
i_ifQueryInterface2 refers to a collision group that is not updated, meaning that its property xUpdated = FALSE. |
Make sure that a group is updated before providing it as input of this function. |
Enumeration name: |
CollisionObjectTypeInvalid |
Enumeration value: |
16 |
Description: |
The provided collision object type is invalid. |
Issue |
Cause |
Solution |
---|---|---|
Not possible to make a collision query. |
i_ifQueryInterface1 refers to a collision object with an invalid collision object type. |
Make sure that i_ifQueryInterface1 refers to a collision object with a valid collision object type. The valid types are:
|
i_ifQueryInterface2 refers to a collision object with an invalid collision object type. |
Make sure that i_ifQueryInterface2 refers to a collision object with a valid collision object type. The valid types are:
|
Enumeration name: |
CollisionObjectNotConfigured |
Enumeration value: |
12 |
Description: |
The object is not configured. |
Issue |
Cause |
Solution |
---|---|---|
Not possible to make a collision query. |
i_ifQueryInterface1 refers to a collision object that is not configured, meaning that its property xConfigured = FALSE. |
Make sure that an object is configured before providing it as input of this function. |
i_ifQueryInterface2 refers to a collision object that is not configured, meaning that its property xConfigured = FALSE |
Make sure that an object is configured before providing it as input of this function. |
Enumeration name: |
CollisionQueryInterfaceTypeInvalid |
Enumeration value: |
52 |
Description: |
The provided collision query interface is referring to an invalid type. |
Issue |
Cause |
Solution |
---|---|---|
Not possible to make a collision query. |
i_ifQueryInterface1 is referring to an invalid object type. |
Make sure that i_ifQueryInterface1 is referring to a collision object, group or entity. |
i_ifQueryInterface2 is referring to an invalid object type. |
Make sure that i_ifQueryInterface2 is referring to a collision object, group or entity |