FB_AABB - SetMinMaxVertices (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

This chapter provides information on:

Task

Sets the minimum and maximum vertices.

Description

This method is used to initialize an AABB object by setting its minimum and maximum vertices; the full list of vertices, the center and the half extents of the AABB are evaluated accordingly.

The following figure is a representation of an Axis-Aligned Bounding Box (AABB):

Interface

The function block implements the interface IF_AABB.

Access: PUBLIC

Input

Data type

Description

i_stMinVertex

SE_Math.ST_Vector3D

The minimum vertex among the vertices of the AABB object.

i_stMaxVertex

SE_Math.ST_Vector3D

The maximum vertex among the vertices of the AABB object.

Output

Data type

Description

q_xError

BOOL

The output is set to TRUE if an error has been detected during the execution.

q_etResult

ET_Result

POU-specific output on the diagnostic; q_xError = FALSE -> Status message; q_xError = TRUE -> Diagnostic message.

q_sResultMsg

STRING(80)

Event-triggered message that gives additional information on the diagnostic state.

Diagnostic Messages

q_xError

q_etResult

Enumeration value

Description

FALSE

OK

0

Success

TRUE

MinMaxVerticesInvalid

4

The provided set of minimum/maximum values are invalid.

OK

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

MinMaxVerticesInvalid

Enumeration name:

MinMaxVerticesInvalid

Enumeration value:

4

Description:

The provided set of minimum/maximum values are invalid.

Issue

Cause

Solution

Could not set the minimum and maximum vertices.

One of the following conditions has been verified:

  • i_stMinVertex.lrX i_stMaxVertex.lrX

  • i_stMinVertex.lrY i_stMaxVertex.lrY

  • i_stMinVertex.lrZ i_stMaxVertex.lrZ

Make sure that:

  • i_stMinVertex.lrX < i_stMaxVertex.lrX

  • i_stMinVertex.lrY < i_stMaxVertex.lrY

  • i_stMinVertex.lrZ < i_stMaxVertex.lrZ