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

Octahedron shape. More...

#include <Primitive.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

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

Public Attributes

ScalarType s {TScalar(1)}
 Size of the octahedron.
 

Detailed Description

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

Octahedron shape.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ Octahedron()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::Octahedron< TScalar >::Octahedron ( ScalarType s_)
inlineexplicit

Construct a new Octahedron object.

Parameters
s_Size of the octahedron

Member Function Documentation

◆ Eval()

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

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