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

A 3D rigid transform. More...

#include <Transform.h>

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 Transform ()=default
 Default constructor.
 
 Transform (Mat3< ScalarType > const &_R, Vec3< ScalarType > const &_t)
 Constructor with rotation matrix and translation vector.
 
PBAT_HOST_DEVICE Vec3< ScalarTypeoperator() (Vec3< ScalarType > const &p) const
 Apply the transform to a point (technically, a vector)
 
PBAT_HOST_DEVICE Vec3< ScalarTypeoperator/ (Vec3< ScalarType > const &p) const
 Apply the inverse transform to a point (technically, a vector)
 
void CleanRotation ()
 Clean the rotation matrix to ensure it is a valid rotation (orthogonal with determinant 1)
 

Static Public Member Functions

static Transform Identity ()
 Create an identity transform.
 

Public Attributes

Mat3< ScalarTypeR
 Rotation matrix.
 
Vec3< ScalarTypet
 Translation vector.
 

Detailed Description

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

A 3D rigid transform.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ Transform()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::Transform< TScalar >::Transform ( Mat3< ScalarType > const & _R,
Vec3< ScalarType > const & _t )
inline

Constructor with rotation matrix and translation vector.

Parameters
RRotation matrix
tTranslation vector

Member Function Documentation

◆ Identity()

template<common::CArithmetic TScalar>
static Transform pbat::geometry::sdf::Transform< TScalar >::Identity ( )
inlinestatic

Create an identity transform.

Returns
Identity transform

◆ operator()()

template<common::CArithmetic TScalar>
PBAT_HOST_DEVICE Vec3< ScalarType > pbat::geometry::sdf::Transform< TScalar >::operator() ( Vec3< ScalarType > const & p) const
inline

Apply the transform to a point (technically, a vector)

Parameters
pPoint to transform
Returns
Transformed point

◆ operator/()

template<common::CArithmetic TScalar>
PBAT_HOST_DEVICE Vec3< ScalarType > pbat::geometry::sdf::Transform< TScalar >::operator/ ( Vec3< ScalarType > const & p) const
inline

Apply the inverse transform to a point (technically, a vector)

Parameters
pPoint to inverse transform
Returns
Inverse transformed point

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