PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
pbat::geometry::sdf::HexagonalPrism< TScalar > Struct Template Reference

Hexagonal prism shape. More...

#include <Primitive.h>

Inheritance diagram for pbat::geometry::sdf::HexagonalPrism< TScalar >:
pbat::geometry::sdf::Primitive

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 HexagonalPrism ()=default
 Default constructor.
 
 HexagonalPrism (Vec2< ScalarType > const &h_)
 Construct a new Hexagonal Prism object.
 
PBAT_HOST_DEVICE ScalarType Eval (Vec3< ScalarType > p) const
 Evaluate the signed distance function at a point.
 

Public Attributes

Vec2< ScalarTypeh
 h[0]: radius of the hexagon, h[1]: half height of the prism
 

Detailed Description

template<common::CArithmetic TScalar>
struct pbat::geometry::sdf::HexagonalPrism< TScalar >

Hexagonal prism shape.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ HexagonalPrism()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::HexagonalPrism< TScalar >::HexagonalPrism ( Vec2< ScalarType > const & h_)
inlineexplicit

Construct a new Hexagonal Prism object.

Parameters
h_h[0]: radius of the hexagon, h[1]: half height of the prism

Member Function Documentation

◆ Eval()

template<common::CArithmetic TScalar>
PBAT_HOST_DEVICE ScalarType pbat::geometry::sdf::HexagonalPrism< TScalar >::Eval ( Vec3< ScalarType > p) const
inline

Evaluate the signed distance function at a point.

Parameters
pPoint in 3D space
Returns
Signed distance to the hexagonal prism (negative inside, positive outside)

Member Data Documentation

◆ h

template<common::CArithmetic TScalar>
Vec2<ScalarType> pbat::geometry::sdf::HexagonalPrism< TScalar >::h
Initial value:
{
TScalar(1),
TScalar(1)}

h[0]: radius of the hexagon, h[1]: half height of the prism


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