AGX Dynamics  2.35.0.1
agxModel::TriangleData Struct Reference

Triangle data for a normal or a clipped triangle. More...

#include <WindAndWaterUtils.h>

+ Inheritance diagram for agxModel::TriangleData:

Public Types

typedef agx::VectorPOD< TriangleData > Container
 
enum  State { BELOW_SURFACE = 1 << 0 , ABOVE_SURFACE = 1 << 1 , CLIPPED = 1 << 2 , CALCULATIONS_ENABLE = 1 << 3 }
 

Public Member Functions

agx::Real calculateArea () const
 
agx::Vec3 calculateNormal () const
 
agx::Bool isBelowSurface () const
 
agx::Bool isCalculationsEnable () const
 
agx::Bool isClipped () const
 

Public Attributes

agx::Real area
 Area of this triangle. More...
 
agx::UInt pfrIndex
 
agx::Int32 state
 Current state of this triangle. More...
 
agxModel::VertexData vertices [3]
 Vertices of this triangle. More...
 
agx::Vec3 worldNormal
 Normal to this triangle given in world coordinate system. More...
 

Detailed Description

Triangle data for a normal or a clipped triangle.

Definition at line 54 of file WindAndWaterUtils.h.

Member Typedef Documentation

◆ Container

Member Enumeration Documentation

◆ State

Enumerator
BELOW_SURFACE 
ABOVE_SURFACE 
CLIPPED 
CALCULATIONS_ENABLE 

Definition at line 58 of file WindAndWaterUtils.h.

Member Function Documentation

◆ calculateArea()

agx::Real agxModel::TriangleData::calculateArea ( ) const
Returns
the calculated area of this triangle (note that the area is cached, this method is usually only used in debug purposes)

◆ calculateNormal()

agx::Vec3 agxModel::TriangleData::calculateNormal ( ) const
Returns
the calculated normal of this triangle (not that the normal is cached, this method is usually only used in debug purposes)

◆ isBelowSurface()

agx::Bool agxModel::TriangleData::isBelowSurface ( ) const
Returns
true if this triangle is below the surface

Definition at line 194 of file WindAndWaterUtils.h.

References BELOW_SURFACE, and state.

◆ isCalculationsEnable()

agx::Bool agxModel::TriangleData::isCalculationsEnable ( ) const
Returns
true if calculations should be done on this triangle

Definition at line 204 of file WindAndWaterUtils.h.

References CALCULATIONS_ENABLE, and state.

◆ isClipped()

agx::Bool agxModel::TriangleData::isClipped ( ) const
Returns
true if this is a clipped triangle

Definition at line 199 of file WindAndWaterUtils.h.

References CLIPPED, and state.

Referenced by agxModel::triangleIterator().

Member Data Documentation

◆ area

agx::Real agxModel::TriangleData::area

Area of this triangle.

Definition at line 93 of file WindAndWaterUtils.h.

◆ pfrIndex

agx::UInt agxModel::TriangleData::pfrIndex

Definition at line 95 of file WindAndWaterUtils.h.

◆ state

agx::Int32 agxModel::TriangleData::state

Current state of this triangle.

Definition at line 94 of file WindAndWaterUtils.h.

Referenced by isBelowSurface(), isCalculationsEnable(), and isClipped().

◆ vertices

agxModel::VertexData agxModel::TriangleData::vertices[3]

Vertices of this triangle.

Definition at line 91 of file WindAndWaterUtils.h.

◆ worldNormal

agx::Vec3 agxModel::TriangleData::worldNormal

Normal to this triangle given in world coordinate system.

Definition at line 92 of file WindAndWaterUtils.h.


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