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::BoxFrame< TScalar > Struct Template Reference

Box frame with half extents \( \text{he} \in \mathbb{R}^3 \) and thickness \( t \). More...

#include <Primitive.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 BoxFrame ()=default
 Default constructor.
 
 BoxFrame (Vec3< ScalarType > const &he_, ScalarType t_)
 Construct a new Box Frame object.
 
PBAT_HOST_DEVICE ScalarType Eval (Vec3< ScalarType > p) const
 Evaluate the signed distance function at a point.
 

Public Attributes

Vec3< ScalarTypehe
 Half extents of the box frame along each axis.
 
ScalarType t {TScalar(0.1)}
 Thickness of the box frame.
 

Detailed Description

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

Box frame with half extents \( \text{he} \in \mathbb{R}^3 \) and thickness \( t \).

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ BoxFrame()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::BoxFrame< TScalar >::BoxFrame ( Vec3< ScalarType > const & he_,
ScalarType t_ )
inlineexplicit

Construct a new Box Frame object.

Parameters
he_Half extents of the box frame along each axis
t_Thickness of the box frame

Member Function Documentation

◆ Eval()

template<common::CArithmetic TScalar>
PBAT_HOST_DEVICE ScalarType pbat::geometry::sdf::BoxFrame< 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 box frame (negative inside, positive outside)

Member Data Documentation

◆ he

template<common::CArithmetic TScalar>
Vec3<ScalarType> pbat::geometry::sdf::BoxFrame< TScalar >::he
Initial value:
{
TScalar(0.5),
TScalar(0.5),
TScalar(0.5)}

Half extents of the box frame along each axis.


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