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

Pyramid shape. More...

#include <Primitive.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

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

Public Attributes

ScalarType h {TScalar(1)}
 Height of the pyramid.
 

Detailed Description

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

Pyramid shape.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ Pyramid()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::Pyramid< TScalar >::Pyramid ( ScalarType h_)
inlineexplicit

Construct a new Pyramid object.

Parameters
h_Height of the pyramid

Member Function Documentation

◆ Eval()

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

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