AGX Dynamics  2.37.3.2
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
 
const agxModel::VertexData & getVertex (size_t i) const
 There are three vertices in this triangle. More...
 
agx::Bool isBelowSurface () const
 
agx::Bool isCalculationsEnable () const
 
agx::Bool isClipped () const
 

Public Attributes

agx::Real area
 Area of this triangle. More...
 
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 60 of file WindAndWaterUtils.h.

Member Typedef Documentation

◆ Container

Member Enumeration Documentation

◆ State

Enumerator
BELOW_SURFACE 
ABOVE_SURFACE 
CLIPPED 
CALCULATIONS_ENABLE 

Definition at line 64 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)

◆ getVertex()

const VertexData & agxModel::TriangleData::getVertex ( size_t  i) const
inline

There are three vertices in this triangle.

Parameters
i- vertex index [0, 1, 2]
Returns
vertex data of index i

Definition at line 163 of file WindAndWaterUtils.h.

◆ isBelowSurface()

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

Definition at line 148 of file WindAndWaterUtils.h.

◆ isCalculationsEnable()

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

Definition at line 158 of file WindAndWaterUtils.h.

◆ isClipped()

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

Definition at line 153 of file WindAndWaterUtils.h.

Referenced by agxModel::triangleIterator().

Member Data Documentation

◆ area

agx::Real agxModel::TriangleData::area

Area of this triangle.

Definition at line 109 of file WindAndWaterUtils.h.

◆ state

agx::Int32 agxModel::TriangleData::state

Current state of this triangle.

Definition at line 110 of file WindAndWaterUtils.h.

◆ vertices

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

Vertices of this triangle.

Definition at line 106 of file WindAndWaterUtils.h.

◆ worldNormal

agx::Vec3 agxModel::TriangleData::worldNormal

Normal to this triangle given in world coordinate system.

Definition at line 108 of file WindAndWaterUtils.h.


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