Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Core::Geometry::PointToTriangleOutput Struct Reference

Structure holding the result of a point-to triangle distance query. More...

#include <Core/Geometry/DistanceQueries.hpp>

+ Collaboration diagram for Ra::Core::Geometry::PointToTriangleOutput:

Public Types

enum  Flags { HIT_FACE = 0 , HIT_VERTEX = 1 , HIT_EDGE = 2 }
 Flags denoting the primitive where the closest point is. More...
 

Public Member Functions

Flags getHitPrimitive () const
 Return if the hit is a face, a vertex or an edge.
 
uint getHitIndex () const
 

Public Attributes

Vector3 meshPoint
 
Scalar distanceSquared
 the point hit on the mesh
 
uchar flags
 distance squared to the point
 

Detailed Description

Structure holding the result of a point-to triangle distance query.

Definition at line 35 of file DistanceQueries.hpp.

Member Enumeration Documentation

◆ Flags

Flags denoting the primitive where the closest point is.

Definition at line 37 of file DistanceQueries.hpp.

Constructor & Destructor Documentation

◆ PointToTriangleOutput()

Ra::Core::Geometry::PointToTriangleOutput::PointToTriangleOutput ( )
inline

Definition at line 39 of file DistanceQueries.hpp.

Member Function Documentation

◆ getHitIndex()

uint Ra::Core::Geometry::PointToTriangleOutput::getHitIndex ( ) const
inline

Return the index of the hit vertex or the first vertex of the hit edge. If hit is a face hit, returns 0

Definition at line 54 of file DistanceQueries.hpp.

◆ getHitPrimitive()

Flags Ra::Core::Geometry::PointToTriangleOutput::getHitPrimitive ( ) const
inline

Return if the hit is a face, a vertex or an edge.

Bits 0-1 : if the hit is a face (00) a vertex (01) or an edge (10) bits 2-3 : if vertex, index of the hit vertex if edge, index of the edge's first vertex

Definition at line 51 of file DistanceQueries.hpp.

Member Data Documentation

◆ distanceSquared

Scalar Ra::Core::Geometry::PointToTriangleOutput::distanceSquared

the point hit on the mesh

Definition at line 45 of file DistanceQueries.hpp.

◆ flags

uchar Ra::Core::Geometry::PointToTriangleOutput::flags

distance squared to the point

Definition at line 46 of file DistanceQueries.hpp.

◆ meshPoint

Vector3 Ra::Core::Geometry::PointToTriangleOutput::meshPoint

Definition at line 44 of file DistanceQueries.hpp.


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