SuperDex Physics C++ API
Loading...
Searching...
No Matches
superdex Namespace Reference

Namespaces

namespace  colors
 Predefined color constants for common use cases.
namespace  materials
namespace  model_utils
namespace  prefab

Classes

class  Aabb
struct  ActiveAnisoArapMaterialParams
 Parameters for the Active Anisotropic ARAP material model. More...
struct  ActiveNeoHookeanMaterialParams
 Parameters for the Active Neo-Hookean composite material model. More...
struct  ActiveShapeTargetingArapMaterialParams
 Parameters for the Active Shape Targeting ARAP material model. More...
class  Actor
 Represents a simulated body (actor) in a scene. More...
struct  ActorHandle
 Unique identifier for an Actor within a Scene. More...
class  Allocator
 Virtual interface class for memory allocation and deallocation. More...
struct  ArapMaterialParams
 Parameters for the As-Rigid-As-Possible (ARAP) material model. More...
struct  Array
struct  Articulated3dRotationRangeConstraintParams
 Parameters for creating a range constraint on a 3D-rotation articulated joint. More...
struct  Articulated3dRotationTargetConstraintParams
 Parameters for creating a target constraint on 3D rotation DoFs of an articulated actor. More...
struct  ArticulatedActorParams
 Parameters to create an articulated actor. More...
struct  ArticulatedCycleJoint
 Defines a cycle-closing joint in an articulated body. More...
struct  ArticulatedCycleJointParams
 Parameters for a cycle-closing joint within an articulated actor. More...
struct  ArticulatedDofInfo
 Degree-of-freedom layout information for a single joint in an articulated body. More...
struct  ArticulatedJointFrictionParams
 Per-joint friction parameters for articulated bodies. More...
struct  ArticulatedJointParams
 Parameters describing a single joint within an articulated actor. More...
struct  ArticulatedLinkParams
 Parameters describing a single rigid link within an articulated actor. More...
struct  ArticulatedShapeInfo
 Information describing an articulated shape's kinematic structure. More...
struct  ArticulatedSingleDofRangeConstraintParams
 Parameters for creating a range constraint on a single articulated DoF. More...
struct  ArticulatedSingleDofTargetConstraintParams
 Parameters for creating a target constraint on a single articulated DoF. More...
struct  ArticulatedSkinParams
 Optional skinned mesh attached to an articulated actor for collision and rendering. More...
class  AsyncScene
 Manages a simulation scene that steps asynchronously using the SuperDex Physics worker pool. More...
struct  AsyncStepParams
 Parameters controlling the stepping behavior of an AsyncScene. More...
struct  BlendingData
 Blending data for one source shape within a soft skinned mesh. More...
struct  BlendingDataView
 A non-owning view of the data blending data for one source shape within a soft skinned mesh. More...
struct  BoundarySubsamplingParams
 Parameters for subsampling boundary integrals such as contact. More...
struct  Box
 Data for an implicit box within a model file. More...
struct  CallbackHandle
 Unique identifier for a callback registration within a Scene. More...
class  Constraint
 Represents a constraint that restricts the degrees of freedom of one or more actors. More...
struct  ConstraintHandle
 Unique identifier for a Constraint within a Scene. More...
struct  ConstraintParams
 Base constraint parameters. More...
struct  ContactParams
 Parameters for contact mechanics simulation. More...
struct  ContactPoint
 Information about a contact point between two actors. More...
class  Context
 Main entry point for SuperDex Physics simulation. More...
struct  CoordinateSpace
 Coordinate-axis convention and linear unit scale. More...
class  DebugDraw
 Manages debug visualization features for a scene. More...
struct  DebugDrawData
 Collection of debug draw primitives. More...
struct  DebugDrawLineVertices
 Line primitives for debug visualization. More...
struct  DebugDrawSpheres
 Sphere primitives for debug visualization. More...
class  DebugServer
 Server API to enable remote debugging and visualization. More...
class  DefaultAllocator
 Mochi's default implementation of the Allocator interface. More...
struct  DeformableNodePositionConstraintParams
 Parameters for creating a position constraint on a deformable actor node. More...
struct  DeformableNodeToDeformableNodeConstraintParams
 Parameters for creating a constraint coupling a node in a deformable actor to a node in another deformable actor. More...
struct  DeformableNodeToRigidConstraintParams
 Parameters for creating a constraint coupling a deformable node to a rigid actor. More...
class  DynamicArray
 A dynamically resizable array with syntax and behavior similar to std::pmr::vector. More...
class  Error
class  ErrorAssert
class  ErrorLog
struct  ExperimentalEvalParams
 [Experimental] Evaluation settings common to the full scene. More...
struct  GridSdfData
 Data for a pre-computed SDF grid. More...
struct  GridSdfDataView
 A non-owning view of precomputed grid-based signed-distance-field data. More...
struct  GridSdfParams
 Parameters controlling the resolution of grid-based Signed Distance Fields (SDF). More...
struct  Handle
 Generic 64-bit handle providing base functionality for strongly-typed handles. More...
struct  Int2Hash
struct  Int2Less
struct  Int3SortAndCompare
struct  Int3SortAndHash
struct  IsNdArray
struct  IsNdArray< NdArray< T, D0, DIMS... > >
struct  IsResizeNoInitSafe
 Trait to determine if a type is safe for use with DynamicArray::resize_noinit. More...
struct  JointRotationRangeConstraintParams
 Parameters for creating a joint rotation range constraint between two rigid actors. More...
struct  JointRotationTrackingConstraintParams
 Parameters for creating a joint rotation tracking constraint between two rigid actors. More...
struct  LinearElasticMaterialParams
 Parameters for the Linear Elastic (Hookean) material model. More...
struct  LinearSolverParams
 Parameters for the linear solve performed in each iteration of the non-linear solver. More...
class  MatrixTransformRT
struct  MeshData
 Mesh data for a Mochi actor or model file. More...
struct  MeshDataView
 A non-owning view of the mesh data for a Mochi actor or model file. More...
struct  ModelData
 The contents of a Mochi model file. More...
struct  ModelDataView
 A non-owning view of the contents of a Mochi model file. More...
class  NdArray
struct  NodeContactForce
 Contact force applied to a specific node. More...
struct  NonLinearSolverParams
 Parameters for the non-linear solver. More...
class  Obb
struct  PerElementSoftMaterialData
 Per-element material parameters for a soft body in struct-of-arrays format. More...
struct  PerElementSoftMaterialDataView
 Non-owning view of per-element material parameters for a soft body, in struct-of-arrays format. More...
struct  PerformanceStats
 Timing and profiling metrics from the last simulation step. More...
class  Plane
struct  PoseConstraintInfo
 Information about a single pose constraint in a pose controller. More...
struct  PoseControllerParams
 Parameters to create a pose controller for an articulated actor. More...
struct  PoseTrackingParams
 Parameters for pose controller tracking constraints. More...
struct  PrefabHandle
 Runtime handle to a loaded nested prefab (the resolved target of a prefab::PrefabReference). More...
class  Quaternion
struct  QueryHandle
 Unique identifier for a query within a Scene. More...
struct  RecenteringParams
 Parameters controlling recentering behavior for soft actors (not soft-skinned). More...
struct  RecordingParams
 Parameters controlling what data gets included in a scene recording. More...
struct  RigidActorParams
 Parameters to create a rigid body actor. More...
struct  RigidPivotPositionConstraintParams
 Parameters for creating a position constraint on a rigid actor's pivot point. More...
struct  RigidPivotRotationConstraintParams
 Parameters for creating a rotation constraint on a rigid actor's pivot frame. More...
struct  RigidPivotToRigidTargetConstraintParams
 Parameters for creating a constraint on a rigid actor's pivot point. More...
struct  RigidPrismaticJointConstraintParams
 Parameters for creating a prismatic joint between two rigid actors. More...
struct  RigidSphericalJointConstraintParams
 Parameters for creating a spherical joint between two rigid actors. More...
struct  RodElementRotationToRigidConstraintParams
 Parameters for creating a tracking constraint on the relative rotation between a rigid actor and a rod element. More...
struct  RoutingElement
 One ordered element in a spatial tendon's heterogeneous routing list. More...
struct  SaturationHessianParams
 [Experimental] Controls whether force-saturation terms use a fitted quadratic Hessian independently for each saturation pathway. More...
class  Scene
 Represents a simulation scene. More...
struct  SceneHandle
 Unique identifier for a Scene within a Context. More...
struct  SdfDistances
 SDF distance information for active contact sample points. More...
struct  ShapeHandle
 Handle to a shape (mesh, sphere, plane, etc.) within a Context. More...
class  Simd
class  Simd< T, N >
class  Simd< T, N, std::enable_if_t<(N > kSimdDefaultSize< T > &&Simd< T >::kIsSupported), SimdConcept > >
 Simd partial specialization for larger values of N. More...
struct  SimdConcept
struct  SkinningData
 Skinning data for a Mochi mesh. More...
struct  SkinningDataView
 A non-owning view of the skinning data for a Mochi mesh. More...
struct  SmithNeoHookeanMaterialParams
 Parameters for the stable Neo-Hookean hyperelastic material model by Smith et al. More...
struct  SoftActorParams
 Parameters to create a soft deformable actor. More...
struct  SoftMaterialParams
 Material parameters for soft body simulation. More...
struct  SoftSkinnedActorParams
 Parameters to create soft-skinned actors with a shared articulated skeleton. More...
struct  SolverParams
 Simulation solver configuration parameters. More...
struct  SolverStats
 Solver convergence metrics from the last simulation step. More...
class  Span
class  Sphere
struct  StateHandle
 Unique identifier for a captured simulation state within a Scene. More...
struct  StepInfo
 Information passed to per-step callbacks. More...
class  StlAllocator
struct  StVenantKirchhoffMaterialParams
 Parameters for the Saint Venant-Kirchhoff (StVK) hyperelastic material model. More...
struct  TetFaces
class  TransformRT
struct  Void
 Empty object when no value is needed. More...

Concepts

concept  ConvertibleTo
concept  HasDistance
concept  IsArithmetic
concept  IsConst
concept  IsHalf
concept  IsInvokableWithRaw
concept  IsNonConst
concept  IsNotVoidObject
concept  IsPrimitiveShape
concept  IsSdfBv
concept  IsSimd
concept  IsSimdSupportedType

Typedefs

using Color = NdArray<uint8_t, 4>
 RGBA color representation using 4 bytes (0-255 per channel) in RGBA order.
using Double2 = NdArray<double, 2>
using Double3 = NdArray<double, 3>
using Double4 = NdArray<double, 4>
using DynamicString = std::basic_string<char, std::char_traits<char>, StlAllocator<char>>
 Alias for std::string using a polymorphic superdex::Allocator pointer.
using Float2 = NdArray<float, 2>
using Float3 = NdArray<float, 3>
using Float4 = NdArray<float, 4>
using Int2 = NdArray<int, 2>
using Int3 = NdArray<int, 3>
using Int4 = NdArray<int, 4>
using LogFn = std::function<void(LogChannel, char const* message, char const* file, int line)>
using Matrix2x2f = NdArray<float, 2, 2>
using Matrix2x2r = NdArray<real, 2, 2>
using Matrix2x3f = NdArray<float, 2, 3>
using Matrix2x3r = NdArray<real, 2, 3>
using Matrix3x2f = NdArray<float, 3, 2>
using Matrix3x2r = NdArray<real, 3, 2>
using Matrix3x3f = NdArray<float, 3, 3>
using Matrix3x3r = NdArray<real, 3, 3>
using Matrix4x3f = NdArray<float, 4, 3>
using Matrix4x3r = NdArray<real, 4, 3>
using Matrix4x4f = NdArray<float, 4, 4>
using Matrix4x4r = NdArray<real, 4, 4>
using NeoHookeanMaterialParams = SmithNeoHookeanMaterialParams
using OnAssertFn
 Callback invoked when an assertion fails.
using real = float
using Real1 = NdArray<real, 1>
using Real2 = NdArray<real, 2>
using Real3 = NdArray<real, 3>
using Real4 = NdArray<real, 4>
using Real5 = NdArray<real, 5>
using Real6 = NdArray<real, 6>
using Tensor3x3x3f = NdArray<float, 3, 3, 3>
using Tensor3x3x3r = NdArray<real, 3, 3, 3>
using Tensor3x3x3x3f = NdArray<float, 3, 3, 3, 3>
using Tensor3x3x3x3r = NdArray<real, 3, 3, 3, 3>
using Vec2d = Simd<double, 2>
using Vec2l = Simd<int64_t, 2>
using Vec4d = Simd<double, 4>
using Vec4f = Simd<float, 4>
using Vec4i = Simd<int, 4>
using Vec4l = Simd<int64_t, 4>
using Vec4r = Simd<real, 4>
using Vec8d = Simd<double, 8>
using Vec8f = Simd<float, 8>
using Vec8i = Simd<int, 8>
using Vec8l = Simd<int64_t, 8>
using Vec8r = Simd<real, 8>
using VMatrix2x2f = Simd<float, 4>
using VMatrix2x2r = Simd<real, 4>
 Special case for the SIMD representation of a 2x2 matrix.
using VMatrix2x3f = NdArray<Simd<float, 4>, 2>
using VMatrix2x3r = NdArray<Simd<real, 4>, 2>
using VMatrix2x4f = NdArray<Simd<float, 4>, 2>
using VMatrix2x4r = NdArray<Simd<real, 4>, 2>
using VMatrix3x2f = NdArray<Simd<float, 4>, 3>
using VMatrix3x2r = NdArray<Simd<real, 4>, 3>
 SIMD representation of a NxM matrices.
using VMatrix3x3d = NdArray<Simd<double, 4>, 3>
using VMatrix3x3f = NdArray<Simd<float, 4>, 3>
using VMatrix3x3r = NdArray<Simd<real, 4>, 3>
using VMatrix3x4f = NdArray<Simd<float, 4>, 3>
using VMatrix3x4r = NdArray<Simd<real, 4>, 3>
using VMatrix4x3f = NdArray<Simd<float, 4>, 4>
using VMatrix4x3r = NdArray<Simd<real, 4>, 4>
using VMatrix4x4f = NdArray<Simd<float, 4>, 4>
using VMatrix4x4r = NdArray<Simd<real, 4>, 4>
using VSymMatrix2x2f = Simd<float, 4>
using VSymMatrix2x2r = Simd<real, 4>
 Special case for the SIMD representation of a 2x2 symmetric matrix.
using VSymMatrix3x3f = NdArray<Simd<float, 4>, 2>
using VSymMatrix3x3r = NdArray<Simd<real, 4>, 2>
 Special case for the SIMD representation of a 3x3 symmetric matrix.
using VTensor3x3x3f = NdArray<Simd<float, 4>, 3, 3>
using VTensor3x3x3r = NdArray<Simd<real, 4>, 3, 3>
using VTensor3x3x3x3f = NdArray<Simd<float, 4>, 3, 3, 3>
using VTensor3x3x3x3r = NdArray<Simd<real, 4>, 3, 3, 3>
 SIMD representation of tensors.
using VTensor4x3x3r = NdArray<Simd<real, 4>, 4, 3>

Enumerations

enum class  ActorBoundaryElementType {
  P1Q1 , P1Q3 , P1Q6 , ExperimentalP1Q7 ,
  ExperimentalP1Q12 , ExperimentalP1Q16 , Count , Default = P1Q3
}
 Two-dimensional discretization element types for actor boundary integrals. More...
enum class  ActorSegmentElementType {
  P1Q1 , P1Q2 , P1Q3 , Count ,
  Default = P1Q3
}
 One-dimensional discretization element types for actor segment integrals. More...
enum class  ActorType {
  None , Rigid , Soft , Articulated ,
  Shell , Rod , Count
}
 Type of actor. More...
enum class  ArticulatedJointType {
  Free , Prismatic , Revolute , Spherical ,
  Hard , Cycle , Count , Invalid = Count
}
 Types of joints in an articulated body. More...
enum class  BoundarySubsamplingStrategy { UniformProbability = 0 , AreaProportional = 1 , Count = 2 }
 Strategy for selecting the active boundary faces when subsampling boundary integrals. More...
enum class  ColliderType {
  None , Auto , Sphere , Box ,
  Mesh , Plane , Sdf , PointCloud ,
  Count
}
 Collision detection geometry for an Actor. More...
enum class  ConceptMatch { True }
enum class  ConstraintType {
  None , ArticulatedSingleDofRange , Articulated3dRotationRange , ArticulatedSingleDofTarget ,
  Articulated3dRotationTarget , JointRotationRange , JointRotationTracking , RigidPivotPosition ,
  RigidPivotToRigidTarget , RigidPivotRotation , RigidPrismaticJoint , RigidSphericalJoint ,
  DeformableNodePosition , DeformableNodeToRigid , DeformableNodeToDeformableNode , RodElementRotationToRigid ,
  Count
}
 Type of constraint acting on actors' degrees of freedom. More...
enum struct  ConvergenceStatus {
  None , Converged , Stopped , Diverged ,
  Count
}
 Convergence status of the non-linear solver. More...
enum class  CoordinateSpaceAxes : uint16_t {
  Right , Left , Up , Down ,
  Forward , Backward , RUF = Right << 0 | Up << 3 | Forward << 6 , RUB = Right << 0 | Up << 3 | Backward << 6 ,
  RDF = Right << 0 | Down << 3 | Forward << 6 , RDB = Right << 0 | Down << 3 | Backward << 6 , LUF = Left << 0 | Up << 3 | Forward << 6 , LUB = Left << 0 | Up << 3 | Backward << 6 ,
  LDF = Left << 0 | Down << 3 | Forward << 6 , LDB = Left << 0 | Down << 3 | Backward << 6 , RFU = Right << 0 | Forward << 3 | Up << 6 , RFD = Right << 0 | Forward << 3 | Down << 6 ,
  RBU = Right << 0 | Backward << 3 | Up << 6 , RBD = Right << 0 | Backward << 3 | Down << 6 , LFU = Left << 0 | Forward << 3 | Up << 6 , LFD = Left << 0 | Forward << 3 | Down << 6 ,
  LBU = Left << 0 | Backward << 3 | Up << 6 , LBD = Left << 0 | Backward << 3 | Down << 6 , URF = Up << 0 | Right << 3 | Forward << 6 , URB = Up << 0 | Right << 3 | Backward << 6 ,
  ULF = Up << 0 | Left << 3 | Forward << 6 , ULB = Up << 0 | Left << 3 | Backward << 6 , DRF = Down << 0 | Right << 3 | Forward << 6 , DRB = Down << 0 | Right << 3 | Backward << 6 ,
  DLF = Down << 0 | Left << 3 | Forward << 6 , DLB = Down << 0 | Left << 3 | Backward << 6 , UFR = Up << 0 | Forward << 3 | Right << 6 , UFL = Up << 0 | Forward << 3 | Left << 6 ,
  UBR = Up << 0 | Backward << 3 | Right << 6 , UBL = Up << 0 | Backward << 3 | Left << 6 , DFR = Down << 0 | Forward << 3 | Right << 6 , DFL = Down << 0 | Forward << 3 | Left << 6 ,
  DBR = Down << 0 | Backward << 3 | Right << 6 , DBL = Down << 0 | Backward << 3 | Left << 6 , FRU = Forward << 0 | Right << 3 | Up << 6 , FRD = Forward << 0 | Right << 3 | Down << 6 ,
  FLU = Forward << 0 | Left << 3 | Up << 6 , FLD = Forward << 0 | Left << 3 | Down << 6 , BRU = Backward << 0 | Right << 3 | Up << 6 , BRD = Backward << 0 | Right << 3 | Down << 6 ,
  BLU = Backward << 0 | Left << 3 | Up << 6 , BLD = Backward << 0 | Left << 3 | Down << 6 , FUR = Forward << 0 | Up << 3 | Right << 6 , FUL = Forward << 0 | Up << 3 | Left << 6 ,
  FDR = Forward << 0 | Down << 3 | Right << 6 , FDL = Forward << 0 | Down << 3 | Left << 6 , BUR = Backward << 0 | Up << 3 | Right << 6 , BUL = Backward << 0 | Up << 3 | Left << 6 ,
  BDR = Backward << 0 | Down << 3 | Right << 6 , BDL = Backward << 0 | Down << 3 | Left << 6 , Default = FLU
}
 Combination of axis directions for a coordinate space convention. More...
enum class  CoulombFrictionModel { C1Regularized , CinfRegularized , Count , Default = C1Regularized }
 Selects which Coulomb friction smoothing model to use. More...
enum class  FileFormat { JSON , H5 , Count }
enum struct  GridSdfResolutionMode {
  LargestAxis , SmallestAxis , MeanAxis , LargestEdge ,
  SmallestEdge , MeanEdge , Explicit , Count
}
 The maximum voxel size for an SDF will be determined by one of these measurements scaled by GridSdfParams::resolutionDelta. More...
enum class  IncludeNestedActors { No , Yes , Count }
 Specifies whether actor-contact filtering also applies to nested actors. More...
enum struct  IntegrationMethod {
  BackwardEuler , BDF2 , BDF3 , DIRK22 ,
  DIRK23 , DIRK33 , SymplecticDIRK12 , SymplecticDIRK22 ,
  Count , Default = BackwardEuler
}
 Time integration methods. More...
enum struct  LinearSolverConvergenceNorm {
  ResidualL2 , PreconditionedResidualL2 , ResidualPreconditionerInduced , Count ,
  Default = PreconditionedResidualL2
}
 Norm types for the stopping criteria of the linear solver. More...
enum struct  LinearSolverType {
  CG , GMRES , CudaCG , CudaGMRES ,
  AugmentedCG , LDLT , LU , AsyncCG ,
  ParallelCG , MINRES , ExperimentalCudaSparseCholesky , ExperimentalCudaSparseLDLT ,
  ExperimentalCudaSparseLU , Auto , Count , Default = Auto
}
 Linear solver types. More...
enum struct  LinearToleranceStrategy {
  Constant , EisenstatWalker1 , EisenstatWalker2 , EisenstatWalker3 ,
  Count , Default = EisenstatWalker2
}
 Strategies to select the relative tolerance of the linear solver (aka forcing term). More...
enum struct  LineSearchType {
  None , Simple , Armijo , WolfeWeak ,
  WolfeStrong , ResidualNorm , ArmijoOrResidualNorm , Count ,
  Default = ResidualNorm
}
 Line search methods for the non-linear solver. More...
enum class  LogChannel {
  Verbose , Info , Warning , Error ,
  Count
}
enum struct  MaterialPsdStrategy {
  MaterialDefault , None , Projection , Fast ,
  AbsEigenProjection , PerTermProjection , Count
}
 Strategy for ensuring positive semi-definite (PSD) Hessian matrices in material models. More...
enum class  MeshFileType {
  Legacy , PLY , OFF , STL ,
  OBJ , Count
}
 Mesh file format hint for Context::LoadShapeFromBytes and model-loading APIs that read from byte buffers. More...
enum struct  NonLinearSolverConvergenceMode { Global , PerActorWeighted , Count , Default = PerActorWeighted }
 Convergence monitoring mode for the non-linear solver residual. More...
enum struct  NonLinearSolverType {
  Newton , BFGS , SR1 , Count ,
  Default = Newton
}
 Non-linear solver types. More...
enum class  PoseConstraintType {
  Joint = 0 , LinkTranslation = 1 , LinkRotation = 2 , Count ,
  Invalid = 255
}
 Type of constraint in an articulated pose controller. More...
enum struct  PreconditionerType {
  None , Jacobi , BlockJacobi , SSOR ,
  BlockSSOR , LU , AMG , SymInverse ,
  LDLT , ILU0 , IC0 , PerActor ,
  ColoredSSOR , Count , Default = PerActor
}
 Preconditioner types for the linear solver. More...
enum class  PsdProjectionMode {
  Never , Always , IfFailRetry , IfFailAlways ,
  Count , Default = Always
}
 Positive Semi-Definite (PSD) projection modes for the dresidual matrix. More...
enum class  QueryType {
  NodePositions , ElementsDeformationGradient , SurfaceNodePositions , SurfaceNodeNormals ,
  VisualNodePositions , VisualNodeNormals , ContactPoints , ElasticEnergy ,
  NodeContactForces , ConstraintForce , ArticulatedControllerForce , SdfDistances ,
  TotalContactForce , Count
}
 Type of query data to compute for an actor or constraint. More...
enum class  RoutingElementType { Waypoint , LinearJoint }
 Selects how a RoutingElement contributes to a spatial tendon's routing. More...
enum struct  SoftMaterialType {
  NeoHookean = 0 , StVenantKirchhoff = 1 , LinearElastic = 2 , ActiveNeoHookean = 3 ,
  ActiveShapeTargetingArap = 4 , Arap = 5 , Count = 6
}
 Material constitutive models for soft bodies. More...
enum struct  VerbosityLevel {
  Silent = 0 , Error = 1 , Warning = 2 , Verbose = 3 ,
  Count = 4
}
 Verbosity levels for solvers and optimizers. More...

Functions

template<class T, int N>
Simd< T, N > Abs (Simd< T, N > a)
template<typename T>
constexpr T Abs (T a)
template<class T, int N>
Simd< T, N > ACos (Simd< T, N > a)
template<typename T>
constexpr T ACos (T a)
template<int COUNT = -1, class T, int N>
bool AllTrue (Simd< T, N > a)
template<typename T>
bool AllTrue (T const &a)
template<int COUNT = -1, class T, int N>
bool AnyTrue (Simd< T, N > a)
template<typename T>
bool AnyTrue (T const &a)
template<typename T, typename InBeginIterator, typename InEndIterator>
void Append (DynamicArray< T > &out, InBeginIterator const &inBegin, InEndIterator const &inEnd)
 Utility Functions.
template<typename T, typename InContainer>
void Append (DynamicArray< T > &out, InContainer const &inContainer)
template<typename T, typename ContainerIn>
void AppendSum (DynamicArray< T > &out, ContainerIn const &in, T valueToAdd)
template<typename T, size_t N>
constexpr size_t ArgMax (NdArray< T, N > const &a)
template<typename T, size_t N>
constexpr size_t ArgMin (NdArray< T, N > const &a)
template<class T, int N>
Simd< T, N > ASin (Simd< T, N > a)
template<typename T>
constexpr T ASin (T a)
template<class T, int N>
Simd< T, N > ATan (Simd< T, N > a)
template<typename T>
constexpr T ATan (T a)
template<typename T>
constexpr T ATan2 (T y, T x)
template<typename T, int N>
constexpr NdArray< T, N > BasisVector (int axis)
template<int x, int y, int z, int w, class T, int N>
Simd< T, N > Blend (Simd< T, N > a, Simd< T, N > b)
template<int x, int y, class T, int N>
Simd< T, N > Blend (Simd< T, N > a, Simd< T, N > b)
template<int i, class T, int N>
Simd< T, N > Broadcast (Simd< T, N > v)
template<class T, int N>
Simd< T, N > Broadcast (Simd< T, N > v, int i)
template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
Broadcast (typename V::Scalar a)
template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
Broadcast (typename V::Scalar const *ptr)
template<class V, int N, std::enable_if_t< IsSimd< V > &&N > = 3, superdex::ConceptMatch>
NdArray< V, 3 > Broadcast3 (Simd< typename V::Scalar, N > const &a)
template<class V, size_t D0, int D1, std::enable_if_t< IsSimd< V > &&D0 > = 3 && D1 >= 3, superdex::ConceptMatch>
NdArray< V, 3, 3 > Broadcast3x3 (NdArray< Simd< typename V::Scalar, D1 >, D0 > const &a)
template<class V, size_t D0, size_t... DIMS, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
NdArray< V, D0, DIMS... > BroadcastEach (NdArray< typename V::Scalar, D0, DIMS... > const &a)
template<class V, int N, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
NdArray< V, N > BroadcastEach (Simd< typename V::Scalar, N > const &a)
template<typename T, size_t N>
constexpr NdArray< T, N > Ceil (NdArray< T, N > const &a)
template<typename T>
constexpr T Ceil (T a)
template<typename T, size_t N>
constexpr NdArray< T, N > Clamp (NdArray< T, N > const &a, NdArray< T, N > const &min, NdArray< T, N > const &max)
template<typename T, size_t N>
constexpr NdArray< T, N > Clamp (NdArray< T, N > const &a, T min, T max)
template<typename ValT, typename MinT, typename MaxT>
constexpr ValT Clamp (ValT value, MinT min, MaxT max)
template<typename T>
constexpr NdArray< T, 2, 2 > Cofactor (NdArray< T, 2, 2 > const &mat)
template<typename T>
constexpr NdArray< T, 3, 3 > Cofactor (NdArray< T, 3, 3 > const &mat)
template<typename T>
NdArray< Simd< T, 4 >, 3 > Cofactor3x3 (NdArray< Simd< T, 4 >, 3 > const &mat)
template<typename T>
constexpr void Cofactor4x4 (T const m[16], T adjOut[16])
template<typename T>
Simd< T, 4 > CofactorSym2x2 (Simd< T, 4 > const &mat)
template<typename T>
NdArray< Simd< T, 4 >, 2 > CofactorSym3x3 (NdArray< Simd< T, 4 >, 2 > const &mat)
template<typename T, size_t N, size_t M>
constexpr T Colon (NdArray< T, N, M > const &A, NdArray< T, N, M > const &B)
template<typename T>
Colon3x3 (NdArray< Simd< T, 4 >, 3 > const &A, NdArray< Simd< T, 4 >, 3 > const &B)
Quaternion Conjugate (Quaternion const &a)
template<class T, int N>
Simd< T, N > Cos (Simd< T, N > a)
template<typename T>
constexpr T Cos (T a)
ContextCreateContext (int numWorkerThreads=-1)
 Initialize SuperDex Physics by creating a Context object.
template<typename T>
constexpr NdArray< T, 3 > Cross (NdArray< T, 3 > const &a, NdArray< T, 3 > const &b)
template<class T, int N>
Simd< T, N > Cross3 (Simd< T, N > a, Simd< T, N > b)
std::pair< Real3, TransformRTDecomposeMatrixTransform (VMatrix4x4r const &matrixTransform)
template<class T, class A>
void Delete (A *allocator, T *ptr)
 Destroy and deallocate an object that was created via New<T>.
void DestroyContext (Context *context)
 Shut down SuperDex Physics by destroying the Context object.
template<typename T>
constexpr T Det (NdArray< T, 2, 2 > const &A)
template<typename T>
constexpr T Det (NdArray< T, 3, 3 > const &A)
template<typename T>
constexpr T Det (NdArray< T, 4, 4 > const &A)
template<typename T>
Det2x2 (Simd< T, 4 > const &A)
template<typename T, size_t N>
Det3x3 (NdArray< Simd< T, 4 >, N > const &A)
template<typename T>
constexpr T Det4x4 (T const m[16])
template<size_t N, typename T>
constexpr NdArray< T, N, N > DiagonalMatrix (NdArray< T, N > const &diagonalVector)
template<size_t N, typename T>
constexpr NdArray< T, N, N > DiagonalMatrix (T valueOnDiagonal)
template<typename T, size_t N>
constexpr NdArray< T, N, N > DNormalize (NdArray< T, N > const &v)
template<typename T, size_t N>
constexpr NdArray< T, N, N > DNormalize (NdArray< T, N > const &v, T sqrNorm)
template<typename T>
NdArray< Simd< T, 4 >, 3 > DNormalize3 (Simd< T, 4 > const &v)
template<typename T>
constexpr NdArray< T, 3, 3 > Dot (NdArray< T, 3, 3 > const &a, NdArray< T, 3, 3 > const &b)
template<typename T, size_t N>
constexpr T Dot (NdArray< T, N > const &a, NdArray< T, N > const &b)
template<typename T, size_t N, size_t M, size_t L>
constexpr NdArray< T, N, L > Dot (NdArray< T, N, M > const &a, NdArray< T, M, L > const &B)
template<int COUNT = -1, class T, int N>
Dot (Simd< T, N > a, Simd< T, N > b)
template<typename T, size_t N>
constexpr T Dot (Span< T const > a, NdArray< T, N > const &b)
template<typename T>
constexpr T Dot (Span< T const > a, Span< T const > b)
template<typename T>
Simd< T, 4 > Dot2x2 (Simd< T, 4 > const &a, Simd< T, 4 > const &b)
template<typename T, size_t D0A, size_t D0B>
NdArray< Simd< T, 4 >, 3 > Dot3x3 (NdArray< Simd< T, 4 >, D0A > const &a, NdArray< Simd< T, 4 >, D0B > const &b)
template<typename T>
NdArray< Simd< T, 4 >, 4 > Dot4x4 (NdArray< Simd< T, 4 >, 4 > const &a, NdArray< Simd< T, 4 >, 4 > const &b)
template<typename T>
constexpr NdArray< T, 3 > DotMatVec (NdArray< T, 3, 3 > const &a, NdArray< T, 3 > const &b)
template<typename T, size_t N, size_t M>
constexpr NdArray< T, N > DotMatVec (NdArray< T, N, M > const &a, NdArray< T, M > const &b)
template<typename T, size_t N, size_t M>
constexpr NdArray< T, N > DotMatVec (NdArray< T, N, M > const &a, Span< T const > b)
template<typename T, size_t N, size_t M>
void DotMatVec (NdArray< T, N, M > const &a, Span< T const > b, Span< T > out)
template<typename T, size_t D0>
Simd< T, 4 > DotMatVec3x3 (NdArray< Simd< T, 4 >, D0 > const &m, Simd< T, 4 > v)
template<size_t N, typename T, size_t D0>
Simd< T, 4 > DotMatVec3xN (NdArray< Simd< T, 4 >, D0 > const &m, Simd< T, 4 > v)
template<typename T>
Simd< T, 4 > DotMatVec4x4 (NdArray< Simd< T, 4 >, 4 > const &m, Simd< T, 4 > v)
template<typename T, size_t N, size_t M>
constexpr NdArray< T, M > DotVecMat (NdArray< T, N > const &a, NdArray< T, N, M > const &b)
template<typename T>
Simd< T, 4 > DotVecMat2x3 (Simd< T, 4 > v, NdArray< Simd< T, 4 >, 2 > const &m)
template<typename T, size_t D0>
Simd< T, 4 > DotVecMat3x3 (Simd< T, 4 > v, NdArray< Simd< T, 4 >, D0 > const &m)
template<typename T>
Simd< T, 4 > DotVecMat4x4 (Simd< T, 4 > a, NdArray< Simd< T, 4 >, 4 > const &b)
template<typename InputIt, std::enable_if_t<(std::is_base_of_v< std::input_iterator_tag, typename std::iterator_traits< InputIt >::iterator_category >), superdex::ConceptMatch > = superdex::ConceptMatch::True>
 DynamicArray (InputIt, InputIt, Allocator *=GetDefaultAllocator()) -> DynamicArray< typename std::iterator_traits< InputIt >::value_type >
void EnableLogChannel (LogChannel channel, bool enable)
template<int COUNT = -1, class T, int N>
bool Equal (Simd< T, N > a, Simd< T, N > b)
template<typename T>
constexpr auto Equal (T const &a, T const &b)
bool EquivalentRotation (Quaternion const &a, Quaternion const &b, real epsilon=kDefaultNearEqualEpsilon< real >)
bool EquivalentRotation (Quaternion const &a, Quaternion const &b, Vec4r epsilon)
template<class T, int N>
Simd< T, N > Exp (Simd< T, N > a)
template<typename T>
constexpr T Exp (T a)
template<size_t N, typename T = real>
constexpr NdArray< T, N, N > Eye ()
template<class T, int N>
Simd< T, N > FastRound (Simd< T, N > a)
template<typename T, size_t N>
constexpr NdArray< T, N > Floor (NdArray< T, N > const &a)
template<class T, int N>
Simd< T, N > Floor (Simd< T, N > a)
template<typename T>
constexpr T Floor (T a)
void FlushLog ()
std::string Format ()
std::string Format (char const *format,...)
constexpr auto FourthOrderEye ()
constexpr auto FourthOrderEyeSym ()
template<int i, class T, int N>
Get (Simd< T, N > v)
template<class T, int N>
Get (Simd< T, N > v, int i)
template<class T, int N>
Get0 (Simd< T, N > v)
AllocatorGetDefaultAllocator ()
 Get an instance of the DefaultAllocator class.
template<int iHalf, class T, int N>
Simd< T, N/2 > GetHalf (Simd< T, N > a)
LogFn GetLogCallback ()
Matrix3x3r GetRotationMatrix (TransformRT const &transform)
Vec4r GetRotationVector (TransformRT const &transform)
template<int COUNT = -1, class T, int N>
HMax (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
HMin (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
HProd (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
HSum (Simd< T, N > a)
template<typename T>
constexpr T IntegralSqrt (T a)
TransformRT Interpolate (TransformRT const &a, TransformRT const &b, real t)
MatrixTransformRT Invert (MatrixTransformRT const &a)
template<typename T>
constexpr NdArray< T, 2, 2 > Invert (NdArray< T, 2, 2 > const &a)
template<typename T>
constexpr NdArray< T, 2, 2 > Invert (NdArray< T, 2, 2 > const &a, T det)
template<typename T>
constexpr NdArray< T, 3, 3 > Invert (NdArray< T, 3, 3 > const &a)
template<typename T>
constexpr NdArray< T, 3, 3 > Invert (NdArray< T, 3, 3 > const &a, T det)
template<typename T>
constexpr NdArray< T, 4, 4 > Invert (NdArray< T, 4, 4 > const &A)
TransformRT Invert (TransformRT const &a)
template<typename T>
Simd< T, 4 > Invert2x2 (Simd< T, 4 > const &mat, T det)
template<typename T>
NdArray< Simd< T, 4 >, 3 > Invert3x3 (NdArray< Simd< T, 4 >, 3 > const &mat)
template<typename T>
NdArray< Simd< T, 4 >, 3 > Invert3x3 (NdArray< Simd< T, 4 >, 3 > const &mat, Simd< T, 4 > det)
template<typename T>
NdArray< Simd< T, 4 >, 3 > Invert3x3 (NdArray< Simd< T, 4 >, 3 > const &mat, T det)
template<typename T>
constexpr NdArray< Simd< T, 4 >, 4 > Invert4x4 (NdArray< Simd< T, 4 >, 4 > const &A)
template<typename T>
constexpr void InvertRowMajor4x4 (T const m[16], T invOut[16])
template<typename T>
NdArray< Simd< T, 4 >, 4 > InvertTransformation (NdArray< Simd< T, 4 >, 4 > const &mat)
template<typename T>
NdArray< Simd< T, 4 >, 4 > InvertTransformationTransposed (NdArray< Simd< T, 4 >, 4 > const &mat)
template<typename T>
constexpr Simd< T, 4 > InvSkew3 (NdArray< Simd< T, 4 >, 3 > const &matrix)
constexpr auto IouterI ()
bool IsDebuggerAttached ()
 Return true if we can detect that a debugger is attached to this process.
template<class T, int DN, size_t D0, size_t... DIMS>
bool IsFinite (NdArray< Simd< T, DN >, D0, DIMS... > const &a)
template<class T, size_t D0, size_t... DIMS>
bool IsFinite (NdArray< T, D0, DIMS... > const &a)
bool IsFinite (Quaternion const &q)
template<class T, int N>
bool IsFinite (Simd< T, N > a)
template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
bool IsFinite (T a)
bool IsFinite (TransformRT const &a)
template<typename T>
constexpr int isize (T const &a)
template<typename T, size_t N>
constexpr int isize (T const (&array)[N])
bool IsLogChannelEnabled (LogChannel channel)
template<typename T>
constexpr bool IsPowerOfTwo (T a)
template<int i, class T, int N>
int IsTrue (Simd< T, N > mask)
template<typename T, size_t D0, size_t D1>
constexpr auto LargestRow (NdArray< T, D0, D1 > const &A, T *sqrNorm=nullptr)
auto LargestRowColSym2x2 (VSymMatrix2x2r A, Vec4r &outNormSqr)
auto LargestRowColSym3x3 (VSymMatrix3x3r A, Vec4r &outNormSqr)
Quaternion Lerp (Quaternion a, Quaternion b, real t)
template<typename T, typename Frac>
constexpr T Lerp (T a, T b, Frac t)
template<class T, int N>
Simd< T, N > Ln (Simd< T, N > a)
template<int N, class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
Load (typename V::Scalar const *ptr)
template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
Load (typename V::Scalar const *ptr)
template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
Load (typename V::Scalar const *ptr, int n)
template<class V, class I, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
LoadIndexed (typename V::Scalar const *ptr, Simd< I, V::kSize > indices)
template<size_t D0, size_t D1, typename T>
void LoadMatrix (NdArray< Simd< T, 4 >, D0 > &out, NdArray< T, D0, D1 > const &x)
template<size_t D0, size_t D1, typename T, typename ConstOrNonConstT>
void LoadMatrix (NdArray< Simd< T, 4 >, D0 > &out, Span< ConstOrNonConstT > x)
template<size_t D0, size_t D1, typename T>
void LoadMatrix (NdArray< Simd< T, 4 >, D0 > &out, T const *x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void LoadMatrix (NdArray< Simd< T, 4 >, D0, D1, D2 > &out, NdArray< T, D0, D1, D2, D3 > const &x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void LoadMatrix (NdArray< Simd< T, 4 >, D0, D1, D2 > &out, T const *x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void LoadSubmatrix (NdArray< Simd< T, 4 >, D0 > &out, Int2 coords, NdArray< T, D2, D3 > const &x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T, typename ConstOrNonConstT>
void LoadSubmatrix (NdArray< Simd< T, 4 >, D0 > &out, Int2 coords, Span< ConstOrNonConstT > x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void LoadSubmatrix (NdArray< Simd< T, 4 >, D0 > &out, Int2 coords, Span< T > x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void LoadSubmatrix (NdArray< Simd< T, 4 >, D0 > &out, Int2 coords, T const *x)
template<int kTupleCount = -1, class T, int N>
void LoadTransposed (T const *ptr, Simd< T, N > &out0, Simd< T, N > &out1, Simd< T, N > &out2)
template<int kTupleCount = -1, class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
void LoadTransposed (typename V::Scalar const *ptr, NdArray< V, 3 > &out)
void Log (LogChannel channel, std::string msg, char const *file, int line, bool newline)
constexpr Color MakeColor (uint32_t rgba)
 Creates a Color from a packed 32-bit RGBA value.
constexpr Color MakeColor (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 Creates a Color from 4 unsigned bytes in RGBA order.
template<typename ContainerT>
auto MakeConstSpan (ContainerT const &container)
template<typename T, typename S>
Span< T const, S > MakeConstSpan (Span< T, S > const &alreadyASpan)
template<typename T, size_t N>
auto MakeConstSpan (T(&arr)[N])
template<typename T>
Span< T const, size_t > MakeSingletonConstSpan (T const &obj)
template<typename T>
Span< T, size_t > MakeSingletonSpan (T &obj)
template<typename ContainerT>
auto MakeSpan (ContainerT &container)
template<typename T, typename S>
Span< T, S > const & MakeSpan (Span< T, S > const &alreadyASpan)
template<typename T, size_t N>
auto MakeSpan (T(&arr)[N])
template<typename T, size_t N>
constexpr T Max (NdArray< T, N > const &a)
template<typename T, size_t N>
constexpr NdArray< T, N > Max (NdArray< T, N > const &a, NdArray< T, N > const &max)
template<typename T, size_t N>
constexpr NdArray< T, N > Max (NdArray< T, N > const &a, T max)
template<class T, int N>
Simd< T, N > Max (Simd< T, N > a, Simd< T, N > b)
template<typename T, typename... More>
constexpr T Max (T a, T b, T c, More... args)
template<typename T>
constexpr T const & Max (T const &a, T const &b)
template<class ForwardIt>
constexpr ForwardIt MaxElement (ForwardIt first, ForwardIt last)
template<typename T, size_t N>
constexpr T Mean (NdArray< T, N > const &a)
template<typename T, size_t N>
constexpr T Min (NdArray< T, N > const &a)
template<typename T, size_t N>
constexpr NdArray< T, N > Min (NdArray< T, N > const &a, NdArray< T, N > const &min)
template<typename T, size_t N>
constexpr NdArray< T, N > Min (NdArray< T, N > const &a, T min)
template<class T, int N>
Simd< T, N > Min (Simd< T, N > a, Simd< T, N > b)
template<typename T, typename... More>
constexpr T Min (T a, T b, T c, More... args)
template<typename T>
constexpr T const & Min (T const &a, T const &b)
template<class ForwardIt>
constexpr ForwardIt MinElement (ForwardIt first, ForwardIt last)
template<typename T>
constexpr T Minor4x4 (T const m[16], int r0, int r1, int r2, int c0, int c1, int c2)
template<typename A, typename B, typename C>
constexpr auto MulAdd (A a, B b, C c)
template<class T, int N>
Simd< T, N > MulAdd (Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<typename A, typename B, typename C>
constexpr auto MulSub (A a, B b, C c)
template<class T, int N>
Simd< T, N > MulSub (Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<typename A>
constexpr A MultiplyConstexpr (A a)
template<typename A, typename... ARGS>
constexpr A MultiplyConstexpr (A a, ARGS... args)
bool NearEqual (MatrixTransformRT const &a, MatrixTransformRT const &b, real epsilon=kDefaultNearEqualEpsilon< real >)
bool NearEqual (MatrixTransformRT const &a, MatrixTransformRT const &b, Vec4r epsilon)
template<typename T, size_t D0, int D1>
bool NearEqual (NdArray< Simd< T, D1 >, D0 > const &a, NdArray< Simd< T, D1 >, D0 > const &b, T epsilon=kDefaultNearEqualEpsilon< T >)
template<typename T, typename Eps = T, size_t D0, size_t... DIMS>
constexpr bool NearEqual (NdArray< T, D0, DIMS... > const &a, NdArray< T, D0, DIMS... > const &b, Eps epsilon=kDefaultNearEqualEpsilon< T >)
bool NearEqual (Quaternion const &a, Quaternion const &b, real epsilon=kDefaultNearEqualEpsilon< real >)
bool NearEqual (Quaternion const &a, Quaternion const &b, Vec4r epsilon)
template<int COUNT = -1, class T, int N, class Eps = T>
bool NearEqual (Simd< T, N > a, Simd< T, N > b, Eps epsilon=kDefaultNearEqualEpsilon< Eps >)
template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
constexpr auto NearEqual (T const &a, T const &b, T epsilon=kDefaultNearEqualEpsilon< T >)
bool NearEqual (TransformRT const &a, TransformRT const &b, real epsilon=kDefaultNearEqualEpsilon< real >)
bool NearEqual (TransformRT const &a, TransformRT const &b, Vec4r epsilon)
template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
constexpr auto NearEqualRel (T const &a, T const &b, T epsilon=kDefaultNearEqualEpsilon< T >)
template<int COUNT = -1, class T, int N, class Eps = T>
bool NearZero (Simd< T, N > a, Eps epsilon=kDefaultNearEqualEpsilon< Eps >)
template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
constexpr auto NearZero (T const &a, T epsilon=kDefaultNearEqualEpsilon< T >)
template<bool x, bool y, bool z, bool w, class T, int N>
Simd< T, N > Neg (Simd< T, N > a)
template<typename A, typename B, typename C>
constexpr auto NegMulAdd (A a, B b, C c)
template<class T, int N>
Simd< T, N > NegMulAdd (Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<typename A, typename B, typename C>
constexpr auto NegMulSub (A a, B b, C c)
template<class T, int N>
Simd< T, N > NegMulSub (Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<class T, class A, class... Args>
T * New (A *allocator, Args &&... args)
 Create a new object of type T using memory allocated by a polymorphic Allocator.
template<typename T>
constexpr T NextPowerOfTwo (T a)
template<typename T, size_t N>
Norm (NdArray< T, N > const &a)
template<typename T, size_t N, size_t M>
Norm (NdArray< T, N, M > const &a)
real Norm (Quaternion a)
template<int COUNT = -1, class T, int N>
Norm (Simd< T, N > a)
template<typename T, size_t D0, int D1, std::enable_if_t< D0 > = 3 && D1 >= 3, superdex::ConceptMatch>
Norm3x3 (NdArray< Simd< T, D1 >, D0 > const &a)
template<typename T, size_t N>
constexpr NdArray< T, N > Normalize (NdArray< T, N > const &a)
template<typename T, size_t N>
constexpr NdArray< T, N > Normalize (NdArray< T, N > const &a, T sqrNorm)
Quaternion Normalize (Quaternion a)
template<int COUNT = -1, class T, int N>
Simd< T, N > Normalize (Simd< T, N > a)
template<class T, int N>
Simd< T, N > Normalize (Simd< T, N > a, Simd< T, N > normSqr)
template<class T, int N>
Simd< T, N > Normalize (Simd< T, N > a, T normSqr)
TransformRT NormalizeRotation (TransformRT const &a)
template<typename T, size_t N>
constexpr T NormSqr (NdArray< T, N > const &a)
template<typename T, size_t N, size_t M>
constexpr T NormSqr (NdArray< T, N, M > const &a)
real NormSqr (Quaternion a)
template<int COUNT = -1, class T, int N>
NormSqr (Simd< T, N > a)
template<typename T, size_t D0, int D1, std::enable_if_t< D0 > = 3 && D1 >= 3, superdex::ConceptMatch>
NormSqr3x3 (NdArray< Simd< T, D1 >, D0 > const &a)
template<int COUNT = -1, class T, int N>
bool NotEqual (Simd< T, N > a, Simd< T, N > b)
template<typename T>
constexpr auto NotEqual (T const &a, T const &b)
template<typename T, size_t D0, size_t... DIMS>
constexpr bool operator!= (NdArray< Simd< T, 4 >, D0, DIMS... > const &lhs, NdArray< Simd< T, 4 >, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr bool operator!= (NdArray< T, D0, DIMS... > const &lhs, NdArray< T, D0, DIMS... > const &rhs)
constexpr real operator""_r (long double val)
constexpr real operator""_r (unsigned long long int val)
constexpr size_t operator""_uz (unsigned long long int val)
constexpr ptrdiff_t operator""_z (unsigned long long int val)
template<class T, int N>
Simd< T, N > operator&& (Simd< T, N > lhs, Simd< T, N > rhs)
template<class T, int N, class RHS>
Simd< T, N > & operator&= (Simd< T, N > &lhs, RHS rhs)
template<typename T, int N, size_t D0, size_t... DIMS>
constexpr NdArray< Simd< T, N >, D0, DIMS... > operator* (NdArray< Simd< T, N >, D0, DIMS... > const &lhs, T rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator* (NdArray< T, D0, DIMS... > const &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator* (NdArray< T, D0, DIMS... > const &lhs, T rhs)
Quaternion operator* (Quaternion a, real b)
Quaternion operator* (real a, Quaternion b)
template<class T, int N>
auto operator* (Simd< T, N > lhs, T rhs)
template<typename T, int N, size_t D0, size_t... DIMS>
constexpr NdArray< Simd< T, N >, D0, DIMS... > operator* (T lhs, NdArray< Simd< T, N >, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator* (T lhs, NdArray< T, D0, DIMS... > const &rhs)
template<class T, int N>
auto operator* (T lhs, Simd< T, N > rhs)
template<typename T, size_t D0, size_t... DIMS, typename AnyRHS>
constexpr NdArray< T, D0, DIMS... > & operator*= (NdArray< T, D0, DIMS... > &lhs, AnyRHS const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > & operator*= (NdArray< T, D0, DIMS... > &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > & operator*= (NdArray< T, D0, DIMS... > &lhs, T rhs)
template<class T, int N, class RHS>
Simd< T, N > & operator*= (Simd< T, N > &lhs, RHS rhs)
template<typename T, int N, size_t D0, size_t... DIMS>
constexpr NdArray< Simd< T, N >, D0, DIMS... > operator+ (NdArray< Simd< T, N >, D0, DIMS... > const &lhs, T rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator+ (NdArray< T, D0, DIMS... > const &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator+ (NdArray< T, D0, DIMS... > const &lhs, T rhs)
template<class T, int N>
auto operator+ (Simd< T, N > lhs, T rhs)
template<typename T, int N, size_t D0, size_t... DIMS>
constexpr NdArray< Simd< T, N >, D0, DIMS... > operator+ (T lhs, NdArray< Simd< T, N >, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator+ (T lhs, NdArray< T, D0, DIMS... > const &rhs)
template<class T, int N>
auto operator+ (T lhs, Simd< T, N > rhs)
template<typename T, size_t D0, size_t... DIMS, typename AnyRHS>
constexpr NdArray< T, D0, DIMS... > & operator+= (NdArray< T, D0, DIMS... > &lhs, AnyRHS const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > & operator+= (NdArray< T, D0, DIMS... > &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > & operator+= (NdArray< T, D0, DIMS... > &lhs, T rhs)
template<class T, int N, class RHS>
Simd< T, N > & operator+= (Simd< T, N > &lhs, RHS rhs)
template<typename T, int N, size_t D0, size_t... DIMS>
constexpr NdArray< Simd< T, N >, D0, DIMS... > operator- (NdArray< Simd< T, N >, D0, DIMS... > const &lhs, T rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator- (NdArray< T, D0, DIMS... > const &a)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator- (NdArray< T, D0, DIMS... > const &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator- (NdArray< T, D0, DIMS... > const &lhs, T rhs)
template<class T, int N>
auto operator- (Simd< T, N > lhs, T rhs)
template<typename T, int N, size_t D0, size_t... DIMS>
constexpr NdArray< Simd< T, N >, D0, DIMS... > operator- (T lhs, NdArray< Simd< T, N >, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator- (T lhs, NdArray< T, D0, DIMS... > const &rhs)
template<class T, int N>
auto operator- (T lhs, Simd< T, N > rhs)
template<typename T, size_t D0, size_t... DIMS, typename AnyRHS>
constexpr NdArray< T, D0, DIMS... > & operator-= (NdArray< T, D0, DIMS... > &lhs, AnyRHS const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > & operator-= (NdArray< T, D0, DIMS... > &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > & operator-= (NdArray< T, D0, DIMS... > &lhs, T rhs)
template<class T, int N, class RHS>
Simd< T, N > & operator-= (Simd< T, N > &lhs, RHS rhs)
template<typename T, int N, size_t D0, size_t... DIMS>
constexpr NdArray< Simd< T, N >, D0, DIMS... > operator/ (NdArray< Simd< T, N >, D0, DIMS... > const &lhs, T rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator/ (NdArray< T, D0, DIMS... > const &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator/ (NdArray< T, D0, DIMS... > const &lhs, T rhs)
Quaternion operator/ (Quaternion a, real b)
template<class T, int N>
auto operator/ (Simd< T, N > lhs, T rhs)
template<typename T, int N, size_t D0, size_t... DIMS>
constexpr NdArray< Simd< T, N >, D0, DIMS... > operator/ (T lhs, NdArray< Simd< T, N >, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > operator/ (T lhs, NdArray< T, D0, DIMS... > const &rhs)
template<class T, int N>
auto operator/ (T lhs, Simd< T, N > rhs)
template<typename T, size_t D0, size_t... DIMS, typename AnyRHS>
constexpr NdArray< T, D0, DIMS... > & operator/= (NdArray< T, D0, DIMS... > &lhs, AnyRHS const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > & operator/= (NdArray< T, D0, DIMS... > &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr NdArray< T, D0, DIMS... > & operator/= (NdArray< T, D0, DIMS... > &lhs, T rhs)
template<class T, int N, class RHS>
Simd< T, N > & operator/= (Simd< T, N > &lhs, RHS rhs)
template<typename T, size_t D0>
constexpr bool operator== (NdArray< Simd< T, 4 >, D0 > const &lhs, NdArray< Simd< T, 4 >, D0 > const &rhs)
template<typename T, size_t D0, size_t... DIMS>
constexpr bool operator== (NdArray< T, D0, DIMS... > const &lhs, NdArray< T, D0, DIMS... > const &rhs)
template<class T, int N, class RHS>
Simd< T, N > & operator^= (Simd< T, N > &lhs, RHS rhs)
template<class T, int N, class RHS>
Simd< T, N > & operator|= (Simd< T, N > &lhs, RHS rhs)
template<class T, int N>
Simd< T, N > operator|| (Simd< T, N > lhs, Simd< T, N > rhs)
template<typename T>
constexpr NdArray< T, 2 > OrthogonalVector (NdArray< T, 2 > const &vec)
template<typename T>
constexpr NdArray< T, 3 > OrthogonalVector (NdArray< T, 3 > const &vec)
template<typename T, int N>
Simd< T, 4 > OrthogonalVector3 (Simd< T, 4 > a)
template<class T>
Simd< T, 4 > OrthogonalVector3 (Simd< T, 4 > a)
template<typename T>
constexpr NdArray< T, 2, 2 > Outer (NdArray< T, 2 > const &a, NdArray< T, 2 > const &b)
template<typename T>
constexpr NdArray< T, 3, 2 > Outer (NdArray< T, 3 > const &a, NdArray< T, 2 > const &b)
template<typename T>
constexpr NdArray< T, 3, 3 > Outer (NdArray< T, 3 > const &a, NdArray< T, 3 > const &b)
template<typename T>
NdArray< Simd< T, 4 >, 2, 2 > Outer2 (Simd< T, 4 > const &a, Simd< T, 4 > const &b)
template<typename T>
NdArray< Simd< T, 4 >, 3, 3 > Outer3 (NdArray< Simd< T, 4 >, 3 > const &mat, Simd< T, 4 > const &vec)
template<typename T>
NdArray< Simd< T, 4 >, 3, 3, 3 > Outer3 (NdArray< Simd< T, 4 >, 3 > const &mat0, NdArray< Simd< T, 4 >, 3 > const &mat1)
template<typename T>
NdArray< Simd< T, 4 >, 3, 3, 3 > Outer3 (NdArray< Simd< T, 4 >, 3, 3 > const &ten, Simd< T, 4 > const &vec)
template<typename T>
NdArray< Simd< T, 4 >, 3 > Outer3 (Simd< T, 4 > a, Simd< T, 4 > b)
template<typename T>
NdArray< Simd< T, 4 >, 3, 3 > Outer3 (Simd< T, 4 > const &vec, NdArray< Simd< T, 4 >, 3 > const &mat)
template<typename T>
NdArray< Simd< T, 4 >, 3, 3, 3 > Outer3 (Simd< T, 4 > const &vec, NdArray< Simd< T, 4 >, 3, 3 > const &ten)
template<typename T>
NdArray< Simd< T, 4 >, 2 > OuterSym3 (Simd< T, 4 > a, Simd< T, 4 > b)
template<typename B, typename E>
constexpr B Pow (B base, E exp)
template<typename T, size_t N>
constexpr T Prod (NdArray< T, N > const &a)
template<typename T>
void PseudoInvert (NdArray< T, 3, 2 > const &a, NdArray< T, 2, 3 > *outInv, T *outDet)
Quaternion QuaternionFromMatrix (Matrix3x3r const &matrix, real eps=1e-3_r)
Quaternion QuaternionFromMatrix (VMatrix3x3r const &matrix, real eps=1e-3_r)
template<typename T>
constexpr T Rcp (T a)
template<class T, int N>
Simd< T, N > RcpApprox (Simd< T, N > a)
template<typename T>
constexpr T RcpApprox (T a)
template<class T, int N>
Simd< T, N > RcpSqrtApprox (Simd< T, N > a)
template<typename T, size_t N, bool MinInclusiveT, bool MaxInclusiveT>
constexpr NdArray< T, N > Rect (NdArray< T, N > const &a, NdArray< T, N > const &min, NdArray< T, N > const &max, std::integral_constant< bool, MinInclusiveT > minInclusive=std::true_type{}, std::integral_constant< bool, MaxInclusiveT > maxInclusive=std::false_type{})
template<typename ValT, typename MinT, typename MaxT, bool kMinInclusive, bool kMaxInclusive>
constexpr ValT Rect (ValT value, MinT min, MaxT max, std::integral_constant< bool, kMinInclusive >=std::true_type{}, std::integral_constant< bool, kMaxInclusive >=std::false_type{})
template<typename T>
constexpr T Remap (T value, T inA, T inB, T outA, T outB)
template<typename T>
constexpr T RemapAndClamp (T value, T inA, T inB, T outA, T outB)
TransformRT Repivot (TransformRT const &transform, Real3 const &pivot)
template<typename T, size_t N>
constexpr NdArray< T, N > Round (NdArray< T, N > const &a)
template<typename T>
constexpr T Round (T a)
template<typename T>
constexpr T RoundDown (T numToRound, T multiple)
template<typename T>
constexpr T RoundUp (T numToRound, T multiple)
template<typename T>
constexpr T Select (bool condition, T a, T b)
template<class T, int N, class MaskT>
Simd< T, N > Select (Simd< MaskT, N > conditionMask, Simd< T, N > a, Simd< T, N > b)
template<class V>
Sequence ()
template<class T, int N>
Simd< T, N > Set (Simd< T, N > a, int i, T value)
template<int i, class T, int N>
Simd< T, N > Set (Simd< T, N > a, T value)
void SetLogCallback (LogFn fn)
void SetRotationVector (Real3 const &rotVec, TransformRT &outTransform)
void SetRotationVector (Vec4r const &rotVec, TransformRT &outTransform)
template<int kShift, class T, int N>
Simd< T, N > ShiftRight (Simd< T, N > a)
template<int x = 0, int y = 1, class T>
Simd< T, 2 > Shuffle (Simd< T, 2 > a)
template<int x = 0, int y = 1, int z = 2, int w = 3, class T>
Simd< T, 4 > Shuffle (Simd< T, 4 > a)
template<int x, int y, int z, int w, class T>
Simd< T, 4 > Shuffle (Simd< T, 4 > a, Simd< T, 4 > b)
template<typename T>
constexpr T Sign (T x)
template<typename T>
constexpr T SignedSqr (T a)
template<typename T>
constexpr T SignedSqrt (T a)
template<int i, class V = Vec4r>
SimdBasisVector ()
template<class V = Vec4r>
SimdBasisVector (int axis)
template<typename T>
NdArray< Simd< T, 4 >, 2 > SimdFullToSym (NdArray< Simd< T, 4 >, 3 > const &m)
template<typename T>
Simd< T, 4 > SimdFullToSym (Simd< T, 4 > const &m)
template<class V, class... MoreBools>
SimdMask (bool b0, bool b1, MoreBools... bs)
template<typename T>
NdArray< Simd< T, 4 >, 3 > SimdSymToFull (NdArray< Simd< T, 4 >, 2 > const &m)
template<typename T>
Simd< T, 4 > SimdSymToFull (Simd< T, 4 > const &m)
template<class V = Vec4r>
SimdZero ()
template<class T, int N>
Simd< T, N > Sin (Simd< T, N > a)
template<typename T>
constexpr T Sin (T a)
template<typename T>
constexpr T Sinc (T a)
template<class T, int N>
std::pair< Simd< T, N >, Simd< T, N > > SinCos (Simd< T, N > a)
template<typename T>
constexpr NdArray< T, 3, 3 > Skew (NdArray< T, 3 > const &v)
template<typename T>
constexpr NdArray< Simd< T, 4 >, 3 > Skew3 (Simd< T, 4 > const &vector)
Quaternion Slerp (Quaternion a, Quaternion b, real t)
template<typename T>
constexpr T Sqr (T a)
template<class T, int N>
Simd< T, N > Sqrt (Simd< T, N > a)
template<typename T>
constexpr T Sqrt (T a)
template<typename To, typename From, std::enable_if_t< std::is_arithmetic_v< From > &&std::is_arithmetic_v< To >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
constexpr To StaticCast (From const &a)
template<class To, class From, std::enable_if_t< IsSimd< To > &&IsSimd< From >, superdex::ConceptMatch >>
To StaticCast (From const &a)
template<class To, class FromT, int FromN>
requires (IsSimd<To> && Simd<FromT, FromN>::kIsSupported)
To StaticCast (Simd< FromT, FromN > const &in)
template<class VecTo, class VecFrom, std::enable_if_t< IsSimd< VecTo > &&IsSimd< VecFrom >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
VecTo StaticCast (VecFrom const &a)
 StaticCast from one Simd type to another of the same size.
template<int COUNT = -1, class T, int N>
void Store (T *ptr, Simd< T, N > a)
template<class T, int N>
void Store (T *ptr, Simd< T, N > a, int count)
template<size_t D0, size_t D1, typename T>
void StoreMatrix (NdArray< T, D0, D1 > &out, NdArray< Simd< T, 4 >, D0 > const &x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void StoreMatrix (NdArray< T, D0, D1, D2, D3 > &out, NdArray< Simd< T, 4 >, D0, D1, D2 > const &x)
template<size_t D0, size_t D1, typename T>
void StoreMatrix (Span< T > out, NdArray< Simd< T, 4 >, D0 > const &x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void StoreMatrix (T *out, NdArray< Simd< T, 4 >, D0, D1, D2 > const &x)
template<size_t D0, size_t D1, typename T>
void StoreMatrix (T *outData, NdArray< Simd< T, 4 >, D0 > const &x)
template<class T, int N, class MaskT>
int StoreSelected (T *ptr, Simd< MaskT, N > condition, Simd< T, N > values)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void StoreSubmatrix (NdArray< T, D2, D3 > &out, Int2 coords, NdArray< Simd< T, 4 >, D0 > const &x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void StoreSubmatrix (Span< T > out, Int2 coords, NdArray< Simd< T, 4 >, D0 > const &x)
template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void StoreSubmatrix (T *out, Int2 coords, NdArray< Simd< T, 4 >, D0 > const &x)
template<int kTupleCount = -1, class T, int N>
void StoreTransposed (T *ptr, Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<int kTupleCount = -1, class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
void StoreTransposed (typename V::Scalar *ptr, NdArray< V, 3 > const &src)
template<typename T, size_t N>
constexpr T Sum (NdArray< T, N > const &a)
template<typename T>
constexpr NdArray< T, 2, 2 > SymMatrix2x2 (T a00, T a01, T a11)
template<class T, int N>
Simd< T, N > Tan (Simd< T, N > a)
template<typename T>
constexpr T Tan (T a)
template<class T, int N>
Simd< T, N > Tanh (Simd< T, N > a)
constexpr Float3 ToFloat3 (Color const &color)
 Converts a Color to a normalized Float3 vector (RGB only).
constexpr Float4 ToFloat4 (Color const &color)
 Converts a Color to a normalized Float4 vector (RGBA).
Matrix3x3r ToMatrix3x3 (Quaternion const &q)
MatrixTransformRT ToMatrixTransformRT (Quaternion const &rot, Real3 const &trans)
MatrixTransformRT ToMatrixTransformRT (TransformRT const &a)
template<typename T>
NdArray< T, 4, 4 > ToNdArray (NdArray< Simd< T, 4 >, 4 > m)
template<typename T>
NdArray< T, 2, 2 > ToNdArray2x2 (Simd< T, 4 > m)
template<typename T>
NdArray< T, 3, 3 > ToNdArray3x3 (NdArray< Simd< T, 4 >, 3 > m)
template<typename T>
NdArray< T, 2, 2 > ToNdArraySym2x2 (Simd< T, 4 > m)
template<typename T>
NdArray< T, 3, 3 > ToNdArraySym3x3 (NdArray< Simd< T, 4 >, 2 > m)
template<typename T>
NdArray< T, 3, 3, 3 > ToNdArrayTensor (NdArray< Simd< T, 4 >, 3, 3 > const &t)
template<typename T>
NdArray< T, 3, 3, 3, 3 > ToNdArrayTensor (NdArray< Simd< T, 4 >, 3, 3, 3 > const &t)
template<typename T>
Real2 ToReal2 (Simd< T, 4 > v)
template<typename T>
Real3 ToReal3 (Simd< T, 4 > v)
template<typename T>
Real4 ToReal4 (Simd< T, 4 > v)
template<typename T>
Simd< T, 4 > ToSimd (NdArray< T, 2 > const &v, T z=T(0), T w=T(0))
template<typename T>
Simd< T, 4 > ToSimd (NdArray< T, 3 > const &v, T w=T(0))
template<typename T>
Simd< T, 4 > ToSimd (NdArray< T, 4 > v)
template<class V>
ToSimdDirection (V a)
template<typename T>
Simd< T, 4 > ToSimdFromSymComponents2x2 (T a00, T a01, T a11)
template<typename T>
Simd< T, 4 > ToSimdMatrix (NdArray< T, 2, 2 > const &m)
template<typename T>
NdArray< Simd< T, 4 >, 3 > ToSimdMatrix (NdArray< T, 3, 3 > const &m)
template<typename T>
NdArray< Simd< T, 4 >, 4 > ToSimdMatrix (NdArray< T, 4, 4 > const &m)
template<class V>
ToSimdPoint (V a)
template<typename T>
Simd< T, 4 > ToSimdSymMatrix (NdArray< T, 2, 2 > const &m)
template<typename T>
NdArray< Simd< T, 4 >, 2 > ToSimdSymMatrix (NdArray< T, 3, 3 > const &m)
template<typename T>
NdArray< Simd< T, 4 >, 3, 3 > ToSimdTensor (NdArray< T, 3, 3, 3 > const &t)
template<typename T>
NdArray< Simd< T, 4 >, 3, 3, 3 > ToSimdTensor (NdArray< T, 3, 3, 3, 3 > const &t)
TransformRT ToTransformRT (MatrixTransformRT const &a)
VMatrix3x3r ToVMatrix3x3 (Quaternion const &q)
std::pair< VMatrix3x3r, VMatrix3x3rToVMatrix3x3_WithTranspose (Quaternion const &q)
VMatrix3x3r ToVMatrix3x3Transpose (Quaternion const &q)
VMatrix4x4r ToVMatrix4x4 (MatrixTransformRT const &a)
VMatrix4x4r ToVMatrix4x4 (TransformRT const &a)
VMatrix4x4r ToVMatrix4x4Transpose (MatrixTransformRT const &a)
VMatrix4x4r ToVMatrix4x4Transpose (TransformRT const &a)
template<typename T, size_t DimTotal = 3, size_t DimTrace = DimTotal>
constexpr T Trace (NdArray< T, DimTotal, DimTotal > const &mat)
template<typename T>
constexpr T Trace2x2 (Simd< T, 4 > const &mat)
template<typename T>
constexpr T Trace3x3 (NdArray< Simd< T, 4 >, 3 > const &mat)
template<typename T, size_t N, size_t M>
constexpr NdArray< T, M, N > Transpose (NdArray< T, N, M > const &mat)
template<typename T>
Simd< T, 4 > Transpose2x2 (Simd< T, 4 > const &m)
template<typename T, size_t D0>
NdArray< Simd< T, 4 >, 3 > Transpose3x3 (NdArray< Simd< T, 4 >, D0 > const &m)
template<typename T>
NdArray< Simd< T, 4 >, 4 > Transpose4x4 (NdArray< Simd< T, 4 >, 4 > const &m)
template<typename T>
constexpr T TripleProduct (NdArray< T, 3 > const &a, NdArray< T, 3 > const &b, NdArray< T, 3 > const &c)
template<typename T, size_t N>
Simd< T, 4 > VDet3x3 (NdArray< Simd< T, 4 >, N > const &A)
template<size_t N, typename T>
NdArray< Simd< T, 4 >, N > VDiagonalMatrix (Simd< T, 4 > const &diagonalVector)
template<size_t N, typename T>
NdArray< Simd< T, 4 >, N > VDiagonalMatrix (T valueOnDiagonal)
template<int COUNT = -1, class V>
VDot (V a, V b)
template<typename T = real>
NdArray< Simd< T, 4 >, 3, 3 > VDSkew3 ()
template<class V>
VEqual (V a, V b)
template<size_t N, typename T = real>
NdArray< Simd< T, 4 >, N > VEye ()
VMatrix3x3r VGetRotationMatrix (TransformRT const &transform)
template<class T, int DN, size_t D0, size_t... DIMS>
Simd< T, DN > VIsFinite (NdArray< Simd< T, DN >, D0, DIMS... > const &a)
 Per-lane finiteness check on a SIMD-typed NdArray.
Vec4r VIsFinite (Quaternion const &q)
template<class T, int N>
Simd< T, N > VIsFinite (Simd< T, N > a)
Vec4r VIsFinite (TransformRT const &a)
template<typename T, size_t D0, int D1>
Simd< T, D1 > VNearEqual (NdArray< Simd< T, D1 >, D0 > const &a, NdArray< Simd< T, D1 >, D0 > const &b, Simd< T, D1 > epsilon=kDefaultNearEqualEpsilon< T >)
template<class V>
VNearEqual (V a, V b, V epsilon)
template<class V>
VNearZero (V a, V epsilon)
template<int COUNT = -1, class T, int N>
Simd< T, N > VNorm (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
Simd< T, N > VNormSqr (Simd< T, N > a)
template<class V>
VNotEqual (V a, V b)

Variables

constexpr int kAutoLinearSolverMaxIter = -1
 Sentinel value for LinearSolverParams::maxIter that lets Mochi automatically select the maximum number of linear solver iterations.
constexpr real kDefaultAnisoAlpha = 1000_r
 Default anisotropic stiffness (α) [Pa].
constexpr real kDefaultAnisoLength = 1_r
 Default anisotropic reference length (dimensionless).
constexpr real kDefaultArapStiffness = 1000_r
 Default ARAP stiffness (μ) [Pa].
constexpr real kDefaultDensity = 1000_r
 Default material density [kg/m³].
constexpr Real3 kDefaultGravity = {0_r, -9.8_r, 0_r}
 Default gravity acceleration in world frame [m/s²].
template<typename T>
constexpr T kDefaultNearEqualEpsilon {0}
template<>
constexpr double kDefaultNearEqualEpsilon< double > {1.0e-6}
template<>
constexpr float kDefaultNearEqualEpsilon< float > {1.0e-6f}
template<class T, int N>
Simd< T, N > const kDefaultNearEqualEpsilon< Simd< T, N > > {kDefaultNearEqualEpsilon<T>}
constexpr real kDefaultPoissonRatio = 0.45_r
 Default Poisson's ratio (dimensionless).
constexpr real kDefaultRelStepTol = 10_r * std::numeric_limits<real>::epsilon()
 Default tolerance for the L2 norm of the non-linear solver's raw linear-solve increment.
constexpr real kDefaultYoungsModulus = 1e5_r
 Default Young's modulus [Pa].
constexpr real kDegreesPerRadian = 180_r / kPI
static constexpr NdArray< real, 3, 3, 3, 3 > kFourthOrderEye = FourthOrderEye()
static constexpr NdArray< real, 3, 3, 3, 3 > kFourthOrderEyeSym = FourthOrderEyeSym()
static constexpr real kGridSdfDefaultBoundaryPadding
 Default value for GridSdfParams::boundaryPaddingDist [m].
constexpr real kInf = std::numeric_limits<real>::infinity()
constexpr Real3 kInf3 = {kInf, kInf, kInf}
constexpr uint64_t kInvalidHandle = 0
 Default value for an invalid handle.
static constexpr NdArray< real, 3, 3, 3, 3 > kIouterI = IouterI()
template<typename T>
static constexpr bool kIsNdArray = IsNdArray<std::decay_t<T>>::value
template<typename T>
constexpr bool kIsResizeNoInitSafe = IsResizeNoInitSafe<T>::value
 Helper variable template for IsResizeNoInitSafe.
constexpr int kMeshDataSpaceDim = 3
 Spatial dimensionality of mesh data.
constexpr Real2 kMinus2PiPlus2Pi = {-2_r * kPI, 2_r * kPI}
template<typename T>
constexpr T kMinusOne = T{0} - 1
constexpr real kPI = 3.14159265358979323846_r
constexpr real kRadiansPerDegree = kPI / 180_r
constexpr Real3 kReal3Ones = {1_r, 1_r, 1_r}
constexpr Real3 kReal3XAxis = {1_r, 0_r, 0_r}
constexpr Real3 kReal3YAxis = {0_r, 1_r, 0_r}
constexpr Real3 kReal3ZAxis = {0_r, 0_r, 1_r}
constexpr Real3 kReal3Zeros = {0_r, 0_r, 0_r}
constexpr NdArray< real, 3, 3 > kSecondOrderIdentity
constexpr int kSentinelIndex = -1
template<class T>
constexpr int kSimdDefaultSize = Unsupported architecture / sizeof(T)
constexpr real kSqrt2 = 1.41421356237309504880_r
constexpr real kSqrt3Over2 = 0.86602540378443864676_r
constexpr real kSqrtPi = 1.772453850905515881919427556567825376987457275390625_r
constexpr Real2 kUnitInterval = {0_r, 1_r}

Typedef Documentation

◆ Color

using superdex::Color = NdArray<uint8_t, 4>

RGBA color representation using 4 bytes (0-255 per channel) in RGBA order.

Used primarily for debug visualization.

Definition at line 33 of file color.h.

◆ Double2

using superdex::Double2 = NdArray<double, 2>

Definition at line 117 of file nd_array.h.

◆ Double3

using superdex::Double3 = NdArray<double, 3>

Definition at line 118 of file nd_array.h.

◆ Double4

using superdex::Double4 = NdArray<double, 4>

Definition at line 119 of file nd_array.h.

◆ DynamicString

using superdex::DynamicString = std::basic_string<char, std::char_traits<char>, StlAllocator<char>>

Alias for std::string using a polymorphic superdex::Allocator pointer.

Note
It is safe to return this type of string from a DLL exported method (unlike std::string).
DynamicString myString; // Uses GetDefaultAllocator()
DynamicString myStringWithValue("Hello!"); // Uses GetDefaultAllocator()
DynamicString myAllocatedString(&allocator);
DynamicString myAllocatedStringWithValue("Hello!", &allocator);
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > DynamicString
Alias for std::string using a polymorphic superdex::Allocator pointer.

Definition at line 39 of file dynamic_string.h.

◆ Float2

using superdex::Float2 = NdArray<float, 2>

Definition at line 112 of file nd_array.h.

◆ Float3

using superdex::Float3 = NdArray<float, 3>

Definition at line 113 of file nd_array.h.

◆ Float4

using superdex::Float4 = NdArray<float, 4>

Definition at line 114 of file nd_array.h.

◆ Int2

using superdex::Int2 = NdArray<int, 2>

Definition at line 137 of file nd_array.h.

◆ Int3

using superdex::Int3 = NdArray<int, 3>

Definition at line 138 of file nd_array.h.

◆ Int4

using superdex::Int4 = NdArray<int, 4>

Definition at line 139 of file nd_array.h.

◆ LogFn

using superdex::LogFn = std::function<void(LogChannel, char const* message, char const* file, int line)>

Definition at line 65 of file log.h.

◆ Matrix2x2f

using superdex::Matrix2x2f = NdArray<float, 2, 2>

Definition at line 129 of file nd_array.h.

◆ Matrix2x2r

Definition at line 122 of file nd_array.h.

◆ Matrix2x3f

using superdex::Matrix2x3f = NdArray<float, 2, 3>

Definition at line 130 of file nd_array.h.

◆ Matrix2x3r

Definition at line 123 of file nd_array.h.

◆ Matrix3x2f

using superdex::Matrix3x2f = NdArray<float, 3, 2>

Definition at line 131 of file nd_array.h.

◆ Matrix3x2r

Definition at line 124 of file nd_array.h.

◆ Matrix3x3f

using superdex::Matrix3x3f = NdArray<float, 3, 3>

Definition at line 132 of file nd_array.h.

◆ Matrix3x3r

Definition at line 125 of file nd_array.h.

◆ Matrix4x3f

using superdex::Matrix4x3f = NdArray<float, 4, 3>

Definition at line 133 of file nd_array.h.

◆ Matrix4x3r

Definition at line 126 of file nd_array.h.

◆ Matrix4x4f

using superdex::Matrix4x4f = NdArray<float, 4, 4>

Definition at line 134 of file nd_array.h.

◆ Matrix4x4r

Definition at line 127 of file nd_array.h.

◆ NeoHookeanMaterialParams

◆ OnAssertFn

Initial value:
std::function<bool(char const* condition, char const* message, char const* file, int line)>

Callback invoked when an assertion fails.

Receives the failed condition, formatted message, source file, and source line. Return true to break execution at the failure site.

Definition at line 140 of file debug.h.

◆ real

using superdex::real = float

Definition at line 115 of file mochi_config.h.

◆ Real1

Definition at line 104 of file nd_array.h.

◆ Real2

Definition at line 105 of file nd_array.h.

◆ Real3

Definition at line 106 of file nd_array.h.

◆ Real4

Definition at line 107 of file nd_array.h.

◆ Real5

Definition at line 108 of file nd_array.h.

◆ Real6

Definition at line 109 of file nd_array.h.

◆ Tensor3x3x3f

using superdex::Tensor3x3x3f = NdArray<float, 3, 3, 3>

Definition at line 146 of file nd_array.h.

◆ Tensor3x3x3r

using superdex::Tensor3x3x3r = NdArray<real, 3, 3, 3>

Definition at line 143 of file nd_array.h.

◆ Tensor3x3x3x3f

using superdex::Tensor3x3x3x3f = NdArray<float, 3, 3, 3, 3>

Definition at line 145 of file nd_array.h.

◆ Tensor3x3x3x3r

using superdex::Tensor3x3x3x3r = NdArray<real, 3, 3, 3, 3>

Definition at line 142 of file nd_array.h.

◆ Vec2d

using superdex::Vec2d = Simd<double, 2>

Definition at line 200 of file simd.h.

◆ Vec2l

using superdex::Vec2l = Simd<int64_t, 2>

Definition at line 201 of file simd.h.

◆ Vec4d

using superdex::Vec4d = Simd<double, 4>

Definition at line 202 of file simd.h.

◆ Vec4f

using superdex::Vec4f = Simd<float, 4>

Definition at line 203 of file simd.h.

◆ Vec4i

using superdex::Vec4i = Simd<int, 4>

Definition at line 204 of file simd.h.

◆ Vec4l

using superdex::Vec4l = Simd<int64_t, 4>

Definition at line 205 of file simd.h.

◆ Vec4r

using superdex::Vec4r = Simd<real, 4>

Definition at line 206 of file simd.h.

◆ Vec8d

using superdex::Vec8d = Simd<double, 8>

Definition at line 207 of file simd.h.

◆ Vec8f

using superdex::Vec8f = Simd<float, 8>

Definition at line 208 of file simd.h.

◆ Vec8i

using superdex::Vec8i = Simd<int, 8>

Definition at line 209 of file simd.h.

◆ Vec8l

using superdex::Vec8l = Simd<int64_t, 8>

Definition at line 210 of file simd.h.

◆ Vec8r

using superdex::Vec8r = Simd<real, 8>

Definition at line 211 of file simd.h.

◆ VMatrix2x2f

using superdex::VMatrix2x2f = Simd<float, 4>

Definition at line 42 of file vmatrix.h.

◆ VMatrix2x2r

Special case for the SIMD representation of a 2x2 matrix.

Stores the matrix entries following a flattened row-major layout. That is, in the order (a, c, d, b), corresponding to the matrix: | a c | | d b |

Definition at line 41 of file vmatrix.h.

◆ VMatrix2x3f

using superdex::VMatrix2x3f = NdArray<Simd<float, 4>, 2>

Definition at line 58 of file vmatrix.h.

◆ VMatrix2x3r

Definition at line 50 of file vmatrix.h.

◆ VMatrix2x4f

using superdex::VMatrix2x4f = NdArray<Simd<float, 4>, 2>

Definition at line 59 of file vmatrix.h.

◆ VMatrix2x4r

Definition at line 51 of file vmatrix.h.

◆ VMatrix3x2f

using superdex::VMatrix3x2f = NdArray<Simd<float, 4>, 3>

Definition at line 57 of file vmatrix.h.

◆ VMatrix3x2r

SIMD representation of a NxM matrices.

Stores the matrix entries in N vectors following the standard-row major layout, with as many padding entries as necessary (ok, only either 0 or 1).

Definition at line 49 of file vmatrix.h.

◆ VMatrix3x3d

using superdex::VMatrix3x3d = NdArray<Simd<double, 4>, 3>

Definition at line 65 of file vmatrix.h.

◆ VMatrix3x3f

using superdex::VMatrix3x3f = NdArray<Simd<float, 4>, 3>

Definition at line 60 of file vmatrix.h.

◆ VMatrix3x3r

Definition at line 52 of file vmatrix.h.

◆ VMatrix3x4f

using superdex::VMatrix3x4f = NdArray<Simd<float, 4>, 3>

Definition at line 61 of file vmatrix.h.

◆ VMatrix3x4r

Definition at line 53 of file vmatrix.h.

◆ VMatrix4x3f

using superdex::VMatrix4x3f = NdArray<Simd<float, 4>, 4>

Definition at line 62 of file vmatrix.h.

◆ VMatrix4x3r

Definition at line 54 of file vmatrix.h.

◆ VMatrix4x4f

using superdex::VMatrix4x4f = NdArray<Simd<float, 4>, 4>

Definition at line 63 of file vmatrix.h.

◆ VMatrix4x4r

Definition at line 55 of file vmatrix.h.

◆ VSymMatrix2x2f

using superdex::VSymMatrix2x2f = Simd<float, 4>

Definition at line 85 of file vmatrix.h.

◆ VSymMatrix2x2r

Special case for the SIMD representation of a 2x2 symmetric matrix.

Stores the matrix entries in the order (a, c, b, ?), corresponding to the symmetric matrix: | a c | | c b |

Definition at line 84 of file vmatrix.h.

◆ VSymMatrix3x3f

using superdex::VSymMatrix3x3f = NdArray<Simd<float, 4>, 2>

Definition at line 97 of file vmatrix.h.

◆ VSymMatrix3x3r

Special case for the SIMD representation of a 3x3 symmetric matrix.

Stores the matrix entries in two vectors, containing the diagonal terms (a, b, c, ?) and the off-diagonal terms (d, e, f, ?). Corresponds to the symmetric matrix: | a d e | | d b f | | e f c |

Definition at line 96 of file vmatrix.h.

◆ VTensor3x3x3f

using superdex::VTensor3x3x3f = NdArray<Simd<float, 4>, 3, 3>

Definition at line 75 of file vmatrix.h.

◆ VTensor3x3x3r

Definition at line 71 of file vmatrix.h.

◆ VTensor3x3x3x3f

using superdex::VTensor3x3x3x3f = NdArray<Simd<float, 4>, 3, 3, 3>

Definition at line 74 of file vmatrix.h.

◆ VTensor3x3x3x3r

using superdex::VTensor3x3x3x3r = NdArray<Simd<real, 4>, 3, 3, 3>

SIMD representation of tensors.

Definition at line 70 of file vmatrix.h.

◆ VTensor4x3x3r

Definition at line 72 of file vmatrix.h.

Enumeration Type Documentation

◆ ActorBoundaryElementType

Two-dimensional discretization element types for actor boundary integrals.

Note
PxQy indicates x-th order elements with y quadrature points.
Enumerator
P1Q1 

Linear elements (P1), Dunavant quadrature with 1 point (Q1).

P1Q3 

Linear elements (P1), Dunavant quadrature with 3 points (Q3).

P1Q6 

Linear elements (P1), Dunavant quadrature with 6 points (Q6).

ExperimentalP1Q7 

[Experimental] Linear elements (P1), Lyness-Jespersen quadrature with 7 points (Q7).

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
ExperimentalP1Q12 

[Experimental] Linear elements (P1), Dunavant quadrature with 12 points (Q12).

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
ExperimentalP1Q16 

[Experimental] Linear elements (P1), Lyness-Jespersen quadrature with 16 points (Q16).

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Count 

Number of actor boundary element type enum values.

Default 

Default actor boundary element type.

Definition at line 49 of file mochi_enums.h.

◆ ActorSegmentElementType

One-dimensional discretization element types for actor segment integrals.

Note
PxQy indicates x-th order elements with y quadrature points.
Enumerator
P1Q1 

Linear elements (P1), Gauss-Legendre quadrature with 1 point (Q1).

P1Q2 

Linear elements (P1), Gauss-Legendre quadrature with 2 points (Q2).

P1Q3 

Linear elements (P1), Gauss-Legendre quadrature with 3 points (Q3).

Count 

Number of actor segment element type enum values.

Default 

Default actor segment element type.

Definition at line 67 of file mochi_enums.h.

◆ ActorType

enum class superdex::ActorType
strong

Type of actor.

See also
Actor, Actor::GetType
Enumerator
None 

Invalid actor type.

Rigid 

Rigid body actor.

Soft 

Volumetric deformable actor.

Articulated 

Articulated actor composed of rigid links connected by joints.

Shell 

[Experimental] Thin-shell actor for modeling cloth, membranes, and other thin-walled objects.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Rod 

[Experimental] Rod actor for thin elastic rods.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Count 

Number of actor type enum values.

Definition at line 25 of file mochi_enums.h.

◆ ArticulatedJointType

enum class superdex::ArticulatedJointType
strong

Types of joints in an articulated body.

Enumerator
Free 

6-DoF joint. Unconstrained relative motion between links.

Prismatic 

1-DoF translational joint along a single axis.

Revolute 

1-DoF rotational joint around a single axis.

Spherical 

3-DoF rotational joint (ball-and-socket).

Hard 

0-DoF rigid (weld) joint. No relative motion between links.

Cycle 

Cycle-closing joint in closed-loop topologies.

Count 
Invalid 

Definition at line 75 of file articulated_body_params.h.

◆ BoundarySubsamplingStrategy

Strategy for selecting the active boundary faces when subsampling boundary integrals.

Enumerator
UniformProbability 

Select boundary faces with uniform probability.

Note
Results in sample density following mesh resolution. Areas with more triangles have more samples.
Active boundary faces are selected deterministically using uniformly-spaced indices.
AreaProportional 

Select boundary faces with probability proportional to their area.

Note
Larger faces have higher selection probability.
Results in more uniform spatial distribution of sample points, independent of mesh resolution.
Count 

Number of boundary subsampling strategy enum values.

Definition at line 41 of file mochi_enums.h.

◆ ColliderType

enum class superdex::ColliderType
strong

Collision detection geometry for an Actor.

Note
This setting controls how OTHER actors detect contact with this actor. It does not affect how this actor detects contact with other actors.
Enumerator
None 

No collision representation.

Other actors cannot detect contact with this actor.

Note
It does NOT prevent this actor from detecting contact with other actors.
Auto 

Automatic collider type selection based on the actor's shape.

Note
Mochi will select the most appropriate collider type based on the actor's shape and type:
If Auto is set on an actor, a valid collider type will be assigned even if the shape's default collider type is ColliderType::None. If you want ColliderType::None, set ColliderType::None explicitly as your collider type.
After initialization, Actor::GetColliderType will return the selected type, not ColliderType::Auto.
Sphere 

Represent the actor by an approximating sphere derived from its bounding volume.

Note
For shapes with a sphere bounding volume, that sphere is used. For shapes with an OBB/AABB bounding volume, the inscribed sphere is used. Otherwise, a true bounding sphere is computed.
Fast but only accurate for spherical geometries.
Only supported for rigid actors and articulated links.
Box 

Represent the actor by its axis-aligned bounding box (AABB), in the actor's local frame.

Note
Fast but only accurate for box geometries.
Only supported for rigid actors and articulated links.
Mesh 

[Experimental] Represent the actor by its surface mesh.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Note
Performance is slow.
Only supported for rigid actors and articulated links.
Plane 

Represent the actor as an infinite plane.

Note
Only supported for static rigid actors whose shape is an implicit plane.
Sdf 

Grid-based Signed Distance Field (SDF) collision representation.

Note
Uses a 3D grid storing the distance to the closest point in the actor's surface.
Accurate for closed non-intersecting geometries provided the grid resolution is sufficient.
If the grid is not baked in the actor's Shape, it is computed at initialization (expensive).
Also supported for soft actors via SDF mapping.
See also
GridSdfParams
PointCloud 

Point-cloud collision representation.

Contacts are detected by proximity queries between collider-side sample points and colliding-side sample points. Only other point-cloud colliders can collide with this type.

Count 

Number of collider type enum values.

Definition at line 335 of file contact_params.h.

◆ ConceptMatch

enum class superdex::ConceptMatch
strong
Enumerator
True 

Definition at line 757 of file mochi_platform.h.

◆ ConstraintType

enum class superdex::ConstraintType
strong

Type of constraint acting on actors' degrees of freedom.

Each constraint type enforces specific relationships between actor DoFs, such as fixing positions, limiting joint ranges, or maintaining rigid connections. The type determines which constraint methods are applicable and what parameters are required.

See also
Constraint, Constraint::GetType
Enumerator
None 

Invalid constraint type.

ArticulatedSingleDofRange 

Range constraint on a single articulated DoF.

Limits the DoF value to [min, max].

See also
Scene::CreateArticulatedSingleDofRangeConstraint, ArticulatedSingleDofRangeConstraintParams
Articulated3dRotationRange 

Range constraint on the DoFs of an articulated 3D rotation.

Limits DoF values to [min, max].

See also
Scene::CreateArticulated3dRotationRangeConstraint, Articulated3dRotationRangeConstraintParams
ArticulatedSingleDofTarget 

Target constraint on a single articulated DoF.

Drives the DoF toward a target value.

See also
Scene::CreateArticulatedSingleDofTargetConstraint, ArticulatedSingleDofTargetConstraintParams
Articulated3dRotationTarget 

Target constraint on the DoFs of an articulated 3D rotation.

Drives rotation DoFs toward target values.

See also
Scene::CreateArticulated3dRotationTargetConstraint, Articulated3dRotationTargetConstraintParams
JointRotationRange 

Range constraint on joint rotation.

Limits joint angles to specified bounds.

See also
Scene::CreateJointRotationRangeConstraint, JointRotationRangeConstraintParams
JointRotationTracking 

Tracking constraint on joint rotation.

Drives joint toward target orientation.

See also
Scene::CreateJointRotationTrackingConstraint, JointRotationTrackingConstraintParams
RigidPivotPosition 

Position constraint on a rigid actor's pivot point.

Fixes or tracks a world-space position.

See also
Scene::CreateRigidPivotPositionConstraint, RigidPivotPositionConstraintParams
RigidPivotToRigidTarget 

Position constraint that drives a rigid actor's pivot point toward where that same local point would be if the actor's center-of-mass frame matched a target transform.

See also
Scene::CreateRigidPivotToRigidTargetConstraint, RigidPivotToRigidTargetConstraintParams
RigidPivotRotation 

Rotation constraint on a rigid actor's pivot frame.

Fixes or tracks a world-space orientation.

See also
Scene::CreateRigidPivotRotationConstraint, RigidPivotRotationConstraintParams
RigidPrismaticJoint 

Translational prismatic joint constraint between two rigid actors.

Constrains translation to a single axis. Does not constrain rotation. Pair with ConstraintType::JointRotationTracking for a full prismatic joint.

See also
Scene::CreateRigidPrismaticJointConstraint, RigidPrismaticJointConstraintParams
RigidSphericalJoint 

Spherical joint constraint between two rigid actors.

Allows rotation but no translation.

See also
Scene::CreateRigidSphericalJointConstraint, RigidSphericalJointConstraintParams
DeformableNodePosition 

Position constraint on a deformable actor node.

Fixes or tracks node position in world space.

See also
Scene::CreateDeformableNodePositionConstraint, DeformableNodePositionConstraintParams
DeformableNodeToRigid 

Constraint connecting a deformable node to a rigid actor.

Attaches deformable body to rigid body.

See also
Scene::CreateDeformableNodeToRigidConstraint, DeformableNodeToRigidConstraintParams
DeformableNodeToDeformableNode 

Constraint connecting two deformable actor nodes.

See also
Scene::CreateDeformableNodeToDeformableNodeConstraint, DeformableNodeToDeformableNodeConstraintParams
RodElementRotationToRigid 

Rotation constraint between a rigid actor and a rod element.

Tracks relative rotation.

See also
Scene::CreateRodElementRotationToRigidConstraint, RodElementRotationToRigidConstraintParams
Count 

Number of constraint type enum values.

Definition at line 79 of file mochi_enums.h.

◆ ConvergenceStatus

enum struct superdex::ConvergenceStatus
strong

Convergence status of the non-linear solver.

Enumerator
None 

Convergence status has not been set.

Converged 

Solver converged to the requested tolerance.

Stopped 

Solver met at least one stopping criterion without converging to the requested tolerance.

Diverged 

Solver diverged.

Some form of solution reset may have been used.

Count 

Number of convergence status enum values.

Definition at line 28 of file nonlinear_solver_params.h.

◆ CoordinateSpaceAxes

enum class superdex::CoordinateSpaceAxes : uint16_t
strong

Combination of axis directions for a coordinate space convention.

Each three-letter name gives the semantic direction of positive X, positive Y, and positive Z, respectively. For example, CoordinateSpaceAxes::FLU means X-forward, Y-left, Z-up.

Enumerator
Right 
Left 
Up 
Down 
Forward 
Backward 
RUF 
RUB 
RDF 
RDB 
LUF 
LUB 
LDF 
LDB 
RFU 
RFD 
RBU 
RBD 
LFU 
LFD 
LBU 
LBD 
URF 
URB 
ULF 
ULB 
DRF 
DRB 
DLF 
DLB 
UFR 
UFL 
UBR 
UBL 
DFR 
DFL 
DBR 
DBL 
FRU 
FRD 
FLU 
FLD 
BRU 
BRD 
BLU 
BLD 
FUR 
FUL 
FDR 
FDL 
BUR 
BUL 
BDR 
BDL 
Default 

Definition at line 35 of file coordinate_space.h.

◆ CoulombFrictionModel

enum class superdex::CoulombFrictionModel
strong

Selects which Coulomb friction smoothing model to use.

See also
ContactParams::frictionFalloffVel
Enumerator
C1Regularized 

C1-smoothed Coulomb friction with compact support: friction transitions linearly from 0 to full strength over [0, ContactParams::frictionFalloffVel].

CinfRegularized 

C-infinity regularized Coulomb friction with no compact support: friction asymptotically approaches full strength.

ContactParams::frictionFalloffVel controls the regularization scale.

Count 

Number of friction model enum values.

Default 

Default Coulomb friction model.

Definition at line 298 of file contact_params.h.

◆ FileFormat

enum class superdex::FileFormat
strong
Enumerator
JSON 

JSON format (text).

H5 

HDF5 format (binary). Requires MOCHI_USE_HDF5.

Count 

Definition at line 312 of file model_data.h.

◆ GridSdfResolutionMode

enum struct superdex::GridSdfResolutionMode
strong

The maximum voxel size for an SDF will be determined by one of these measurements scaled by GridSdfParams::resolutionDelta.

Enumerator
LargestAxis 

Use the largest dimension of the mesh's axis-aligned bounding box (AABB) as reference.

SmallestAxis 

Use the smallest dimension of the mesh's AABB as reference.

MeanAxis 

Use the average of all three AABB dimensions as reference.

LargestEdge 

Use the largest edge length in the mesh as reference.

SmallestEdge 

Use the smallest edge length in the mesh as reference.

MeanEdge 

Use the average edge length in the mesh as reference.

Explicit 

Use GridSdfParams::resolutionDelta to set the maximum voxel size in meters (no scaling based on the features of the mesh nor AABB).

Count 

Total number of resolution modes.

Definition at line 31 of file grid_sdf_params.h.

◆ IncludeNestedActors

enum class superdex::IncludeNestedActors
strong

Specifies whether actor-contact filtering also applies to nested actors.

See also
Scene::EnableActorContactAsymmetric, Scene::EnableActorContactSymmetric
Enumerator
No 

Affect only the exact actor handles passed to the API.

Yes 

Affect the exact actor and, for parent actors, its nested actors.

Note
Actors without nested actors are affected as exact actors.
Count 

Number of IncludeNestedActors values.

Definition at line 158 of file mochi_enums.h.

◆ IntegrationMethod

enum struct superdex::IntegrationMethod
strong

Time integration methods.

Enumerator
BackwardEuler 

Backward Euler: 1 step, 1 stage, 1st order, L-stable.

Also known as BDF1 and DIRK11.

BDF2 

BDF2: 2 steps, 1 stage, 2nd order, A-stable.

BDF3 

BDF3: 3 steps, 1 stage, 3rd order.

DIRK22 

DIRK(2,2): 1 step, 2 stages, 2nd order, L-stable.

DIRK23 

DIRK(2,3): 1 step, 2 stages, 3rd order.

DIRK33 

DIRK(3,3): 1 step, 3 stages, 3rd order, L-stable.

SymplecticDIRK12 

Symplectic DIRK(1,2): 1 step, 1 stage, 2nd order, A-stable.

Also known as Gauss and implicit midpoint.

SymplecticDIRK22 

Symplectic DIRK(2,2): 1 step, 2 stages, 2nd order, A-stable.

Count 

Number of time integration method enum values.

Default 

Default time integration method.

Definition at line 25 of file integration_params.h.

◆ LinearSolverConvergenceNorm

Norm types for the stopping criteria of the linear solver.

Note
This setting only applies to LinearSolverType::CG, LinearSolverType::CudaCG, LinearSolverType::ParallelCG and LinearSolverType::AsyncCG. LinearSolverType::GMRES, LinearSolverType::CudaGMRES, LinearSolverType::MINRES, and LinearSolverType::AugmentedCG always use the L2-norm of the residual regardless of this setting. Direct solvers do not have stop criteria.
Enumerator
ResidualL2 

L2-norm of the residual: \(\|r\|_2\).

PreconditionedResidualL2 

L2-norm of the preconditioned residual: \(\|z\|_2\) where \(z = M^{-1}r\).

ResidualPreconditionerInduced 

Preconditioner-induced norm of the residual: \(\sqrt{\langle r, z \rangle}\) where \(z = M^{-1}r\).

Count 

Number of linear solver convergence norm enum values.

Default 

Default linear solver convergence norm.

Definition at line 322 of file linear_solver_params.h.

◆ LinearSolverType

enum struct superdex::LinearSolverType
strong

Linear solver types.

Enumerator
CG 

Conjugate Gradient (CG) solver.

Note
Only valid for symmetric positive-definite systems.
Unlike LinearSolverType::ParallelCG, only matrix-vector products are parallelized. CG orthogonalization and preconditioner solves are not.
GMRES 

Generalized Minimal Residual (GMRES) solver.

CudaCG 

CUDA CG solver.

Note
Only valid for symmetric positive-definite systems.
Requires building with CUDA and a preconditioner with CUDA support.
See also
PreconditionerType
CudaGMRES 

CUDA GMRES solver.

Note
Requires building with CUDA and a preconditioner with CUDA support.
See also
PreconditionerType
AugmentedCG 

[Experimental] Augmented CG solver with Krylov subspace recycling.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Note
Only valid for symmetric positive-definite systems.
Requires building with Eigen.
LDLT 

Direct solver based on the LDLt factorization without pivoting.

Note
Only valid for symmetric systems.
May be unstable for indefinite or ill-conditioned systems.
Uses a dense or a sparse factorization depending on the size and sparsity of the system.
LU 

Direct solver based on the dense LU factorization without pivoting.

Note
May be unstable for ill-conditioned systems.
The cost of the factorization is O(n^3). Will be slow for large systems.
Consider using LinearSolverType::LDLT if the system is symmetric.
AsyncCG 

[Experimental] Asynchronous CG solver.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Note
Only valid for symmetric positive-definite systems.
Async CG is a reformulation of the classical CG algorithm to compute the matrix-vector products in parallel to the orthogonalization and convergence check.
Equivalent to the classical CG algorithm in exact-precision arithmetic, but has inferior stability properties in finite-precision arithmetic.
ParallelCG 

[Experimental] Parallel CG solver.

Warning
Not deterministic.
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Note
Only valid for symmetric positive-definite systems.
Unlike LinearSolverType::CG, all operations (matrix-vector products, preconditioner solves, CG orthogonalization) are parallelized.
Requires a preconditioner with a parallel solve.
MINRES 

Minimal Residual (MINRES) solver.

Note
Only valid for symmetric systems.
ExperimentalCudaSparseCholesky 

[Experimental] CUDA sparse Cholesky factorization.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Note
Only valid for sparse or block-sparse symmetric positive-definite systems.
Requires building with CUDA.
ExperimentalCudaSparseLDLT 

[Experimental] CUDA sparse LDLt factorization.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Note
Only valid for sparse or block-sparse symmetric systems.
Requires building with CUDA and cuDSS.
ExperimentalCudaSparseLU 

[Experimental] CUDA sparse LU factorization.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Note
Only valid for sparse or block-sparse systems.
Requires building with CUDA.
Auto 

Let Mochi select the solver type based on the problem.

Count 

Number of solver type enum values.

Default 

Default solver type.

Definition at line 26 of file linear_solver_params.h.

◆ LinearToleranceStrategy

Strategies to select the relative tolerance of the linear solver (aka forcing term).

Enumerator
Constant 

Constant relative tolerance.

EisenstatWalker1 

Eisenstat-Walker strategy no.

1.

Note
Should be used with LinearSolverConvergenceNorm::ResidualL2. Other norms may yield suboptimal forcing terms.
Not recommended for use with quasi-Newton methods (e.g., NonLinearSolverType::BFGS, NonLinearSolverType::SR1).
See also
Choosing the Forcing Terms in an Inexact Newton Method, Choice 1 (Eisenstat and Walker, 1994)
EisenstatWalker2 

Eisenstat-Walker strategy no.

2.

Note
Not recommended for use with quasi-Newton methods (e.g., NonLinearSolverType::BFGS, NonLinearSolverType::SR1).
See also
Choosing the Forcing Terms in an Inexact Newton Method, Choice 2 (Eisenstat and Walker, 1994)
EisenstatWalker3 

Custom Eisenstat-Walker strategy: eta = max(min(1/(2+k), sqrt(|r|)), eta_0), where k is the non-linear iteration number, |r| is the L2-norm of the nonlinear residual, and eta_0 is LinearSolverParams::relTol.

Note
Should be used with LinearSolverConvergenceNorm::ResidualL2. Other norms may yield suboptimal forcing terms.
Not recommended for use with quasi-Newton methods (e.g., NonLinearSolverType::BFGS, NonLinearSolverType::SR1).
Count 

Number of linear tolerance strategy enum values.

Default 

Default linear tolerance strategy.

Definition at line 211 of file nonlinear_solver_params.h.

◆ LineSearchType

enum struct superdex::LineSearchType
strong

Line search methods for the non-linear solver.

Enumerator
None 

No line search.

May substantially degrade stability.

Simple 

Simple line search.

Accepts a step if the objective function does not increase by more than a specified relative tolerance.

See also
NonLinearSolverParams::lineSearchMaxRelIncrease.
Armijo 

Line search with Armijo condition.

See also
NonLinearSolverParams::lineSearchWolfe1
WolfeWeak 

Line search with weak Wolfe conditions.

See also
NonLinearSolverParams::lineSearchWolfe1, NonLinearSolverParams::lineSearchWolfe2
WolfeStrong 

Line search with strong Wolfe conditions.

See also
NonLinearSolverParams::lineSearchWolfe1, NonLinearSolverParams::lineSearchWolfe2
ResidualNorm 

Line search with residual norm condition.

Accepts a step if the residual norm decreases.

Note
More robust than objective-based line searches (LineSearchType::Simple, LineSearchType::Armijo, LineSearchType::WolfeWeak, LineSearchType::WolfeStrong) but may degrade non-linear solver convergence in non-convex problems. In highly non-convex regions where the residual norm cannot be reduced, it may cause objects to move at slower velocity than they should due to the inability to take valid steps. Consider using an objective-based line search in that case.
ArmijoOrResidualNorm 

Line search that accepts either the Armijo or the residual norm condition.

Note
It combines the robustness of objective-based criteria when the iteration is far from the solution, with residual-based criteria when it is near the solution (particularly useful with single precision). It requires slightly higher cost per line-search iteration.
Count 

Number of line search type enum values.

Default 

Default line search type.

Definition at line 137 of file nonlinear_solver_params.h.

◆ LogChannel

enum class superdex::LogChannel
strong
Enumerator
Verbose 
Info 
Warning 
Error 
Count 

Definition at line 37 of file log.h.

◆ MaterialPsdStrategy

enum struct superdex::MaterialPsdStrategy
strong

Strategy for ensuring positive semi-definite (PSD) Hessian matrices in material models.

The material Hessian (∂P/∂F, where P is the first Piola-Kirchhoff stress and F is the deformation gradient) should be PSD for stable simulation. This enum defines strategies to enforce this property, balancing computational cost against stability and convergence quality.

Note
Different materials support different strategies. Check material-specific documentation.
See also
SoftMaterialType
Enumerator
MaterialDefault 

Use the material's default PSD strategy.

Note
Supported for all material models.
Each material model defines its own recommended default strategy.
None 

No PSD enforcement.

Negative eigenvalues may arise.

Fastest strategy but may substantially degrade stability of most material models.

Note
Supported for all material models.
Projection 

Eigenvalue clamping: U * Max(Λ, ε) * U^T.

Performs eigendecomposition ∂P/∂F = U * Λ * U^T and clamps negative eigenvalues to a small positive constant ε. Slower than most other methods, but typically ensures best convergence.

Note
Supported for all material models.
See also
materials::kMinProjectedEigenvalue
Fast 

Fast PSD enforcement by dropping problematic terms.

Faster than MaterialPsdStrategy::Projection but may degrade non-linear solver convergence.

Note
Only supported for SoftMaterialType::StVenantKirchhoff and SoftMaterialType::NeoHookean materials.
Warning
For SoftMaterialType::StVenantKirchhoff, does not guarantee a PSD Hessian when the Poisson ratio is negative (auxetic materials). Use MaterialPsdStrategy::Projection or MaterialPsdStrategy::AbsEigenProjection instead.
AbsEigenProjection 

Absolute eigenvalue projection: U * Max(|Λ|, ε) * U^T.

Takes absolute value of eigenvalues instead of clamping. Similar cost to MaterialPsdStrategy::Projection but may improve stability, especially for highly deformed configurations.

Note
Supported for all material models.
See also
Stabler Neo-Hookean Simulation: Absolute Eigenvalue Filtering for Projected Newton (Chen et al., 2024)
materials::kMinProjectedEigenvalue
PerTermProjection 

Per-term projection for composite Hessians.

Projects each summand of the Hessian separately. For example, if H = H1 + H2, projects both H1 and H2 independently.

Note
Only supported for SoftMaterialType::ActiveShapeTargetingArap material.
Count 

Number of unique enum values.

Definition at line 52 of file material_types.h.

◆ MeshFileType

enum class superdex::MeshFileType
strong

Mesh file format hint for Context::LoadShapeFromBytes and model-loading APIs that read from byte buffers.

Enumerator
Legacy 

Auto-detect between HDF5 and JSON (default behavior).

PLY 

PLY format (Stanford Polygon).

OFF 

OFF format (Object File Format).

STL 

STL format (Stereolithography).

OBJ 

OBJ format (Wavefront).

Count 

Definition at line 320 of file model_data.h.

◆ NonLinearSolverConvergenceMode

Convergence monitoring mode for the non-linear solver residual.

Note
Convergence is evaluated per simulation island, not scene-wide. Each island is solved independently, and the selected mode determines how convergence is assessed within that island.
The norm used to monitor divergence via NonLinearSolverParams::absDivTol and NonLinearSolverParams::relDivTol is always the L2 norm, irrespective of this setting.
The norm used to monitor stagnation via NonLinearSolverParams::relStepTol is always the L2 norm, irrespective of this setting.
See also
NonLinearSolverParams::absTol, NonLinearSolverParams::relTol
Enumerator
Global 

Use global, unweighted residual norm for convergence checks within each simulation island.

Convergence is determined by the global residual norm within each simulation island: |r| <= absTol or |r| <= relTol * |r0|

PerActorWeighted 

Use per-actor weighted residual norms for convergence checks.

Each actor uses a per-actor weighted L2 norm |r_a|_W = sqrt(Σᵢ wᵢ·rᵢ²), where weights normalize force/torque residuals by characteristic force/torque. All actors must satisfy their individual criteria: |r_a|_W <= absTol or |r_a|_W <= relTol * |r0_a|_W

Note
Weights are derived from inertia properties. Actors with zero inertia receive uniform weights, which provide no physical normalization. For quasi-static problems, NonLinearSolverConvergenceMode::Global mode is recommended.
Count 

Number of convergence monitoring mode enum values.

Default 

Default convergence monitoring mode.

Definition at line 280 of file nonlinear_solver_params.h.

◆ NonLinearSolverType

enum struct superdex::NonLinearSolverType
strong

Non-linear solver types.

Enumerator
Newton 

Newton's method.

BFGS 

Broyden-Fletcher-Goldfarb-Shanno (BFGS) method.

Note
The initial approximation of the dresidual is the actual dresidual (i.e., the first iteration matches Newton's method).
The algorithm is restarted with the actual dresidual every NonLinearSolverParams::dResidualAssemblyPeriod iterations, or immediately if the line search fails to improve the figure of merit it monitors or the linear solver fails to converge.
See also
NonLinearSolverParams::dResidualAssemblyPeriod
SR1 

Symmetric Rank-One (SR1) method.

Note
The initial approximation of the dresidual is the actual dresidual (i.e., the first iteration matches Newton's method).
The algorithm is restarted with the actual dresidual every NonLinearSolverParams::dResidualAssemblyPeriod iterations, or immediately if the line search fails to improve the figure of merit it monitors or the linear solver fails to converge.
See also
NonLinearSolverParams::dResidualAssemblyPeriod
Count 

Number of non-linear solver type enum values.

Default 

Default non-linear solver type.

Definition at line 90 of file nonlinear_solver_params.h.

◆ PoseConstraintType

enum class superdex::PoseConstraintType
strong

Type of constraint in an articulated pose controller.

Defines the functional purpose of a pose constraint, not its internal implementation. Pose controllers use these constraints to track target configurations for articulated actors.

See also
PoseConstraintInfo, PoseTrackingParams, PoseControllerParams
Enumerator
Joint 

Joint constraint.

LinkTranslation 

Link translation constraint.

Controls the position of a link.

LinkRotation 

Link rotation constraint.

Controls the orientation of a link.

Count 

Number of pose constraint type enum values.

Invalid 

Invalid constraint type.

Definition at line 116 of file mochi_enums.h.

◆ PreconditionerType

enum struct superdex::PreconditionerType
strong

Preconditioner types for the linear solver.

Note
Only used for iterative solvers.
CUDA iterative solvers only support PreconditionerType::None, PreconditionerType::Jacobi and PreconditionerType::BlockJacobi preconditioners.
Enumerator
None 

No preconditioner.

Jacobi 

Jacobi preconditioner.

Note
Only valid for matrices with non-zero diagonal entries.
BlockJacobi 

Block Jacobi preconditioner with block size of 3.

Note
Only valid for matrices whose size is a multiple of 3 and whose 3x3 diagonal blocks are non-singular.
SSOR 

Symmetric successive over-relaxation (SSOR) preconditioner.

Note
Only valid for symmetric positive-definite matrices.
BlockSSOR 

Block symmetric successive over-relaxation (SSOR) preconditioner with block size of 3.

Note
Only valid for symmetric positive-definite matrices whose size is a multiple of 3 and whose 3x3 diagonal blocks are non-singular.
LU 

Dense LU factorization without pivoting.

Note
May be unstable for ill-conditioned matrices.
The iterative solver should converge in 1 iteration.
AMG 

Algebraic multigrid (AMG).

Note
Only valid for 3x3 block sparse symmetric positive-definite matrices with non-singular 3x3 diagonal blocks.
SymInverse 

Symmetric inverse preconditioner based on the dense LDLt factorization without pivoting.

Note
Only valid for symmetric matrices.
May be unstable for indefinite or ill-conditioned matrices.
The iterative solver should converge in 1 iteration.
LDLT 

Dense LDLt factorization without pivoting.

Note
Only valid for symmetric matrices.
May be unstable for indefinite or ill-conditioned matrices.
The iterative solver should converge in 1 iteration.
ILU0 

Incomplete LU factorization with zero fill-in.

IC0 

Incomplete Cholesky factorization with zero fill-in.

Note
Only valid for symmetric positive-definite matrices.
PerActor 

Domain decomposition preconditioner, where each actor is a subdomain.

Note
The most appropriate preconditioner type is used for each actor.
ColoredSSOR 

[Experimental] Colored symmetric successive over-relaxation (SSOR) preconditioner.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.
Note
Only valid for symmetric positive-definite matrices.
Count 

Number of preconditioner type enum values.

Default 

Default preconditioner type.

Definition at line 192 of file linear_solver_params.h.

◆ PsdProjectionMode

enum class superdex::PsdProjectionMode
strong

Positive Semi-Definite (PSD) projection modes for the dresidual matrix.

Enumerator
Never 

Never project to PSD.

Always 

Always project to PSD.

IfFailRetry 

If one non-linear iteration fails, retry the iteration projecting to PSD.

IfFailAlways 

If one non-linear iteration fails, retry the iteration projecting to PSD and continue projecting in all the remaining iterations of the solve.

Count 

Number of PSD projection mode enum values.

Default 

Default PSD projection mode.

Definition at line 69 of file nonlinear_solver_params.h.

◆ QueryType

enum class superdex::QueryType
strong

Type of query data to compute for an actor or constraint.

Queries enable on-demand computation of simulation data. Some queries allow immediate retrieval of data; others must be registered beforehand to have the data computed and available for retrieval after the next step. Queries are reference counted, so multiple registrations are acceptable.

Note
Not all query types are supported for all actor/constraint types. Use Actor::IsQuerySupported or Constraint::IsQuerySupported to check at runtime whether a specific query type is supported for a given actor/constraint.
See also
Actor::RegisterQuery, Actor::RegisterQueryAndCompute, Constraint::RegisterQuery
Enumerator
NodePositions 

Positions of all mesh nodes.

Available via Actor::GetNodePositionsLocal.

Note
Only supported for soft, soft-skinned and shell actors.
ElementsDeformationGradient 

Deformation gradients for elements in deformable actors.

Available via Actor::GetElementsDeformationGradient.

Note
Only supported for soft and soft-skinned actors (except ROMs).
SurfaceNodePositions 

Positions of surface mesh nodes.

Available via Actor::GetSurfaceMeshNodePositionsLocal.

Note
Not supported for actors without a surface mesh, such as rod actors or rigid actors without a mesh (e.g. with an implicit shape).
SurfaceNodeNormals 

Normals of surface mesh nodes.

Available via Actor::GetSurfaceMeshNodeNormalsLocal.

Note
Not supported for actors without a surface mesh, such as rod actors or rigid actors without a mesh (e.g. with an implicit shape).
VisualNodePositions 

Positions of visual mesh nodes.

Available via Actor::GetVisualMeshNodePositionsLocal.

Note
Only supported for actors with a visual mesh. Deformable actors also require a visual mesh embedding.
VisualNodeNormals 

Normals of visual mesh nodes.

Available via Actor::GetVisualMeshNodeNormalsLocal.

Note
Only supported for actors with a visual mesh. Deformable actors also require a visual mesh embedding.
ContactPoints 

Contact points between actors.

Available via Actor::GetContactPointsWorld.

Note
Immediate computation, i.e. Actor::RegisterQueryAndCompute, is not supported.
Not supported for actors without contact sample points or with far SDF evaluation enabled.
ElasticEnergy 

Elastic energy of a deformable actor.

Available via Actor::GetElasticEnergy.

Note
Only supported for soft and soft-skinned actors.
NodeContactForces 

Contact forces per node.

Available via Actor::GetNodeContactForcesWorld.

Note
Immediate computation, i.e. Actor::RegisterQueryAndCompute, is not supported.
Not supported for rod actors, actors without contact sample points or actors with far SDF evaluation enabled.
ConstraintForce 

Force/torque applied by a constraint.

Available via Constraint::GetForce.

Note
Only applicable to Constraint objects.
Immediate computation, i.e. Actor::RegisterQueryAndCompute, is not supported.
ArticulatedControllerForce 

Generalized forces applied by an articulated pose controller.

Available via Actor::GetArticulatedControllerForce.

Note
Only applicable to articulated actors with a pose controller.
Immediate computation, i.e. Actor::RegisterQueryAndCompute, is not supported.
SdfDistances 

Signed distance field values for contact samples.

Available via Actor::GetSdfDistances.

Note
Immediate computation, i.e. Actor::RegisterQueryAndCompute, is not supported.
TotalContactForce 

Total contact force and torque acting on an actor.

Available via Actor::GetContactForceWorld and Actor::GetContactTorqueWorld.

Note
Immediate computation, i.e. Actor::RegisterQueryAndCompute, is not supported.
Not supported for actors without contact sample points or with far SDF evaluation enabled.
Count 

Number of query type enum values.

Definition at line 128 of file mochi_enums.h.

◆ RoutingElementType

enum class superdex::RoutingElementType
strong

Selects how a RoutingElement contributes to a spatial tendon's routing.

Enumerator
Waypoint 

A point fixed in a link's local frame (the same frame in which the link's mesh and geometry are authored, i.e.

the link's root-transform frame). Adjacent waypoints are joined by a straight segment whose length contributes to the tendon length.

LinearJoint 

A constant moment arm contributing coefficient * jointCoordinate, as in a linear transmission.

Carries no geometry and breaks the polyline between waypoints.

Definition at line 210 of file articulated_body_params.h.

◆ SoftMaterialType

enum struct superdex::SoftMaterialType
strong

Material constitutive models for soft bodies.

Defines the constitutive response for deformable materials (strain energy and stress-strain relationship). Each material has different mechanical properties, computational cost, and stability characteristics.

See also
SoftMaterialParams, MaterialPsdStrategy
Enumerator
NeoHookean 

Neo-Hookean hyperelastic material.

Non-linear hyperelastic material with log-barrier stabilization to handle extreme deformations and element inversions robustly. Recommended for most soft body simulations requiring large deformations.

See also
Stable Neo-Hookean Flesh Simulation (Smith et al., 2018)
NeoHookeanMaterialParams
StVenantKirchhoff 

Saint Venant-Kirchhoff (StVK) hyperelastic material.

Classical non-linear hyperelastic material. Simpler than neo-Hookean but may exhibit instabilities under large deformations, particularly under large compression.

See also
StVenantKirchhoffMaterialParams
LinearElastic 

Linear elastic material (Hookean).

Simplest material model with linear stress-strain relationship. Computationally fast but only accurate for small deformations.

Note
Not suitable for large deformations.
No PSD enforcement is needed. The Hessian matrix is positive definite regardless of the PSD strategy.
See also
LinearElasticMaterialParams
ActiveNeoHookean 

Composite material: passive isotropic elasticity + active anisotropic fiber actuation.

Combines a passive isotropic hyperelastic component (Neo-Hookean) with an active anisotropic fiber contraction component (Aniso ARAP). Used to model materials with directional actuation like muscle tissue.

See also
Stable Neo-Hookean Flesh Simulation (Smith et al., 2018)
Anisotropic Elasticity for Inversion-Safety and Element Rehabilitation (Kim et al., 2019)
ActiveNeoHookeanMaterialParams
ActiveShapeTargetingArap 

Active As-Rigid-As-Possible (ARAP) material with Shape Targeting.

Active material model based on the concept of "shape targeting". Unlike passive models that only react to external loads, it introduces an internal actuation mechanism.

The actuation is defined by the shape target tensor, S_t, which specifies the desired local shape of the object. The model then resists deformation from this target shape while allowing rigid rotation.

This approach is effective for simulating biological phenomena like muscle contraction.

Note
The "activeness" is controlled externally by setting the shape target tensor S_t. The model itself does not have an intrinsic, self-actuating mechanism without this input.
See also
Shape Targeting: A Versatile Active Elasticity Constitutive Model (Klár et al., 2020)
ActiveShapeTargetingArapMaterialParams
Arap 

As-Rigid-As-Possible (ARAP) material.

ARAP's primary goal is to deform the object such that each local region undergoes a transformation that is as close to a rigid rotation as possible.

Because it preserves local shape details well and produces intuitive, natural-looking results, ARAP is widely used in computer graphics for applications like interactive mesh editing and character posing.

See also
Dynamic Deformables (Kim and Eberle, 2022)
ArapMaterialParams
Count 

Number of unique material type enum values.

Definition at line 148 of file material_types.h.

◆ VerbosityLevel

enum struct superdex::VerbosityLevel
strong

Verbosity levels for solvers and optimizers.

Controls the amount of logging output during solver execution.

Note
VerbosityLevel relates to the global LogChannel system through the following pattern: if (params.verbosity >= VerbosityLevel::Error) { MOCHI_LOG_ERROR(...); } // Logs to LogChannel::Error if (params.verbosity >= VerbosityLevel::Warning) { MOCHI_LOG_WARNING(...); } // Logs to LogChannel::Warning if (params.verbosity >= VerbosityLevel::Verbose) { MOCHI_LOG(...); } // Logs to LogChannel::Info (NOT to LogChannel::Verbose)
Enumerator
Silent 

No output.

Error 

Only errors.

Warning 

Errors and warnings.

Verbose 

Detailed output including iteration info.

Count 

Number of verbosity level enum values.

Definition at line 35 of file verbosity_params.h.

Function Documentation

◆ Abs() [1/2]

template<class T, int N>
Simd< T, N > superdex::Abs ( Simd< T, N > a)
inline

Definition at line 364 of file simd_inl.h.

◆ Abs() [2/2]

template<typename T>
T superdex::Abs ( T a)
inlinenodiscardconstexpr

Definition at line 50 of file basic_utils.h.

◆ ACos() [1/2]

template<class T, int N>
Simd< T, N > superdex::ACos ( Simd< T, N > a)
inline

Definition at line 531 of file simd_inl.h.

◆ ACos() [2/2]

template<typename T>
T superdex::ACos ( T a)
inlinenodiscardconstexpr

Definition at line 466 of file basic_utils.h.

◆ AllTrue() [1/2]

template<int COUNT = -1, class T, int N>
bool superdex::AllTrue ( Simd< T, N > a)
inline

Definition at line 743 of file simd_inl.h.

◆ AllTrue() [2/2]

template<typename T>
bool superdex::AllTrue ( T const & a)
inlinenodiscard

Definition at line 60 of file basic_utils.h.

◆ AnyTrue() [1/2]

template<int COUNT = -1, class T, int N>
bool superdex::AnyTrue ( Simd< T, N > a)
inline

Definition at line 749 of file simd_inl.h.

◆ AnyTrue() [2/2]

template<typename T>
bool superdex::AnyTrue ( T const & a)
inlinenodiscard

Definition at line 66 of file basic_utils.h.

◆ Append() [1/2]

template<typename T, typename InBeginIterator, typename InEndIterator>
void superdex::Append ( DynamicArray< T > & out,
InBeginIterator const & inBegin,
InEndIterator const & inEnd )
inline

Utility Functions.

Definition at line 1139 of file dynamic_array.h.

◆ Append() [2/2]

template<typename T, typename InContainer>
void superdex::Append ( DynamicArray< T > & out,
InContainer const & inContainer )
inline

Definition at line 1145 of file dynamic_array.h.

◆ AppendSum()

template<typename T, typename ContainerIn>
void superdex::AppendSum ( DynamicArray< T > & out,
ContainerIn const & in,
T valueToAdd )

Definition at line 1152 of file dynamic_array.h.

◆ ArgMax()

template<typename T, size_t N>
size_t superdex::ArgMax ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 75 of file math_utils_inl.h.

◆ ArgMin()

template<typename T, size_t N>
size_t superdex::ArgMin ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 70 of file math_utils_inl.h.

◆ ASin() [1/2]

template<class T, int N>
Simd< T, N > superdex::ASin ( Simd< T, N > a)
inline

Definition at line 541 of file simd_inl.h.

◆ ASin() [2/2]

template<typename T>
T superdex::ASin ( T a)
inlinenodiscardconstexpr

Definition at line 443 of file basic_utils.h.

◆ ATan() [1/2]

template<class T, int N>
Simd< T, N > superdex::ATan ( Simd< T, N > a)
inline

Definition at line 551 of file simd_inl.h.

◆ ATan() [2/2]

template<typename T>
T superdex::ATan ( T a)
inlinenodiscardconstexpr

Definition at line 471 of file basic_utils.h.

◆ ATan2()

template<typename T>
T superdex::ATan2 ( T y,
T x )
inlinenodiscardconstexpr

Definition at line 476 of file basic_utils.h.

◆ BasisVector()

template<typename T, int N>
NdArray< T, N > superdex::BasisVector ( int axis)
inlinenodiscardconstexpr

Definition at line 132 of file math_utils_inl.h.

◆ Blend() [1/2]

template<int x, int y, int z, int w, class T, int N>
Simd< T, N > superdex::Blend ( Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 290 of file simd_inl.h.

◆ Blend() [2/2]

template<int x, int y, class T, int N>
Simd< T, N > superdex::Blend ( Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 285 of file simd_inl.h.

◆ Broadcast() [1/4]

template<int i, class T, int N>
Simd< T, N > superdex::Broadcast ( Simd< T, N > v)
inline

Definition at line 126 of file simd_inl.h.

◆ Broadcast() [2/4]

template<class T, int N>
Simd< T, N > superdex::Broadcast ( Simd< T, N > v,
int i )
inline

Definition at line 131 of file simd_inl.h.

◆ Broadcast() [3/4]

template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
V superdex::Broadcast ( typename V::Scalar a)
inline

Definition at line 115 of file simd_inl.h.

◆ Broadcast() [4/4]

template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
V superdex::Broadcast ( typename V::Scalar const * ptr)
inline

Definition at line 121 of file simd_inl.h.

◆ Broadcast3()

template<class V, int N, std::enable_if_t< IsSimd< V > &&N > = 3, superdex::ConceptMatch>
NdArray< V, 3 > superdex::Broadcast3 ( Simd< typename V::Scalar, N > const & a)
inlinenodiscard

Definition at line 703 of file vmatrix.h.

◆ Broadcast3x3()

template<class V, size_t D0, int D1, std::enable_if_t< IsSimd< V > &&D0 > = 3 && D1 >= 3, superdex::ConceptMatch>
NdArray< V, 3, 3 > superdex::Broadcast3x3 ( NdArray< Simd< typename V::Scalar, D1 >, D0 > const & a)
inlinenodiscard

Definition at line 718 of file vmatrix.h.

◆ BroadcastEach() [1/2]

template<class V, size_t D0, size_t... DIMS, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
NdArray< V, D0, DIMS... > superdex::BroadcastEach ( NdArray< typename V::Scalar, D0, DIMS... > const & a)
inlinenodiscard

Definition at line 682 of file vmatrix.h.

◆ BroadcastEach() [2/2]

template<class V, int N, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
NdArray< V, N > superdex::BroadcastEach ( Simd< typename V::Scalar, N > const & a)
inlinenodiscard

Definition at line 693 of file vmatrix.h.

◆ Ceil() [1/2]

template<typename T, size_t N>
NdArray< T, N > superdex::Ceil ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 241 of file math_utils_inl.h.

◆ Ceil() [2/2]

template<typename T>
T superdex::Ceil ( T a)
inlinenodiscardconstexpr

Definition at line 391 of file basic_utils.h.

◆ Clamp() [1/3]

template<typename T, size_t N>
NdArray< T, N > superdex::Clamp ( NdArray< T, N > const & a,
NdArray< T, N > const & min,
NdArray< T, N > const & max )
inlinenodiscardconstexpr

Definition at line 287 of file math_utils_inl.h.

◆ Clamp() [2/3]

template<typename T, size_t N>
NdArray< T, N > superdex::Clamp ( NdArray< T, N > const & a,
T min,
T max )
inlinenodiscardconstexpr

Definition at line 259 of file math_utils_inl.h.

◆ Clamp() [3/3]

template<typename ValT, typename MinT, typename MaxT>
ValT superdex::Clamp ( ValT value,
MinT min,
MaxT max )
inlinenodiscardconstexpr

Definition at line 171 of file basic_utils.h.

◆ Cofactor() [1/2]

template<typename T>
NdArray< T, 2, 2 > superdex::Cofactor ( NdArray< T, 2, 2 > const & mat)
inlinenodiscardconstexpr

Definition at line 727 of file matrix_utils_inl.h.

◆ Cofactor() [2/2]

template<typename T>
NdArray< T, 3, 3 > superdex::Cofactor ( NdArray< T, 3, 3 > const & mat)
inlinenodiscardconstexpr

Definition at line 734 of file matrix_utils_inl.h.

◆ Cofactor3x3()

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::Cofactor3x3 ( NdArray< Simd< T, 4 >, 3 > const & mat)
inlinenodiscard

Definition at line 754 of file matrix_utils_inl.h.

◆ Cofactor4x4()

template<typename T>
void superdex::Cofactor4x4 ( T const m[16],
T adjOut[16] )
inlineconstexpr

Definition at line 420 of file matrix_utils_inl.h.

◆ CofactorSym2x2()

template<typename T>
Simd< T, 4 > superdex::CofactorSym2x2 ( Simd< T, 4 > const & mat)
inlinenodiscard

Definition at line 805 of file matrix_utils_inl.h.

◆ CofactorSym3x3()

template<typename T>
NdArray< Simd< T, 4 >, 2 > superdex::CofactorSym3x3 ( NdArray< Simd< T, 4 >, 2 > const & mat)
inlinenodiscard

Definition at line 811 of file matrix_utils_inl.h.

◆ Colon()

template<typename T, size_t N, size_t M>
T superdex::Colon ( NdArray< T, N, M > const & A,
NdArray< T, N, M > const & B )
inlinenodiscardconstexpr

Definition at line 351 of file matrix_utils_inl.h.

◆ Colon3x3()

template<typename T>
T superdex::Colon3x3 ( NdArray< Simd< T, 4 >, 3 > const & A,
NdArray< Simd< T, 4 >, 3 > const & B )
inlinenodiscard

Definition at line 342 of file matrix_utils_inl.h.

◆ Conjugate()

Quaternion superdex::Conjugate ( Quaternion const & a)
inlinenodiscard

Definition at line 83 of file quaternion_utils_inl.h.

◆ Cos() [1/2]

template<class T, int N>
Simd< T, N > superdex::Cos ( Simd< T, N > a)
inline

Definition at line 462 of file simd_inl.h.

◆ Cos() [2/2]

template<typename T>
T superdex::Cos ( T a)
inlinenodiscardconstexpr

Definition at line 456 of file basic_utils.h.

◆ CreateContext()

Context * superdex::CreateContext ( int numWorkerThreads = -1)
nodiscard

Initialize SuperDex Physics by creating a Context object.

You only need one Context for the entire process. It can be used to load shapes and to create any number of scenes. Call DestroyContext to clean everything up when you are done.

Parameters
[in]numWorkerThreadsThe number of async worker threads to initialize, or zero for single-threaded execution. Negative values (e.g. -1) let SuperDex Physics choose a default based on your CPU hardware. Positive values are clamped to the number of logical processors.
Returns
Pointer to the created Context.
Note
Simulation performance does not necessarily improve by using more threads. For simple scenes, using a small number of threads (or even single-threaded execution) may be fastest.
Call on any thread.
See also
DestroyContext

◆ Cross()

template<typename T>
NdArray< T, 3 > superdex::Cross ( NdArray< T, 3 > const & a,
NdArray< T, 3 > const & b )
inlinenodiscardconstexpr

Definition at line 367 of file math_utils_inl.h.

◆ Cross3()

template<class T, int N>
Simd< T, N > superdex::Cross3 ( Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 832 of file simd_inl.h.

◆ DecomposeMatrixTransform()

std::pair< Real3, TransformRT > superdex::DecomposeMatrixTransform ( VMatrix4x4r const & matrixTransform)
inline

Definition at line 266 of file transform_rt_inl.h.

◆ Delete()

template<class T, class A>
void superdex::Delete ( A * allocator,
T * ptr )
inline

Destroy and deallocate an object that was created via New<T>.

Template Parameters
TType of object to destroy
AType of Allocator
Parameters
allocatorThe Allocator instance that was previously passed to New<T>
ptrAddress of the object to destroy

Definition at line 154 of file allocator.h.

◆ DestroyContext()

void superdex::DestroyContext ( superdex::Context * context)

Shut down SuperDex Physics by destroying the Context object.

Any remaining state will be immediately destroyed, including all scenes, actors, and constraints.

Parameters
[in]ContextThe Context object to destroy.
Note
Passing nullptr is a no-op.
Warning
Must be called on the same thread that called CreateContext.
Do not dereference any pointers to data owned by the Context after this call.
See also
CreateContext

◆ Det() [1/3]

template<typename T>
T superdex::Det ( NdArray< T, 2, 2 > const & A)
inlinenodiscardconstexpr

Definition at line 626 of file matrix_utils_inl.h.

◆ Det() [2/3]

template<typename T>
T superdex::Det ( NdArray< T, 3, 3 > const & A)
inlinenodiscardconstexpr

Definition at line 631 of file matrix_utils_inl.h.

◆ Det() [3/3]

template<typename T>
T superdex::Det ( NdArray< T, 4, 4 > const & A)
inlineconstexpr

Definition at line 639 of file matrix_utils_inl.h.

◆ Det2x2()

template<typename T>
T superdex::Det2x2 ( Simd< T, 4 > const & A)
inlinenodiscard

Definition at line 669 of file matrix_utils_inl.h.

◆ Det3x3()

template<typename T, size_t N>
T superdex::Det3x3 ( NdArray< Simd< T, 4 >, N > const & A)
inlinenodiscard

Definition at line 664 of file matrix_utils_inl.h.

◆ Det4x4()

template<typename T>
T superdex::Det4x4 ( T const m[16])
inlineconstexpr

Definition at line 440 of file matrix_utils_inl.h.

◆ DiagonalMatrix() [1/2]

template<size_t N, typename T>
NdArray< T, N, N > superdex::DiagonalMatrix ( NdArray< T, N > const & diagonalVector)
inlinenodiscardconstexpr

Definition at line 571 of file matrix_utils_inl.h.

◆ DiagonalMatrix() [2/2]

template<size_t N, typename T>
NdArray< T, N, N > superdex::DiagonalMatrix ( T valueOnDiagonal)
inlinenodiscardconstexpr

Definition at line 562 of file matrix_utils_inl.h.

◆ DNormalize() [1/2]

template<typename T, size_t N>
NdArray< T, N, N > superdex::DNormalize ( NdArray< T, N > const & v)
inlinenodiscardconstexpr

Definition at line 926 of file matrix_utils_inl.h.

◆ DNormalize() [2/2]

template<typename T, size_t N>
NdArray< T, N, N > superdex::DNormalize ( NdArray< T, N > const & v,
T sqrNorm )
inlinenodiscardconstexpr

Definition at line 931 of file matrix_utils_inl.h.

◆ DNormalize3()

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::DNormalize3 ( Simd< T, 4 > const & v)
inlinenodiscard

Definition at line 919 of file matrix_utils_inl.h.

◆ Dot() [1/6]

template<typename T>
NdArray< T, 3, 3 > superdex::Dot ( NdArray< T, 3, 3 > const & a,
NdArray< T, 3, 3 > const & b )
inlineconstexpr

Definition at line 183 of file matrix_utils_inl.h.

◆ Dot() [2/6]

template<typename T, size_t N>
T superdex::Dot ( NdArray< T, N > const & a,
NdArray< T, N > const & b )
inlinenodiscardconstexpr

Definition at line 332 of file math_utils_inl.h.

◆ Dot() [3/6]

template<typename T, size_t N, size_t M, size_t L>
NdArray< T, N, L > superdex::Dot ( NdArray< T, N, M > const & a,
NdArray< T, M, L > const & B )
inlinenodiscardconstexpr

Definition at line 163 of file matrix_utils_inl.h.

◆ Dot() [4/6]

template<int COUNT = -1, class T, int N>
T superdex::Dot ( Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 666 of file simd.h.

◆ Dot() [5/6]

template<typename T, size_t N>
T superdex::Dot ( Span< T const > a,
NdArray< T, N > const & b )
inlinenodiscardconstexpr

Definition at line 342 of file math_utils_inl.h.

◆ Dot() [6/6]

template<typename T>
T superdex::Dot ( Span< T const > a,
Span< T const > b )
inlinenodiscardconstexpr

Definition at line 353 of file math_utils_inl.h.

◆ Dot2x2()

template<typename T>
Simd< T, 4 > superdex::Dot2x2 ( Simd< T, 4 > const & a,
Simd< T, 4 > const & b )
inlinenodiscard

Definition at line 209 of file matrix_utils_inl.h.

◆ Dot3x3()

template<typename T, size_t D0A, size_t D0B>
NdArray< Simd< T, 4 >, 3 > superdex::Dot3x3 ( NdArray< Simd< T, 4 >, D0A > const & a,
NdArray< Simd< T, 4 >, D0B > const & b )
inlinenodiscard

Definition at line 202 of file matrix_utils_inl.h.

◆ Dot4x4()

template<typename T>
NdArray< Simd< T, 4 >, 4 > superdex::Dot4x4 ( NdArray< Simd< T, 4 >, 4 > const & a,
NdArray< Simd< T, 4 >, 4 > const & b )
inlinenodiscard

Definition at line 175 of file matrix_utils_inl.h.

◆ DotMatVec() [1/4]

template<typename T>
NdArray< T, 3 > superdex::DotMatVec ( NdArray< T, 3, 3 > const & a,
NdArray< T, 3 > const & b )
inlineconstexpr

Definition at line 84 of file matrix_utils_inl.h.

◆ DotMatVec() [2/4]

template<typename T, size_t N, size_t M>
NdArray< T, N > superdex::DotMatVec ( NdArray< T, N, M > const & a,
NdArray< T, M > const & b )
inlinenodiscardconstexpr

Definition at line 58 of file matrix_utils_inl.h.

◆ DotMatVec() [3/4]

template<typename T, size_t N, size_t M>
NdArray< T, N > superdex::DotMatVec ( NdArray< T, N, M > const & a,
Span< T const > b )
inlinenodiscardconstexpr

Definition at line 77 of file matrix_utils_inl.h.

◆ DotMatVec() [4/4]

template<typename T, size_t N, size_t M>
void superdex::DotMatVec ( NdArray< T, N, M > const & a,
Span< T const > b,
Span< T > out )
inline

Definition at line 69 of file matrix_utils_inl.h.

◆ DotMatVec3x3()

template<typename T, size_t D0>
Simd< T, 4 > superdex::DotMatVec3x3 ( NdArray< Simd< T, 4 >, D0 > const & m,
Simd< T, 4 > v )
inlinenodiscard

Definition at line 103 of file matrix_utils_inl.h.

◆ DotMatVec3xN()

template<size_t N, typename T, size_t D0>
Simd< T, 4 > superdex::DotMatVec3xN ( NdArray< Simd< T, 4 >, D0 > const & m,
Simd< T, 4 > v )
inlinenodiscard

Definition at line 94 of file matrix_utils_inl.h.

◆ DotMatVec4x4()

template<typename T>
Simd< T, 4 > superdex::DotMatVec4x4 ( NdArray< Simd< T, 4 >, 4 > const & m,
Simd< T, 4 > v )
inlinenodiscard

Definition at line 108 of file matrix_utils_inl.h.

◆ DotVecMat()

template<typename T, size_t N, size_t M>
NdArray< T, M > superdex::DotVecMat ( NdArray< T, N > const & a,
NdArray< T, N, M > const & b )
inlinenodiscardconstexpr

Definition at line 123 of file matrix_utils_inl.h.

◆ DotVecMat2x3()

template<typename T>
Simd< T, 4 > superdex::DotVecMat2x3 ( Simd< T, 4 > v,
NdArray< Simd< T, 4 >, 2 > const & m )
inlinenodiscard

Definition at line 137 of file matrix_utils_inl.h.

◆ DotVecMat3x3()

template<typename T, size_t D0>
Simd< T, 4 > superdex::DotVecMat3x3 ( Simd< T, 4 > v,
NdArray< Simd< T, 4 >, D0 > const & m )
inlinenodiscard

Definition at line 147 of file matrix_utils_inl.h.

◆ DotVecMat4x4()

template<typename T>
Simd< T, 4 > superdex::DotVecMat4x4 ( Simd< T, 4 > a,
NdArray< Simd< T, 4 >, 4 > const & b )
inlinenodiscard

Definition at line 153 of file matrix_utils_inl.h.

◆ DynamicArray()

template<typename InputIt, std::enable_if_t<(std::is_base_of_v< std::input_iterator_tag, typename std::iterator_traits< InputIt >::iterator_category >), superdex::ConceptMatch > = superdex::ConceptMatch::True>
superdex::DynamicArray ( InputIt ,
InputIt ,
Allocator * = GetDefaultAllocator() ) -> DynamicArray< typename std::iterator_traits< InputIt >::value_type >

◆ EnableLogChannel()

void superdex::EnableLogChannel ( LogChannel channel,
bool enable )
inline

Definition at line 183 of file log.h.

◆ Equal() [1/2]

template<int COUNT = -1, class T, int N>
bool superdex::Equal ( Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 710 of file simd_inl.h.

◆ Equal() [2/2]

template<typename T>
auto superdex::Equal ( T const & a,
T const & b )
inlinenodiscardconstexpr

Definition at line 208 of file basic_utils.h.

◆ EquivalentRotation() [1/2]

bool superdex::EquivalentRotation ( Quaternion const & a,
Quaternion const & b,
real epsilon = kDefaultNearEqualEpsilon<real> )
inlinenodiscard

Definition at line 40 of file quaternion_utils_inl.h.

◆ EquivalentRotation() [2/2]

bool superdex::EquivalentRotation ( Quaternion const & a,
Quaternion const & b,
Vec4r epsilon )
inlinenodiscard

Definition at line 36 of file quaternion_utils_inl.h.

◆ Exp() [1/2]

template<class T, int N>
Simd< T, N > superdex::Exp ( Simd< T, N > a)
inline

Definition at line 561 of file simd_inl.h.

◆ Exp() [2/2]

template<typename T>
T superdex::Exp ( T a)
inlinenodiscardconstexpr

Definition at line 485 of file basic_utils.h.

◆ Eye()

template<size_t N, typename T = real>
NdArray< T, N, N > superdex::Eye ( )
inlinenodiscardconstexpr

Definition at line 585 of file matrix_utils_inl.h.

◆ FastRound()

template<class T, int N>
Simd< T, N > superdex::FastRound ( Simd< T, N > a)
inline

Definition at line 416 of file simd_inl.h.

◆ Floor() [1/3]

template<typename T, size_t N>
NdArray< T, N > superdex::Floor ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 232 of file math_utils_inl.h.

◆ Floor() [2/3]

template<class T, int N>
Simd< T, N > superdex::Floor ( Simd< T, N > a)
inline

Definition at line 411 of file simd_inl.h.

◆ Floor() [3/3]

template<typename T>
T superdex::Floor ( T a)
inlinenodiscardconstexpr

Definition at line 386 of file basic_utils.h.

◆ FlushLog()

void superdex::FlushLog ( )
inline

Definition at line 157 of file log.h.

◆ Format() [1/2]

std::string superdex::Format ( )
inlinenodiscard

Definition at line 96 of file log.h.

◆ Format() [2/2]

std::string superdex::Format ( char const * format,
... )
inlinenodiscard

Definition at line 100 of file log.h.

◆ FourthOrderEye()

auto superdex::FourthOrderEye ( )
inlineconstexpr

Definition at line 49 of file constants.h.

◆ FourthOrderEyeSym()

auto superdex::FourthOrderEyeSym ( )
inlineconstexpr

Definition at line 60 of file constants.h.

◆ Get() [1/2]

template<int i, class T, int N>
T superdex::Get ( Simd< T, N > v)
inline

Definition at line 300 of file simd_inl.h.

◆ Get() [2/2]

template<class T, int N>
T superdex::Get ( Simd< T, N > v,
int i )
inline

Definition at line 305 of file simd_inl.h.

◆ Get0()

template<class T, int N>
T superdex::Get0 ( Simd< T, N > v)
inline

Definition at line 295 of file simd_inl.h.

◆ GetDefaultAllocator()

Allocator * superdex::GetDefaultAllocator ( )
inlinenodiscard

Get an instance of the DefaultAllocator class.

Usable in any context.

Returns
Allocator*

Definition at line 196 of file allocator_inl.h.

◆ GetHalf()

template<int iHalf, class T, int N>
Simd< T, N/2 > superdex::GetHalf ( Simd< T, N > a)
inline

Definition at line 310 of file simd_inl.h.

◆ GetLogCallback()

LogFn superdex::GetLogCallback ( )
inlinenodiscard

Definition at line 165 of file log.h.

◆ GetRotationMatrix()

Matrix3x3r superdex::GetRotationMatrix ( TransformRT const & transform)
inlinenodiscard

Definition at line 24 of file transform_rt_utils.h.

◆ GetRotationVector()

Vec4r superdex::GetRotationVector ( TransformRT const & transform)
inlinenodiscard

Definition at line 32 of file transform_rt_utils.h.

◆ HMax()

template<int COUNT = -1, class T, int N>
T superdex::HMax ( Simd< T, N > a)
inline

Definition at line 397 of file simd_inl.h.

◆ HMin()

template<int COUNT = -1, class T, int N>
T superdex::HMin ( Simd< T, N > a)
inline

Definition at line 391 of file simd_inl.h.

◆ HProd()

template<int COUNT = -1, class T, int N>
T superdex::HProd ( Simd< T, N > a)
inline

Definition at line 385 of file simd_inl.h.

◆ HSum()

template<int COUNT = -1, class T, int N>
T superdex::HSum ( Simd< T, N > a)
inline

Definition at line 379 of file simd_inl.h.

◆ IntegralSqrt()

template<typename T>
T superdex::IntegralSqrt ( T a)
inlinenodiscardconstexpr

Definition at line 32 of file basic_utils_inl.h.

◆ Interpolate()

TransformRT superdex::Interpolate ( TransformRT const & a,
TransformRT const & b,
real t )
inlinenodiscard

Definition at line 260 of file transform_rt_inl.h.

◆ Invert() [1/7]

MatrixTransformRT superdex::Invert ( MatrixTransformRT const & a)
inlinenodiscard

Definition at line 126 of file matrix_transform_rt_inl.h.

◆ Invert() [2/7]

template<typename T>
NdArray< T, 2, 2 > superdex::Invert ( NdArray< T, 2, 2 > const & a)
inlinenodiscardconstexpr

Definition at line 364 of file matrix_utils_inl.h.

◆ Invert() [3/7]

template<typename T>
NdArray< T, 2, 2 > superdex::Invert ( NdArray< T, 2, 2 > const & a,
T det )
inlinenodiscardconstexpr

Definition at line 369 of file matrix_utils_inl.h.

◆ Invert() [4/7]

template<typename T>
NdArray< T, 3, 3 > superdex::Invert ( NdArray< T, 3, 3 > const & a)
inlinenodiscardconstexpr

Definition at line 378 of file matrix_utils_inl.h.

◆ Invert() [5/7]

template<typename T>
NdArray< T, 3, 3 > superdex::Invert ( NdArray< T, 3, 3 > const & a,
T det )
inlinenodiscardconstexpr

Definition at line 383 of file matrix_utils_inl.h.

◆ Invert() [6/7]

template<typename T>
NdArray< T, 4, 4 > superdex::Invert ( NdArray< T, 4, 4 > const & A)
inlinenodiscardconstexpr

Definition at line 460 of file matrix_utils_inl.h.

◆ Invert() [7/7]

TransformRT superdex::Invert ( TransformRT const & a)
inlinenodiscard

Definition at line 244 of file transform_rt_inl.h.

◆ Invert2x2()

template<typename T>
Simd< T, 4 > superdex::Invert2x2 ( Simd< T, 4 > const & mat,
T det )
inlinenodiscard

Definition at line 495 of file matrix_utils_inl.h.

◆ Invert3x3() [1/3]

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::Invert3x3 ( NdArray< Simd< T, 4 >, 3 > const & mat)
inlinenodiscard

Definition at line 477 of file matrix_utils_inl.h.

◆ Invert3x3() [2/3]

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::Invert3x3 ( NdArray< Simd< T, 4 >, 3 > const & mat,
Simd< T, 4 > det )
inlinenodiscard

Definition at line 482 of file matrix_utils_inl.h.

◆ Invert3x3() [3/3]

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::Invert3x3 ( NdArray< Simd< T, 4 >, 3 > const & mat,
T det )
inline

Definition at line 490 of file matrix_utils_inl.h.

◆ Invert4x4()

template<typename T>
NdArray< Simd< T, 4 >, 4 > superdex::Invert4x4 ( NdArray< Simd< T, 4 >, 4 > const & A)
inlinenodiscardconstexpr

Definition at line 467 of file matrix_utils_inl.h.

◆ InvertRowMajor4x4()

template<typename T>
void superdex::InvertRowMajor4x4 ( T const m[16],
T invOut[16] )
inlineconstexpr

Definition at line 446 of file matrix_utils_inl.h.

◆ InvertTransformation()

template<typename T>
NdArray< Simd< T, 4 >, 4 > superdex::InvertTransformation ( NdArray< Simd< T, 4 >, 4 > const & mat)
inlinenodiscard

Definition at line 550 of file matrix_utils_inl.h.

◆ InvertTransformationTransposed()

template<typename T>
NdArray< Simd< T, 4 >, 4 > superdex::InvertTransformationTransposed ( NdArray< Simd< T, 4 >, 4 > const & mat)
inlinenodiscard

Definition at line 503 of file matrix_utils_inl.h.

◆ InvSkew3()

template<typename T>
Simd< T, 4 > superdex::InvSkew3 ( NdArray< Simd< T, 4 >, 3 > const & matrix)
inlinenodiscardconstexpr

Definition at line 896 of file matrix_utils_inl.h.

◆ IouterI()

auto superdex::IouterI ( )
inlineconstexpr

Definition at line 77 of file constants.h.

◆ IsDebuggerAttached()

bool superdex::IsDebuggerAttached ( )
nodiscard

Return true if we can detect that a debugger is attached to this process.

This may not be supported on all platforms.

Returns
bool

◆ IsFinite() [1/6]

template<class T, int DN, size_t D0, size_t... DIMS>
bool superdex::IsFinite ( NdArray< Simd< T, DN >, D0, DIMS... > const & a)
inlinenodiscard

Definition at line 427 of file math_utils_inl.h.

◆ IsFinite() [2/6]

template<class T, size_t D0, size_t... DIMS>
bool superdex::IsFinite ( NdArray< T, D0, DIMS... > const & a)
inlinenodiscard

Definition at line 436 of file math_utils_inl.h.

◆ IsFinite() [3/6]

bool superdex::IsFinite ( Quaternion const & q)
inlinenodiscard

Definition at line 193 of file quaternion_utils_inl.h.

◆ IsFinite() [4/6]

template<class T, int N>
bool superdex::IsFinite ( Simd< T, N > a)
inline

Definition at line 636 of file simd.h.

◆ IsFinite() [5/6]

template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
bool superdex::IsFinite ( T a)
inlinenodiscard

Definition at line 136 of file basic_utils.h.

◆ IsFinite() [6/6]

bool superdex::IsFinite ( TransformRT const & a)
inlinenodiscard

Definition at line 240 of file transform_rt_inl.h.

◆ isize() [1/2]

template<typename T>
int superdex::isize ( T const & a)
inlinenodiscardconstexpr

Definition at line 248 of file basic_utils.h.

◆ isize() [2/2]

template<typename T, size_t N>
int superdex::isize ( T const (&) array[N])
inlinenodiscardconstexpr

Definition at line 254 of file basic_utils.h.

◆ IsLogChannelEnabled()

bool superdex::IsLogChannelEnabled ( LogChannel channel)
inlinenodiscard

Definition at line 195 of file log.h.

◆ IsPowerOfTwo()

template<typename T>
bool superdex::IsPowerOfTwo ( T a)
inlinenodiscardconstexpr

Definition at line 321 of file basic_utils.h.

◆ IsTrue()

template<int i, class T, int N>
int superdex::IsTrue ( Simd< T, N > mask)
inline

Definition at line 796 of file simd_inl.h.

◆ LargestRow()

template<typename T, size_t D0, size_t D1>
auto superdex::LargestRow ( NdArray< T, D0, D1 > const & A,
T * sqrNorm = nullptr )
inlinenodiscardconstexpr

Definition at line 953 of file matrix_utils_inl.h.

◆ LargestRowColSym2x2()

auto superdex::LargestRowColSym2x2 ( VSymMatrix2x2r A,
Vec4r & outNormSqr )
inlinenodiscard

Definition at line 972 of file matrix_utils_inl.h.

◆ LargestRowColSym3x3()

auto superdex::LargestRowColSym3x3 ( VSymMatrix3x3r A,
Vec4r & outNormSqr )
inlinenodiscard

Definition at line 994 of file matrix_utils_inl.h.

◆ Lerp() [1/2]

Quaternion superdex::Lerp ( Quaternion a,
Quaternion b,
real t )
inlinenodiscard

Definition at line 44 of file quaternion_utils_inl.h.

◆ Lerp() [2/2]

template<typename T, typename Frac>
T superdex::Lerp ( T a,
T b,
Frac t )
inlinenodiscardconstexpr

Definition at line 263 of file basic_utils.h.

◆ Ln()

template<class T, int N>
Simd< T, N > superdex::Ln ( Simd< T, N > a)
inline

Definition at line 678 of file simd_inl.h.

◆ Load() [1/3]

template<int N, class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
V superdex::Load ( typename V::Scalar const * ptr)
inline

Definition at line 189 of file simd_inl.h.

◆ Load() [2/3]

template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
V superdex::Load ( typename V::Scalar const * ptr)
inline

Definition at line 184 of file simd_inl.h.

◆ Load() [3/3]

template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
V superdex::Load ( typename V::Scalar const * ptr,
int n )
inline

Definition at line 194 of file simd_inl.h.

◆ LoadIndexed()

template<class V, class I, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
V superdex::LoadIndexed ( typename V::Scalar const * ptr,
Simd< I, V::kSize > indices )
inline

Definition at line 200 of file simd_inl.h.

◆ LoadMatrix() [1/5]

template<size_t D0, size_t D1, typename T>
void superdex::LoadMatrix ( NdArray< Simd< T, 4 >, D0 > & out,
NdArray< T, D0, D1 > const & x )
inline

Definition at line 528 of file vmatrix.h.

◆ LoadMatrix() [2/5]

template<size_t D0, size_t D1, typename T, typename ConstOrNonConstT>
void superdex::LoadMatrix ( NdArray< Simd< T, 4 >, D0 > & out,
Span< ConstOrNonConstT > x )
inline

Definition at line 522 of file vmatrix.h.

◆ LoadMatrix() [3/5]

template<size_t D0, size_t D1, typename T>
void superdex::LoadMatrix ( NdArray< Simd< T, 4 >, D0 > & out,
T const * x )
inline

Definition at line 504 of file vmatrix.h.

◆ LoadMatrix() [4/5]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::LoadMatrix ( NdArray< Simd< T, 4 >, D0, D1, D2 > & out,
NdArray< T, D0, D1, D2, D3 > const & x )
inline

Definition at line 546 of file vmatrix.h.

◆ LoadMatrix() [5/5]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::LoadMatrix ( NdArray< Simd< T, 4 >, D0, D1, D2 > & out,
T const * x )
inline

Definition at line 533 of file vmatrix.h.

◆ LoadSubmatrix() [1/4]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::LoadSubmatrix ( NdArray< Simd< T, 4 >, D0 > & out,
Int2 coords,
NdArray< T, D2, D3 > const & x )
inline

Definition at line 575 of file vmatrix.h.

◆ LoadSubmatrix() [2/4]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T, typename ConstOrNonConstT>
void superdex::LoadSubmatrix ( NdArray< Simd< T, 4 >, D0 > & out,
Int2 coords,
Span< ConstOrNonConstT > x )
inline

Definition at line 568 of file vmatrix.h.

◆ LoadSubmatrix() [3/4]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::LoadSubmatrix ( NdArray< Simd< T, 4 >, D0 > & out,
Int2 coords,
Span< T > x )
inline

◆ LoadSubmatrix() [4/4]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::LoadSubmatrix ( NdArray< Simd< T, 4 >, D0 > & out,
Int2 coords,
T const * x )
inline

Definition at line 553 of file vmatrix.h.

◆ LoadTransposed() [1/2]

template<int kTupleCount = -1, class T, int N>
void superdex::LoadTransposed ( T const * ptr,
Simd< T, N > & out0,
Simd< T, N > & out1,
Simd< T, N > & out2 )
inline

Definition at line 207 of file simd_inl.h.

◆ LoadTransposed() [2/2]

template<int kTupleCount = -1, class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
void superdex::LoadTransposed ( typename V::Scalar const * ptr,
NdArray< V, 3 > & out )
inline

Definition at line 731 of file vmatrix.h.

◆ Log()

void superdex::Log ( LogChannel channel,
std::string msg,
char const * file,
int line,
bool newline )
inline

Definition at line 209 of file log.h.

◆ MakeColor() [1/2]

Color superdex::MakeColor ( uint32_t rgba)
nodiscardconstexpr

Creates a Color from a packed 32-bit RGBA value.

Unpacks a 32-bit unsigned integer into RGBA components where:

  • Bits 24-31: Red channel
  • Bits 16-23: Green channel
  • Bits 8-15: Blue channel
  • Bits 0-7: Alpha channel
Parameters
rgbaPacked RGBA value as a 32-bit unsigned integer
Returns
Color object with extracted RGBA components

Definition at line 56 of file color.h.

◆ MakeColor() [2/2]

Color superdex::MakeColor ( uint8_t r,
uint8_t g,
uint8_t b,
uint8_t a = 255 )
nodiscardconstexpr

Creates a Color from 4 unsigned bytes in RGBA order.

This is a convenience function to relax the requirements of the NdArray constructor (which disallows implicit conversion from int to uint8_t).

Definition at line 40 of file color.h.

◆ MakeConstSpan() [1/3]

template<typename ContainerT>
auto superdex::MakeConstSpan ( ContainerT const & container)
inlinenodiscard

Definition at line 167 of file span.h.

◆ MakeConstSpan() [2/3]

template<typename T, typename S>
Span< T const, S > superdex::MakeConstSpan ( Span< T, S > const & alreadyASpan)
inlinenodiscard

Definition at line 179 of file span.h.

◆ MakeConstSpan() [3/3]

template<typename T, size_t N>
auto superdex::MakeConstSpan ( T(&) arr[N])
inlinenodiscard

Definition at line 174 of file span.h.

◆ MakeSingletonConstSpan()

template<typename T>
Span< T const, size_t > superdex::MakeSingletonConstSpan ( T const & obj)
inlinenodiscard

Definition at line 189 of file span.h.

◆ MakeSingletonSpan()

template<typename T>
Span< T, size_t > superdex::MakeSingletonSpan ( T & obj)
inlinenodiscard

Definition at line 184 of file span.h.

◆ MakeSpan() [1/3]

template<typename ContainerT>
auto superdex::MakeSpan ( ContainerT & container)
inlinenodiscard

Definition at line 150 of file span.h.

◆ MakeSpan() [2/3]

template<typename T, typename S>
Span< T, S > const & superdex::MakeSpan ( Span< T, S > const & alreadyASpan)
inlinenodiscard

Definition at line 162 of file span.h.

◆ MakeSpan() [3/3]

template<typename T, size_t N>
auto superdex::MakeSpan ( T(&) arr[N])
inlinenodiscard

Definition at line 157 of file span.h.

◆ Max() [1/6]

template<typename T, size_t N>
T superdex::Max ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 202 of file math_utils_inl.h.

◆ Max() [2/6]

template<typename T, size_t N>
NdArray< T, N > superdex::Max ( NdArray< T, N > const & a,
NdArray< T, N > const & max )
inlinenodiscardconstexpr

Definition at line 310 of file math_utils_inl.h.

◆ Max() [3/6]

template<typename T, size_t N>
NdArray< T, N > superdex::Max ( NdArray< T, N > const & a,
T max )
inlinenodiscardconstexpr

Definition at line 268 of file math_utils_inl.h.

◆ Max() [4/6]

template<class T, int N>
Simd< T, N > superdex::Max ( Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 374 of file simd_inl.h.

◆ Max() [5/6]

template<typename T, typename... More>
T superdex::Max ( T a,
T b,
T c,
More... args )
inlinenodiscardconstexpr

Definition at line 166 of file basic_utils.h.

◆ Max() [6/6]

template<typename T>
T const & superdex::Max ( T const & a,
T const & b )
inlinenodiscardconstexpr

Definition at line 160 of file basic_utils.h.

◆ MaxElement()

template<class ForwardIt>
ForwardIt superdex::MaxElement ( ForwardIt first,
ForwardIt last )
inlineconstexpr

Definition at line 54 of file math_utils_inl.h.

◆ Mean()

template<typename T, size_t N>
T superdex::Mean ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 195 of file math_utils_inl.h.

◆ Min() [1/6]

template<typename T, size_t N>
T superdex::Min ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 215 of file math_utils_inl.h.

◆ Min() [2/6]

template<typename T, size_t N>
NdArray< T, N > superdex::Min ( NdArray< T, N > const & a,
NdArray< T, N > const & min )
inlinenodiscardconstexpr

Definition at line 319 of file math_utils_inl.h.

◆ Min() [3/6]

template<typename T, size_t N>
NdArray< T, N > superdex::Min ( NdArray< T, N > const & a,
T min )
inlinenodiscardconstexpr

Definition at line 277 of file math_utils_inl.h.

◆ Min() [4/6]

template<class T, int N>
Simd< T, N > superdex::Min ( Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 369 of file simd_inl.h.

◆ Min() [5/6]

template<typename T, typename... More>
T superdex::Min ( T a,
T b,
T c,
More... args )
inlinenodiscardconstexpr

Definition at line 155 of file basic_utils.h.

◆ Min() [6/6]

template<typename T>
T const & superdex::Min ( T const & a,
T const & b )
inlinenodiscardconstexpr

Definition at line 149 of file basic_utils.h.

◆ MinElement()

template<class ForwardIt>
ForwardIt superdex::MinElement ( ForwardIt first,
ForwardIt last )
inlineconstexpr

Definition at line 36 of file math_utils_inl.h.

◆ Minor4x4()

template<typename T>
T superdex::Minor4x4 ( T const m[16],
int r0,
int r1,
int r2,
int c0,
int c1,
int c2 )
inlineconstexpr

Definition at line 413 of file matrix_utils_inl.h.

◆ MulAdd() [1/2]

template<typename A, typename B, typename C>
auto superdex::MulAdd ( A a,
B b,
C c )
inlinenodiscardconstexpr

Definition at line 112 of file basic_utils.h.

◆ MulAdd() [2/2]

template<class T, int N>
Simd< T, N > superdex::MulAdd ( Simd< T, N > a,
Simd< T, N > b,
Simd< T, N > c )
inline

Definition at line 806 of file simd_inl.h.

◆ MulSub() [1/2]

template<typename A, typename B, typename C>
auto superdex::MulSub ( A a,
B b,
C c )
inlinenodiscardconstexpr

Definition at line 117 of file basic_utils.h.

◆ MulSub() [2/2]

template<class T, int N>
Simd< T, N > superdex::MulSub ( Simd< T, N > a,
Simd< T, N > b,
Simd< T, N > c )
inline

Definition at line 811 of file simd_inl.h.

◆ MultiplyConstexpr() [1/2]

template<typename A>
A superdex::MultiplyConstexpr ( A a)
inlineconstexpr

Definition at line 35 of file nd_array.h.

◆ MultiplyConstexpr() [2/2]

template<typename A, typename... ARGS>
A superdex::MultiplyConstexpr ( A a,
ARGS... args )
inlineconstexpr

Definition at line 39 of file nd_array.h.

◆ NearEqual() [1/10]

bool superdex::NearEqual ( MatrixTransformRT const & a,
MatrixTransformRT const & b,
real epsilon = kDefaultNearEqualEpsilon<real> )
inlinenodiscard

Definition at line 141 of file matrix_transform_rt_inl.h.

◆ NearEqual() [2/10]

bool superdex::NearEqual ( MatrixTransformRT const & a,
MatrixTransformRT const & b,
Vec4r epsilon )
inline

Definition at line 134 of file matrix_transform_rt_inl.h.

◆ NearEqual() [3/10]

template<typename T, size_t D0, int D1>
bool superdex::NearEqual ( NdArray< Simd< T, D1 >, D0 > const & a,
NdArray< Simd< T, D1 >, D0 > const & b,
T epsilon = kDefaultNearEqualEpsilon<T> )
inlinenodiscard

Definition at line 109 of file math_utils_inl.h.

◆ NearEqual() [4/10]

template<typename T, typename Eps = T, size_t D0, size_t... DIMS>
bool superdex::NearEqual ( NdArray< T, D0, DIMS... > const & a,
NdArray< T, D0, DIMS... > const & b,
Eps epsilon = kDefaultNearEqualEpsilon<T> )
inlinenodiscardconstexpr

Definition at line 85 of file math_utils_inl.h.

◆ NearEqual() [5/10]

bool superdex::NearEqual ( Quaternion const & a,
Quaternion const & b,
real epsilon = kDefaultNearEqualEpsilon<real> )
inlinenodiscard

Definition at line 31 of file quaternion_utils_inl.h.

◆ NearEqual() [6/10]

bool superdex::NearEqual ( Quaternion const & a,
Quaternion const & b,
Vec4r epsilon )
inlinenodiscard

Definition at line 27 of file quaternion_utils_inl.h.

◆ NearEqual() [7/10]

template<int COUNT = -1, class T, int N, class Eps = T>
bool superdex::NearEqual ( Simd< T, N > a,
Simd< T, N > b,
Eps epsilon = kDefaultNearEqualEpsilon<Eps> )
inline

Definition at line 612 of file simd.h.

◆ NearEqual() [8/10]

template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
auto superdex::NearEqual ( T const & a,
T const & b,
T epsilon = kDefaultNearEqualEpsilon<T> )
inlinenodiscardconstexpr

Definition at line 219 of file basic_utils.h.

◆ NearEqual() [9/10]

bool superdex::NearEqual ( TransformRT const & a,
TransformRT const & b,
real epsilon = kDefaultNearEqualEpsilon<real> )
inlinenodiscard

Definition at line 232 of file transform_rt_inl.h.

◆ NearEqual() [10/10]

bool superdex::NearEqual ( TransformRT const & a,
TransformRT const & b,
Vec4r epsilon )
inline

Definition at line 227 of file transform_rt_inl.h.

◆ NearEqualRel()

template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
auto superdex::NearEqualRel ( T const & a,
T const & b,
T epsilon = kDefaultNearEqualEpsilon<T> )
inlinenodiscardconstexpr

Definition at line 226 of file basic_utils.h.

◆ NearZero() [1/2]

template<int COUNT = -1, class T, int N, class Eps = T>
bool superdex::NearZero ( Simd< T, N > a,
Eps epsilon = kDefaultNearEqualEpsilon<Eps> )
inline

Definition at line 624 of file simd.h.

◆ NearZero() [2/2]

template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
auto superdex::NearZero ( T const & a,
T epsilon = kDefaultNearEqualEpsilon<T> )
inlinenodiscardconstexpr

Definition at line 234 of file basic_utils.h.

◆ Neg()

template<bool x, bool y, bool z, bool w, class T, int N>
Simd< T, N > superdex::Neg ( Simd< T, N > a)
inline

Definition at line 340 of file simd_inl.h.

◆ NegMulAdd() [1/2]

template<typename A, typename B, typename C>
auto superdex::NegMulAdd ( A a,
B b,
C c )
inlinenodiscardconstexpr

Definition at line 122 of file basic_utils.h.

◆ NegMulAdd() [2/2]

template<class T, int N>
Simd< T, N > superdex::NegMulAdd ( Simd< T, N > a,
Simd< T, N > b,
Simd< T, N > c )
inline

Definition at line 816 of file simd_inl.h.

◆ NegMulSub() [1/2]

template<typename A, typename B, typename C>
auto superdex::NegMulSub ( A a,
B b,
C c )
inlinenodiscardconstexpr

Definition at line 127 of file basic_utils.h.

◆ NegMulSub() [2/2]

template<class T, int N>
Simd< T, N > superdex::NegMulSub ( Simd< T, N > a,
Simd< T, N > b,
Simd< T, N > c )
inline

Definition at line 821 of file simd_inl.h.

◆ New()

template<class T, class A, class... Args>
T * superdex::New ( A * allocator,
Args &&... args )
inlinenodiscard

Create a new object of type T using memory allocated by a polymorphic Allocator.

Template Parameters
TType of object to create
AType of Allocator
ArgsOptional types forwarded to the constructor
Parameters
allocatorPointer to an Allocator instance
argsOptional arguments forwarded to the constructor for type T
Returns
T* Address of the new object
Note
The caller is responsible for calling Delete with the same Allocator instance, or a compatible Allocator instance (see Allocator::is_equal).

Definition at line 138 of file allocator.h.

◆ NextPowerOfTwo()

template<typename T>
T superdex::NextPowerOfTwo ( T a)
inlinenodiscardconstexpr

Definition at line 331 of file basic_utils.h.

◆ Norm() [1/4]

template<typename T, size_t N>
T superdex::Norm ( NdArray< T, N > const & a)
inlinenodiscard

Definition at line 123 of file math_utils_inl.h.

◆ Norm() [2/4]

template<typename T, size_t N, size_t M>
T superdex::Norm ( NdArray< T, N, M > const & a)
inlinenodiscard

Definition at line 39 of file matrix_utils_inl.h.

◆ Norm() [3/4]

real superdex::Norm ( Quaternion a)
inlinenodiscard

Definition at line 75 of file quaternion_utils_inl.h.

◆ Norm() [4/4]

template<int COUNT = -1, class T, int N>
T superdex::Norm ( Simd< T, N > a)
inline

Definition at line 854 of file simd_inl.h.

◆ Norm3x3()

template<typename T, size_t D0, int D1, std::enable_if_t< D0 > = 3 && D1 >= 3, superdex::ConceptMatch>
T superdex::Norm3x3 ( NdArray< Simd< T, D1 >, D0 > const & a)
inlinenodiscard

Definition at line 49 of file matrix_utils_inl.h.

◆ Normalize() [1/6]

template<typename T, size_t N>
NdArray< T, N > superdex::Normalize ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 153 of file math_utils_inl.h.

◆ Normalize() [2/6]

template<typename T, size_t N>
NdArray< T, N > superdex::Normalize ( NdArray< T, N > const & a,
T sqrNorm )
inlinenodiscardconstexpr

Definition at line 162 of file math_utils_inl.h.

◆ Normalize() [3/6]

Quaternion superdex::Normalize ( Quaternion a)
inlinenodiscard

Definition at line 79 of file quaternion_utils_inl.h.

◆ Normalize() [4/6]

template<int COUNT = -1, class T, int N>
Simd< T, N > superdex::Normalize ( Simd< T, N > a)
inlinenodiscard

Definition at line 859 of file simd_inl.h.

◆ Normalize() [5/6]

template<class T, int N>
Simd< T, N > superdex::Normalize ( Simd< T, N > a,
Simd< T, N > normSqr )
inlinenodiscard

Definition at line 866 of file simd_inl.h.

◆ Normalize() [6/6]

template<class T, int N>
Simd< T, N > superdex::Normalize ( Simd< T, N > a,
T normSqr )
inlinenodiscard

Definition at line 873 of file simd_inl.h.

◆ NormalizeRotation()

TransformRT superdex::NormalizeRotation ( TransformRT const & a)
inlinenodiscard

Definition at line 250 of file transform_rt_inl.h.

◆ NormSqr() [1/4]

template<typename T, size_t N>
T superdex::NormSqr ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 118 of file math_utils_inl.h.

◆ NormSqr() [2/4]

template<typename T, size_t N, size_t M>
T superdex::NormSqr ( NdArray< T, N, M > const & a)
inlinenodiscardconstexpr

Definition at line 30 of file matrix_utils_inl.h.

◆ NormSqr() [3/4]

real superdex::NormSqr ( Quaternion a)
inlinenodiscard

Definition at line 72 of file quaternion_utils_inl.h.

◆ NormSqr() [4/4]

template<int COUNT = -1, class T, int N>
T superdex::NormSqr ( Simd< T, N > a)
inline

Definition at line 849 of file simd_inl.h.

◆ NormSqr3x3()

template<typename T, size_t D0, int D1, std::enable_if_t< D0 > = 3 && D1 >= 3, superdex::ConceptMatch>
T superdex::NormSqr3x3 ( NdArray< Simd< T, D1 >, D0 > const & a)
inlinenodiscard

Definition at line 44 of file matrix_utils_inl.h.

◆ NotEqual() [1/2]

template<int COUNT = -1, class T, int N>
bool superdex::NotEqual ( Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 719 of file simd_inl.h.

◆ NotEqual() [2/2]

template<typename T>
auto superdex::NotEqual ( T const & a,
T const & b )
inlinenodiscardconstexpr

Definition at line 213 of file basic_utils.h.

◆ operator!=() [1/2]

template<typename T, size_t D0, size_t... DIMS>
bool superdex::operator!= ( NdArray< Simd< T, 4 >, D0, DIMS... > const & lhs,
NdArray< Simd< T, 4 >, D0, DIMS... > const & rhs )
inlinenodiscardconstexpr

Definition at line 309 of file vmatrix.h.

◆ operator!=() [2/2]

template<typename T, size_t D0, size_t... DIMS>
bool superdex::operator!= ( NdArray< T, D0, DIMS... > const & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 227 of file nd_array.h.

◆ operator""_r() [1/2]

real superdex::operator""_r ( long double val)
inlineconstexpr

Definition at line 118 of file mochi_config.h.

◆ operator""_r() [2/2]

real superdex::operator""_r ( unsigned long long int val)
inlineconstexpr

Definition at line 121 of file mochi_config.h.

◆ operator""_uz()

size_t superdex::operator""_uz ( unsigned long long int val)
inlineconstexpr

Definition at line 132 of file mochi_config.h.

◆ operator""_z()

ptrdiff_t superdex::operator""_z ( unsigned long long int val)
inlineconstexpr

Definition at line 129 of file mochi_config.h.

◆ operator&&()

template<class T, int N>
Simd< T, N > superdex::operator&& ( Simd< T, N > lhs,
Simd< T, N > rhs )
inlinenodiscard

Definition at line 95 of file simd_inl.h.

◆ operator&=()

template<class T, int N, class RHS>
Simd< T, N > & superdex::operator&= ( Simd< T, N > & lhs,
RHS rhs )
inline

Definition at line 69 of file simd_inl.h.

◆ operator*() [1/9]

template<typename T, int N, size_t D0, size_t... DIMS>
NdArray< Simd< T, N >, D0, DIMS... > superdex::operator* ( NdArray< Simd< T, N >, D0, DIMS... > const & lhs,
T rhs )
inlineconstexpr

Definition at line 276 of file vmatrix.h.

◆ operator*() [2/9]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator* ( NdArray< T, D0, DIMS... > const & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 286 of file nd_array.h.

◆ operator*() [3/9]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator* ( NdArray< T, D0, DIMS... > const & lhs,
T rhs )
inlineconstexpr

Definition at line 286 of file nd_array.h.

◆ operator*() [4/9]

Quaternion superdex::operator* ( Quaternion a,
real b )
inlinenodiscard

Definition at line 181 of file quaternion_utils_inl.h.

◆ operator*() [5/9]

Quaternion superdex::operator* ( real a,
Quaternion b )
inlinenodiscard

Definition at line 177 of file quaternion_utils_inl.h.

◆ operator*() [6/9]

template<class T, int N>
auto superdex::operator* ( Simd< T, N > lhs,
T rhs )
inline

Definition at line 76 of file simd_inl.h.

◆ operator*() [7/9]

template<typename T, int N, size_t D0, size_t... DIMS>
NdArray< Simd< T, N >, D0, DIMS... > superdex::operator* ( T lhs,
NdArray< Simd< T, N >, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 276 of file vmatrix.h.

◆ operator*() [8/9]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator* ( T lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 286 of file nd_array.h.

◆ operator*() [9/9]

template<class T, int N>
auto superdex::operator* ( T lhs,
Simd< T, N > rhs )
inline

Definition at line 76 of file simd_inl.h.

◆ operator*=() [1/4]

template<typename T, size_t D0, size_t... DIMS, typename AnyRHS>
NdArray< T, D0, DIMS... > & superdex::operator*= ( NdArray< T, D0, DIMS... > & lhs,
AnyRHS const & rhs )
inlineconstexpr

Definition at line 286 of file nd_array.h.

◆ operator*=() [2/4]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > & superdex::operator*= ( NdArray< T, D0, DIMS... > & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 286 of file nd_array.h.

◆ operator*=() [3/4]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > & superdex::operator*= ( NdArray< T, D0, DIMS... > & lhs,
T rhs )
inlineconstexpr

Definition at line 286 of file nd_array.h.

◆ operator*=() [4/4]

template<class T, int N, class RHS>
Simd< T, N > & superdex::operator*= ( Simd< T, N > & lhs,
RHS rhs )
inline

Definition at line 67 of file simd_inl.h.

◆ operator+() [1/7]

template<typename T, int N, size_t D0, size_t... DIMS>
NdArray< Simd< T, N >, D0, DIMS... > superdex::operator+ ( NdArray< Simd< T, N >, D0, DIMS... > const & lhs,
T rhs )
inlineconstexpr

Definition at line 274 of file vmatrix.h.

◆ operator+() [2/7]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator+ ( NdArray< T, D0, DIMS... > const & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 284 of file nd_array.h.

◆ operator+() [3/7]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator+ ( NdArray< T, D0, DIMS... > const & lhs,
T rhs )
inlineconstexpr

Definition at line 284 of file nd_array.h.

◆ operator+() [4/7]

template<class T, int N>
auto superdex::operator+ ( Simd< T, N > lhs,
T rhs )
inline

Definition at line 74 of file simd_inl.h.

◆ operator+() [5/7]

template<typename T, int N, size_t D0, size_t... DIMS>
NdArray< Simd< T, N >, D0, DIMS... > superdex::operator+ ( T lhs,
NdArray< Simd< T, N >, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 274 of file vmatrix.h.

◆ operator+() [6/7]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator+ ( T lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 284 of file nd_array.h.

◆ operator+() [7/7]

template<class T, int N>
auto superdex::operator+ ( T lhs,
Simd< T, N > rhs )
inline

Definition at line 74 of file simd_inl.h.

◆ operator+=() [1/4]

template<typename T, size_t D0, size_t... DIMS, typename AnyRHS>
NdArray< T, D0, DIMS... > & superdex::operator+= ( NdArray< T, D0, DIMS... > & lhs,
AnyRHS const & rhs )
inlineconstexpr

Definition at line 284 of file nd_array.h.

◆ operator+=() [2/4]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > & superdex::operator+= ( NdArray< T, D0, DIMS... > & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 284 of file nd_array.h.

◆ operator+=() [3/4]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > & superdex::operator+= ( NdArray< T, D0, DIMS... > & lhs,
T rhs )
inlineconstexpr

Definition at line 284 of file nd_array.h.

◆ operator+=() [4/4]

template<class T, int N, class RHS>
Simd< T, N > & superdex::operator+= ( Simd< T, N > & lhs,
RHS rhs )
inline

Definition at line 65 of file simd_inl.h.

◆ operator-() [1/8]

template<typename T, int N, size_t D0, size_t... DIMS>
NdArray< Simd< T, N >, D0, DIMS... > superdex::operator- ( NdArray< Simd< T, N >, D0, DIMS... > const & lhs,
T rhs )
inlineconstexpr

Definition at line 275 of file vmatrix.h.

◆ operator-() [2/8]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator- ( NdArray< T, D0, DIMS... > const & a)
inlineconstexpr

Definition at line 184 of file nd_array.h.

◆ operator-() [3/8]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator- ( NdArray< T, D0, DIMS... > const & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 285 of file nd_array.h.

◆ operator-() [4/8]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator- ( NdArray< T, D0, DIMS... > const & lhs,
T rhs )
inlineconstexpr

Definition at line 285 of file nd_array.h.

◆ operator-() [5/8]

template<class T, int N>
auto superdex::operator- ( Simd< T, N > lhs,
T rhs )
inline

Definition at line 75 of file simd_inl.h.

◆ operator-() [6/8]

template<typename T, int N, size_t D0, size_t... DIMS>
NdArray< Simd< T, N >, D0, DIMS... > superdex::operator- ( T lhs,
NdArray< Simd< T, N >, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 275 of file vmatrix.h.

◆ operator-() [7/8]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator- ( T lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 285 of file nd_array.h.

◆ operator-() [8/8]

template<class T, int N>
auto superdex::operator- ( T lhs,
Simd< T, N > rhs )
inline

Definition at line 75 of file simd_inl.h.

◆ operator-=() [1/4]

template<typename T, size_t D0, size_t... DIMS, typename AnyRHS>
NdArray< T, D0, DIMS... > & superdex::operator-= ( NdArray< T, D0, DIMS... > & lhs,
AnyRHS const & rhs )
inlineconstexpr

Definition at line 285 of file nd_array.h.

◆ operator-=() [2/4]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > & superdex::operator-= ( NdArray< T, D0, DIMS... > & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 285 of file nd_array.h.

◆ operator-=() [3/4]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > & superdex::operator-= ( NdArray< T, D0, DIMS... > & lhs,
T rhs )
inlineconstexpr

Definition at line 285 of file nd_array.h.

◆ operator-=() [4/4]

template<class T, int N, class RHS>
Simd< T, N > & superdex::operator-= ( Simd< T, N > & lhs,
RHS rhs )
inline

Definition at line 66 of file simd_inl.h.

◆ operator/() [1/8]

template<typename T, int N, size_t D0, size_t... DIMS>
NdArray< Simd< T, N >, D0, DIMS... > superdex::operator/ ( NdArray< Simd< T, N >, D0, DIMS... > const & lhs,
T rhs )
inlineconstexpr

Definition at line 277 of file vmatrix.h.

◆ operator/() [2/8]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator/ ( NdArray< T, D0, DIMS... > const & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 287 of file nd_array.h.

◆ operator/() [3/8]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator/ ( NdArray< T, D0, DIMS... > const & lhs,
T rhs )
inlineconstexpr

Definition at line 287 of file nd_array.h.

◆ operator/() [4/8]

Quaternion superdex::operator/ ( Quaternion a,
real b )
inlinenodiscard

Definition at line 185 of file quaternion_utils_inl.h.

◆ operator/() [5/8]

template<class T, int N>
auto superdex::operator/ ( Simd< T, N > lhs,
T rhs )
inline

Definition at line 77 of file simd_inl.h.

◆ operator/() [6/8]

template<typename T, int N, size_t D0, size_t... DIMS>
NdArray< Simd< T, N >, D0, DIMS... > superdex::operator/ ( T lhs,
NdArray< Simd< T, N >, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 277 of file vmatrix.h.

◆ operator/() [7/8]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > superdex::operator/ ( T lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 287 of file nd_array.h.

◆ operator/() [8/8]

template<class T, int N>
auto superdex::operator/ ( T lhs,
Simd< T, N > rhs )
inline

Definition at line 77 of file simd_inl.h.

◆ operator/=() [1/4]

template<typename T, size_t D0, size_t... DIMS, typename AnyRHS>
NdArray< T, D0, DIMS... > & superdex::operator/= ( NdArray< T, D0, DIMS... > & lhs,
AnyRHS const & rhs )
inlineconstexpr

Definition at line 287 of file nd_array.h.

◆ operator/=() [2/4]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > & superdex::operator/= ( NdArray< T, D0, DIMS... > & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 287 of file nd_array.h.

◆ operator/=() [3/4]

template<typename T, size_t D0, size_t... DIMS>
NdArray< T, D0, DIMS... > & superdex::operator/= ( NdArray< T, D0, DIMS... > & lhs,
T rhs )
inlineconstexpr

Definition at line 287 of file nd_array.h.

◆ operator/=() [4/4]

template<class T, int N, class RHS>
Simd< T, N > & superdex::operator/= ( Simd< T, N > & lhs,
RHS rhs )
inline

Definition at line 68 of file simd_inl.h.

◆ operator==() [1/2]

template<typename T, size_t D0>
bool superdex::operator== ( NdArray< Simd< T, 4 >, D0 > const & lhs,
NdArray< Simd< T, 4 >, D0 > const & rhs )
inlinenodiscardconstexpr

Definition at line 287 of file vmatrix.h.

◆ operator==() [2/2]

template<typename T, size_t D0, size_t... DIMS>
bool superdex::operator== ( NdArray< T, D0, DIMS... > const & lhs,
NdArray< T, D0, DIMS... > const & rhs )
inlineconstexpr

Definition at line 191 of file nd_array.h.

◆ operator^=()

template<class T, int N, class RHS>
Simd< T, N > & superdex::operator^= ( Simd< T, N > & lhs,
RHS rhs )
inline

Definition at line 71 of file simd_inl.h.

◆ operator|=()

template<class T, int N, class RHS>
Simd< T, N > & superdex::operator|= ( Simd< T, N > & lhs,
RHS rhs )
inline

Definition at line 70 of file simd_inl.h.

◆ operator||()

template<class T, int N>
Simd< T, N > superdex::operator|| ( Simd< T, N > lhs,
Simd< T, N > rhs )
inlinenodiscard

Definition at line 103 of file simd_inl.h.

◆ OrthogonalVector() [1/2]

template<typename T>
NdArray< T, 2 > superdex::OrthogonalVector ( NdArray< T, 2 > const & vec)
inlinenodiscardconstexpr

Definition at line 388 of file math_utils_inl.h.

◆ OrthogonalVector() [2/2]

template<typename T>
NdArray< T, 3 > superdex::OrthogonalVector ( NdArray< T, 3 > const & vec)
inlinenodiscardconstexpr

Definition at line 393 of file math_utils_inl.h.

◆ OrthogonalVector3() [1/2]

template<typename T, int N>
Simd< T, 4 > superdex::OrthogonalVector3 ( Simd< T, 4 > a)
inline

◆ OrthogonalVector3() [2/2]

template<class T>
Simd< T, 4 > superdex::OrthogonalVector3 ( Simd< T, 4 > a)
inline

Definition at line 878 of file simd_inl.h.

◆ Outer() [1/3]

template<typename T>
NdArray< T, 2, 2 > superdex::Outer ( NdArray< T, 2 > const & a,
NdArray< T, 2 > const & b )
inlinenodiscardconstexpr

Definition at line 222 of file matrix_utils_inl.h.

◆ Outer() [2/3]

template<typename T>
NdArray< T, 3, 2 > superdex::Outer ( NdArray< T, 3 > const & a,
NdArray< T, 2 > const & b )
inlinenodiscardconstexpr

Definition at line 229 of file matrix_utils_inl.h.

◆ Outer() [3/3]

template<typename T>
NdArray< T, 3, 3 > superdex::Outer ( NdArray< T, 3 > const & a,
NdArray< T, 3 > const & b )
inlinenodiscardconstexpr

Definition at line 239 of file matrix_utils_inl.h.

◆ Outer2()

template<typename T>
NdArray< Simd< T, 4 >, 2, 2 > superdex::Outer2 ( Simd< T, 4 > const & a,
Simd< T, 4 > const & b )
inlinenodiscard

Definition at line 327 of file matrix_utils_inl.h.

◆ Outer3() [1/6]

template<typename T>
NdArray< Simd< T, 4 >, 3, 3 > superdex::Outer3 ( NdArray< Simd< T, 4 >, 3 > const & mat,
Simd< T, 4 > const & vec )
inlinenodiscard

Definition at line 271 of file matrix_utils_inl.h.

◆ Outer3() [2/6]

template<typename T>
NdArray< Simd< T, 4 >, 3, 3, 3 > superdex::Outer3 ( NdArray< Simd< T, 4 >, 3 > const & mat0,
NdArray< Simd< T, 4 >, 3 > const & mat1 )
inlinenodiscard

Definition at line 308 of file matrix_utils_inl.h.

◆ Outer3() [3/6]

template<typename T>
NdArray< Simd< T, 4 >, 3, 3, 3 > superdex::Outer3 ( NdArray< Simd< T, 4 >, 3, 3 > const & ten,
Simd< T, 4 > const & vec )
inlinenodiscard

Definition at line 282 of file matrix_utils_inl.h.

◆ Outer3() [4/6]

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::Outer3 ( Simd< T, 4 > a,
Simd< T, 4 > b )
inlinenodiscard

Definition at line 250 of file matrix_utils_inl.h.

◆ Outer3() [5/6]

template<typename T>
NdArray< Simd< T, 4 >, 3, 3 > superdex::Outer3 ( Simd< T, 4 > const & vec,
NdArray< Simd< T, 4 >, 3 > const & mat )
inlinenodiscard

Definition at line 259 of file matrix_utils_inl.h.

◆ Outer3() [6/6]

template<typename T>
NdArray< Simd< T, 4 >, 3, 3, 3 > superdex::Outer3 ( Simd< T, 4 > const & vec,
NdArray< Simd< T, 4 >, 3, 3 > const & ten )
inlinenodiscard

Definition at line 295 of file matrix_utils_inl.h.

◆ OuterSym3()

template<typename T>
NdArray< Simd< T, 4 >, 2 > superdex::OuterSym3 ( Simd< T, 4 > a,
Simd< T, 4 > b )
inlinenodiscard

Definition at line 321 of file matrix_utils_inl.h.

◆ Pow()

template<typename B, typename E>
B superdex::Pow ( B base,
E exp )
inlinenodiscardconstexpr

Definition at line 293 of file basic_utils.h.

◆ Prod()

template<typename T, size_t N>
T superdex::Prod ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 184 of file math_utils_inl.h.

◆ PseudoInvert()

template<typename T>
void superdex::PseudoInvert ( NdArray< T, 3, 2 > const & a,
NdArray< T, 2, 3 > * outInv,
T * outDet )
inline

Definition at line 402 of file matrix_utils_inl.h.

◆ QuaternionFromMatrix() [1/2]

Quaternion superdex::QuaternionFromMatrix ( Matrix3x3r const & matrix,
real eps = 1e-3_r )
inlinenodiscard

Definition at line 152 of file quaternion_utils_inl.h.

◆ QuaternionFromMatrix() [2/2]

Quaternion superdex::QuaternionFromMatrix ( VMatrix3x3r const & matrix,
real eps = 1e-3_r )
inlinenodiscard

Definition at line 87 of file quaternion_utils_inl.h.

◆ Rcp()

template<typename T>
T superdex::Rcp ( T a)
inlinenodiscardconstexpr

Definition at line 369 of file basic_utils.h.

◆ RcpApprox() [1/2]

template<class T, int N>
Simd< T, N > superdex::RcpApprox ( Simd< T, N > a)
inline

Definition at line 354 of file simd_inl.h.

◆ RcpApprox() [2/2]

template<typename T>
T superdex::RcpApprox ( T a)
inlinenodiscardconstexpr

Definition at line 375 of file basic_utils.h.

◆ RcpSqrtApprox()

template<class T, int N>
Simd< T, N > superdex::RcpSqrtApprox ( Simd< T, N > a)
inline

Definition at line 359 of file simd_inl.h.

◆ Rect() [1/2]

template<typename T, size_t N, bool MinInclusiveT, bool MaxInclusiveT>
NdArray< T, N > superdex::Rect ( NdArray< T, N > const & a,
NdArray< T, N > const & min,
NdArray< T, N > const & max,
std::integral_constant< bool, MinInclusiveT > minInclusive = std::true_type{},
std::integral_constant< bool, MaxInclusiveT > maxInclusive = std::false_type{} )
inlinenodiscardconstexpr

Definition at line 296 of file math_utils_inl.h.

◆ Rect() [2/2]

template<typename ValT, typename MinT, typename MaxT, bool kMinInclusive, bool kMaxInclusive>
ValT superdex::Rect ( ValT value,
MinT min,
MaxT max,
std::integral_constant< bool, kMinInclusive > = std::true_type{},
std::integral_constant< bool, kMaxInclusive > = std::false_type{} )
inlinenodiscardconstexpr

Definition at line 176 of file basic_utils.h.

◆ Remap()

template<typename T>
T superdex::Remap ( T value,
T inA,
T inB,
T outA,
T outB )
inlinenodiscardconstexpr

Definition at line 274 of file basic_utils.h.

◆ RemapAndClamp()

template<typename T>
T superdex::RemapAndClamp ( T value,
T inA,
T inB,
T outA,
T outB )
inlinenodiscardconstexpr

Definition at line 284 of file basic_utils.h.

◆ Repivot()

TransformRT superdex::Repivot ( TransformRT const & transform,
Real3 const & pivot )
inlinenodiscard

Definition at line 254 of file transform_rt_inl.h.

◆ Round() [1/2]

template<typename T, size_t N>
NdArray< T, N > superdex::Round ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 250 of file math_utils_inl.h.

◆ Round() [2/2]

template<typename T>
T superdex::Round ( T a)
inlinenodiscardconstexpr

Definition at line 396 of file basic_utils.h.

◆ RoundDown()

template<typename T>
T superdex::RoundDown ( T numToRound,
T multiple )
inlinenodiscardconstexpr

Definition at line 408 of file basic_utils.h.

◆ RoundUp()

template<typename T>
T superdex::RoundUp ( T numToRound,
T multiple )
inlinenodiscardconstexpr

Definition at line 401 of file basic_utils.h.

◆ Select() [1/2]

template<typename T>
T superdex::Select ( bool condition,
T a,
T b )
inlinenodiscardconstexpr

Definition at line 423 of file basic_utils.h.

◆ Select() [2/2]

template<class T, int N, class MaskT>
Simd< T, N > superdex::Select ( Simd< MaskT, N > conditionMask,
Simd< T, N > a,
Simd< T, N > b )
inline

Definition at line 252 of file simd_inl.h.

◆ Sequence()

template<class V>
V superdex::Sequence ( )
inlinenodiscard

Definition at line 325 of file simd_inl.h.

◆ Set() [1/2]

template<class T, int N>
Simd< T, N > superdex::Set ( Simd< T, N > a,
int i,
T value )
inlinenodiscard

Definition at line 320 of file simd_inl.h.

◆ Set() [2/2]

template<int i, class T, int N>
Simd< T, N > superdex::Set ( Simd< T, N > a,
T value )
inlinenodiscard

Definition at line 315 of file simd_inl.h.

◆ SetLogCallback()

void superdex::SetLogCallback ( LogFn fn)
inline

Definition at line 175 of file log.h.

◆ SetRotationVector() [1/2]

void superdex::SetRotationVector ( Real3 const & rotVec,
TransformRT & outTransform )
inline

Definition at line 40 of file transform_rt_utils.h.

◆ SetRotationVector() [2/2]

void superdex::SetRotationVector ( Vec4r const & rotVec,
TransformRT & outTransform )
inline

Definition at line 36 of file transform_rt_utils.h.

◆ ShiftRight()

template<int kShift, class T, int N>
Simd< T, N > superdex::ShiftRight ( Simd< T, N > a)
inline

Definition at line 260 of file simd_inl.h.

◆ Shuffle() [1/3]

template<int x = 0, int y = 1, class T>
Simd< T, 2 > superdex::Shuffle ( Simd< T, 2 > a)
inline

Definition at line 270 of file simd_inl.h.

◆ Shuffle() [2/3]

template<int x = 0, int y = 1, int z = 2, int w = 3, class T>
Simd< T, 4 > superdex::Shuffle ( Simd< T, 4 > a)
inline

Definition at line 275 of file simd_inl.h.

◆ Shuffle() [3/3]

template<int x, int y, int z, int w, class T>
Simd< T, 4 > superdex::Shuffle ( Simd< T, 4 > a,
Simd< T, 4 > b )
inline

Definition at line 280 of file simd_inl.h.

◆ Sign()

template<typename T>
T superdex::Sign ( T x)
inlinenodiscardconstexpr

Definition at line 434 of file basic_utils.h.

◆ SignedSqr()

template<typename T>
T superdex::SignedSqr ( T a)
inlinenodiscardconstexpr

Definition at line 304 of file basic_utils.h.

◆ SignedSqrt()

template<typename T>
T superdex::SignedSqrt ( T a)
inlinenodiscardconstexpr

Definition at line 26 of file basic_utils_inl.h.

◆ SimdBasisVector() [1/2]

template<int i, class V = Vec4r>
V superdex::SimdBasisVector ( )
inline

Definition at line 151 of file simd_inl.h.

◆ SimdBasisVector() [2/2]

template<class V = Vec4r>
V superdex::SimdBasisVector ( int axis)
inline

Definition at line 156 of file simd_inl.h.

◆ SimdFullToSym() [1/2]

template<typename T>
NdArray< Simd< T, 4 >, 2 > superdex::SimdFullToSym ( NdArray< Simd< T, 4 >, 3 > const & m)
inlinenodiscard

Definition at line 334 of file vmatrix.h.

◆ SimdFullToSym() [2/2]

template<typename T>
Simd< T, 4 > superdex::SimdFullToSym ( Simd< T, 4 > const & m)
inlinenodiscard

Definition at line 342 of file vmatrix.h.

◆ SimdMask()

template<class V, class... MoreBools>
V superdex::SimdMask ( bool b0,
bool b1,
MoreBools... bs )
inline

Definition at line 137 of file simd_inl.h.

◆ SimdSymToFull() [1/2]

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::SimdSymToFull ( NdArray< Simd< T, 4 >, 2 > const & m)
inlinenodiscard

Definition at line 320 of file vmatrix.h.

◆ SimdSymToFull() [2/2]

template<typename T>
Simd< T, 4 > superdex::SimdSymToFull ( Simd< T, 4 > const & m)
inlinenodiscard

Definition at line 329 of file vmatrix.h.

◆ SimdZero()

template<class V = Vec4r>
V superdex::SimdZero ( )
inline

Definition at line 146 of file simd_inl.h.

◆ Sin() [1/2]

template<class T, int N>
Simd< T, N > superdex::Sin ( Simd< T, N > a)
inline

Definition at line 483 of file simd_inl.h.

◆ Sin() [2/2]

template<typename T>
T superdex::Sin ( T a)
inlinenodiscardconstexpr

Definition at line 448 of file basic_utils.h.

◆ Sinc()

template<typename T>
T superdex::Sinc ( T a)
inlinenodiscardconstexpr

Definition at line 68 of file basic_utils_inl.h.

◆ SinCos()

template<class T, int N>
std::pair< Simd< T, N >, Simd< T, N > > superdex::SinCos ( Simd< T, N > a)
inline

Definition at line 502 of file simd_inl.h.

◆ Skew()

template<typename T>
NdArray< T, 3, 3 > superdex::Skew ( NdArray< T, 3 > const & v)
inlinenodiscardconstexpr

Definition at line 875 of file matrix_utils_inl.h.

◆ Skew3()

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::Skew3 ( Simd< T, 4 > const & vector)
inlinenodiscardconstexpr

Definition at line 885 of file matrix_utils_inl.h.

◆ Slerp()

Quaternion superdex::Slerp ( Quaternion a,
Quaternion b,
real t )
inlinenodiscard

Definition at line 48 of file quaternion_utils_inl.h.

◆ Sqr()

template<typename T>
T superdex::Sqr ( T a)
inlinenodiscardconstexpr

Definition at line 298 of file basic_utils.h.

◆ Sqrt() [1/2]

template<class T, int N>
Simd< T, N > superdex::Sqrt ( Simd< T, N > a)
inline

Definition at line 348 of file simd_inl.h.

◆ Sqrt() [2/2]

template<typename T>
T superdex::Sqrt ( T a)
inlinenodiscardconstexpr

Definition at line 309 of file basic_utils.h.

◆ StaticCast() [1/4]

template<typename To, typename From, std::enable_if_t< std::is_arithmetic_v< From > &&std::is_arithmetic_v< To >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
To superdex::StaticCast ( From const & a)
inlinenodiscardconstexpr

Definition at line 79 of file basic_utils.h.

◆ StaticCast() [2/4]

template<class To, class From, std::enable_if_t< IsSimd< To > &&IsSimd< From >, superdex::ConceptMatch >>
To superdex::StaticCast ( From const & a)
inlinenodiscard

Definition at line 713 of file simd_composite_inl.h.

◆ StaticCast() [3/4]

template<class To, class FromT, int FromN>
requires (IsSimd<To> && Simd<FromT, FromN>::kIsSupported)
To superdex::StaticCast ( Simd< FromT, FromN > const & in)
inline

Definition at line 527 of file simd_arch_emulator_inl.h.

◆ StaticCast() [4/4]

template<class VecTo, class VecFrom, std::enable_if_t< IsSimd< VecTo > &&IsSimd< VecFrom >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
VecTo superdex::StaticCast ( VecFrom const & a)
inline

StaticCast from one Simd type to another of the same size.

Note
The generic version is a fallback. Specializations are provided for specific pairs of types.

◆ Store() [1/2]

template<int COUNT = -1, class T, int N>
void superdex::Store ( T * ptr,
Simd< T, N > a )
inline

Definition at line 213 of file simd_inl.h.

◆ Store() [2/2]

template<class T, int N>
void superdex::Store ( T * ptr,
Simd< T, N > a,
int count )
inline

Definition at line 219 of file simd_inl.h.

◆ StoreMatrix() [1/5]

template<size_t D0, size_t D1, typename T>
void superdex::StoreMatrix ( NdArray< T, D0, D1 > & out,
NdArray< Simd< T, 4 >, D0 > const & x )
inline

Definition at line 603 of file vmatrix.h.

◆ StoreMatrix() [2/5]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::StoreMatrix ( NdArray< T, D0, D1, D2, D3 > & out,
NdArray< Simd< T, 4 >, D0, D1, D2 > const & x )
inline

Definition at line 620 of file vmatrix.h.

◆ StoreMatrix() [3/5]

template<size_t D0, size_t D1, typename T>
void superdex::StoreMatrix ( Span< T > out,
NdArray< Simd< T, 4 >, D0 > const & x )
inline

Definition at line 597 of file vmatrix.h.

◆ StoreMatrix() [4/5]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::StoreMatrix ( T * out,
NdArray< Simd< T, 4 >, D0, D1, D2 > const & x )
inline

Definition at line 608 of file vmatrix.h.

◆ StoreMatrix() [5/5]

template<size_t D0, size_t D1, typename T>
void superdex::StoreMatrix ( T * outData,
NdArray< Simd< T, 4 >, D0 > const & x )
inline

Definition at line 580 of file vmatrix.h.

◆ StoreSelected()

template<class T, int N, class MaskT>
int superdex::StoreSelected ( T * ptr,
Simd< MaskT, N > condition,
Simd< T, N > values )
inline

Definition at line 225 of file simd_inl.h.

◆ StoreSubmatrix() [1/3]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::StoreSubmatrix ( NdArray< T, D2, D3 > & out,
Int2 coords,
NdArray< Simd< T, 4 >, D0 > const & x )
inline

Definition at line 646 of file vmatrix.h.

◆ StoreSubmatrix() [2/3]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::StoreSubmatrix ( Span< T > out,
Int2 coords,
NdArray< Simd< T, 4 >, D0 > const & x )
inline

Definition at line 639 of file vmatrix.h.

◆ StoreSubmatrix() [3/3]

template<size_t D0, size_t D1, size_t D2, size_t D3, typename T>
void superdex::StoreSubmatrix ( T * out,
Int2 coords,
NdArray< Simd< T, 4 >, D0 > const & x )
inline

Definition at line 627 of file vmatrix.h.

◆ StoreTransposed() [1/2]

template<int kTupleCount = -1, class T, int N>
void superdex::StoreTransposed ( T * ptr,
Simd< T, N > a,
Simd< T, N > b,
Simd< T, N > c )
inline

Definition at line 245 of file simd_inl.h.

◆ StoreTransposed() [2/2]

template<int kTupleCount = -1, class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
void superdex::StoreTransposed ( typename V::Scalar * ptr,
NdArray< V, 3 > const & src )
inline

Definition at line 740 of file vmatrix.h.

◆ Sum()

template<typename T, size_t N>
T superdex::Sum ( NdArray< T, N > const & a)
inlinenodiscardconstexpr

Definition at line 173 of file math_utils_inl.h.

◆ SymMatrix2x2()

template<typename T>
NdArray< T, 2, 2 > superdex::SymMatrix2x2 ( T a00,
T a01,
T a11 )
inlinenodiscardconstexpr

Definition at line 580 of file matrix_utils_inl.h.

◆ Tan() [1/2]

template<class T, int N>
Simd< T, N > superdex::Tan ( Simd< T, N > a)
inline

Definition at line 521 of file simd_inl.h.

◆ Tan() [2/2]

template<typename T>
T superdex::Tan ( T a)
inlinenodiscardconstexpr

Definition at line 461 of file basic_utils.h.

◆ Tanh()

template<class T, int N>
Simd< T, N > superdex::Tanh ( Simd< T, N > a)
inline

Definition at line 688 of file simd_inl.h.

◆ ToFloat3()

Float3 superdex::ToFloat3 ( Color const & color)
nodiscardconstexpr

Converts a Color to a normalized Float3 vector (RGB only).

Converts the RGB channels of a Color to a Float3 vector with values normalized to the range [0.0f, 1.0f]. The alpha channel is discarded.

Parameters
colorInput color to convert
Returns
Float3 vector with normalized RGB values (0.0f - 1.0f)

Definition at line 73 of file color.h.

◆ ToFloat4()

Float4 superdex::ToFloat4 ( Color const & color)
nodiscardconstexpr

Converts a Color to a normalized Float4 vector (RGBA).

Converts all four channels of a Color to a Float4 vector with values normalized to the range [0.0f, 1.0f].

Parameters
colorInput color to convert
Returns
Float4 vector with normalized RGBA values (0.0f - 1.0f)

Definition at line 86 of file color.h.

◆ ToMatrix3x3()

Matrix3x3r superdex::ToMatrix3x3 ( Quaternion const & q)
inlinenodiscard

Definition at line 167 of file quaternion_utils_inl.h.

◆ ToMatrixTransformRT() [1/2]

MatrixTransformRT superdex::ToMatrixTransformRT ( Quaternion const & rot,
Real3 const & trans )
inlinenodiscard

Definition at line 106 of file matrix_transform_rt_inl.h.

◆ ToMatrixTransformRT() [2/2]

MatrixTransformRT superdex::ToMatrixTransformRT ( TransformRT const & a)
inlinenodiscard

Definition at line 97 of file matrix_transform_rt_inl.h.

◆ ToNdArray()

template<typename T>
NdArray< T, 4, 4 > superdex::ToNdArray ( NdArray< Simd< T, 4 >, 4 > m)
inlinenodiscard

Definition at line 384 of file vmatrix.h.

◆ ToNdArray2x2()

template<typename T>
NdArray< T, 2, 2 > superdex::ToNdArray2x2 ( Simd< T, 4 > m)
inlinenodiscard

Definition at line 368 of file vmatrix.h.

◆ ToNdArray3x3()

template<typename T>
NdArray< T, 3, 3 > superdex::ToNdArray3x3 ( NdArray< Simd< T, 4 >, 3 > m)
inlinenodiscard

Definition at line 375 of file vmatrix.h.

◆ ToNdArraySym2x2()

template<typename T>
NdArray< T, 2, 2 > superdex::ToNdArraySym2x2 ( Simd< T, 4 > m)
inlinenodiscard

Definition at line 394 of file vmatrix.h.

◆ ToNdArraySym3x3()

template<typename T>
NdArray< T, 3, 3 > superdex::ToNdArraySym3x3 ( NdArray< Simd< T, 4 >, 2 > m)
inlinenodiscard

Definition at line 401 of file vmatrix.h.

◆ ToNdArrayTensor() [1/2]

template<typename T>
NdArray< T, 3, 3, 3 > superdex::ToNdArrayTensor ( NdArray< Simd< T, 4 >, 3, 3 > const & t)
inline

Definition at line 491 of file vmatrix.h.

◆ ToNdArrayTensor() [2/2]

template<typename T>
NdArray< T, 3, 3, 3, 3 > superdex::ToNdArrayTensor ( NdArray< Simd< T, 4 >, 3, 3, 3 > const & t)
inlinenodiscard

Definition at line 471 of file vmatrix.h.

◆ ToReal2()

template<typename T>
Real2 superdex::ToReal2 ( Simd< T, 4 > v)
inlinenodiscard

Definition at line 347 of file vmatrix.h.

◆ ToReal3()

template<typename T>
Real3 superdex::ToReal3 ( Simd< T, 4 > v)
inlinenodiscard

Definition at line 354 of file vmatrix.h.

◆ ToReal4()

template<typename T>
Real4 superdex::ToReal4 ( Simd< T, 4 > v)
inlinenodiscard

Definition at line 361 of file vmatrix.h.

◆ ToSimd() [1/3]

template<typename T>
Simd< T, 4 > superdex::ToSimd ( NdArray< T, 2 > const & v,
T z = T(0),
T w = T(0) )
inlinenodiscard

Definition at line 413 of file vmatrix.h.

◆ ToSimd() [2/3]

template<typename T>
Simd< T, 4 > superdex::ToSimd ( NdArray< T, 3 > const & v,
T w = T(0) )
inlinenodiscard

Definition at line 418 of file vmatrix.h.

◆ ToSimd() [3/3]

template<typename T>
Simd< T, 4 > superdex::ToSimd ( NdArray< T, 4 > v)
inlinenodiscard

Definition at line 423 of file vmatrix.h.

◆ ToSimdDirection()

template<class V>
V superdex::ToSimdDirection ( V a)
inline

Definition at line 179 of file simd_inl.h.

◆ ToSimdFromSymComponents2x2()

template<typename T>
Simd< T, 4 > superdex::ToSimdFromSymComponents2x2 ( T a00,
T a01,
T a11 )
inlinenodiscard

Definition at line 466 of file vmatrix.h.

◆ ToSimdMatrix() [1/3]

template<typename T>
Simd< T, 4 > superdex::ToSimdMatrix ( NdArray< T, 2, 2 > const & m)
inlinenodiscard

Definition at line 428 of file vmatrix.h.

◆ ToSimdMatrix() [2/3]

template<typename T>
NdArray< Simd< T, 4 >, 3 > superdex::ToSimdMatrix ( NdArray< T, 3, 3 > const & m)
inlinenodiscard

Definition at line 433 of file vmatrix.h.

◆ ToSimdMatrix() [3/3]

template<typename T>
NdArray< Simd< T, 4 >, 4 > superdex::ToSimdMatrix ( NdArray< T, 4, 4 > const & m)
inlinenodiscard

Definition at line 438 of file vmatrix.h.

◆ ToSimdPoint()

template<class V>
V superdex::ToSimdPoint ( V a)
inline

Definition at line 174 of file simd_inl.h.

◆ ToSimdSymMatrix() [1/2]

template<typename T>
Simd< T, 4 > superdex::ToSimdSymMatrix ( NdArray< T, 2, 2 > const & m)
inlinenodiscard

Definition at line 443 of file vmatrix.h.

◆ ToSimdSymMatrix() [2/2]

template<typename T>
NdArray< Simd< T, 4 >, 2 > superdex::ToSimdSymMatrix ( NdArray< T, 3, 3 > const & m)
inlinenodiscard

Definition at line 449 of file vmatrix.h.

◆ ToSimdTensor() [1/2]

template<typename T>
NdArray< Simd< T, 4 >, 3, 3 > superdex::ToSimdTensor ( NdArray< T, 3, 3, 3 > const & t)
inline

Definition at line 482 of file vmatrix.h.

◆ ToSimdTensor() [2/2]

template<typename T>
NdArray< Simd< T, 4 >, 3, 3, 3 > superdex::ToSimdTensor ( NdArray< T, 3, 3, 3, 3 > const & t)
inlinenodiscard

Definition at line 455 of file vmatrix.h.

◆ ToTransformRT()

TransformRT superdex::ToTransformRT ( MatrixTransformRT const & a)
inlinenodiscard

Definition at line 101 of file matrix_transform_rt_inl.h.

◆ ToVMatrix3x3()

VMatrix3x3r superdex::ToVMatrix3x3 ( Quaternion const & q)
inlinenodiscard

Definition at line 163 of file quaternion_utils_inl.h.

◆ ToVMatrix3x3_WithTranspose()

std::pair< VMatrix3x3r, VMatrix3x3r > superdex::ToVMatrix3x3_WithTranspose ( Quaternion const & q)
inlinenodiscard

Definition at line 171 of file quaternion_utils_inl.h.

◆ ToVMatrix3x3Transpose()

VMatrix3x3r superdex::ToVMatrix3x3Transpose ( Quaternion const & q)
inlinenodiscard

Definition at line 159 of file quaternion_utils_inl.h.

◆ ToVMatrix4x4() [1/2]

VMatrix4x4r superdex::ToVMatrix4x4 ( MatrixTransformRT const & a)
inlinenodiscard

Definition at line 115 of file matrix_transform_rt_inl.h.

◆ ToVMatrix4x4() [2/2]

VMatrix4x4r superdex::ToVMatrix4x4 ( TransformRT const & a)
inlinenodiscard

Definition at line 223 of file transform_rt_inl.h.

◆ ToVMatrix4x4Transpose() [1/2]

VMatrix4x4r superdex::ToVMatrix4x4Transpose ( MatrixTransformRT const & a)
inlinenodiscard

Definition at line 110 of file matrix_transform_rt_inl.h.

◆ ToVMatrix4x4Transpose() [2/2]

VMatrix4x4r superdex::ToVMatrix4x4Transpose ( TransformRT const & a)
inlinenodiscard

Definition at line 214 of file transform_rt_inl.h.

◆ Trace()

template<typename T, size_t DimTotal = 3, size_t DimTrace = DimTotal>
T superdex::Trace ( NdArray< T, DimTotal, DimTotal > const & mat)
inlinenodiscardconstexpr

Definition at line 834 of file matrix_utils_inl.h.

◆ Trace2x2()

template<typename T>
T superdex::Trace2x2 ( Simd< T, 4 > const & mat)
inlinenodiscardconstexpr

Definition at line 860 of file matrix_utils_inl.h.

◆ Trace3x3()

template<typename T>
T superdex::Trace3x3 ( NdArray< Simd< T, 4 >, 3 > const & mat)
inlinenodiscardconstexpr

Definition at line 865 of file matrix_utils_inl.h.

◆ Transpose()

template<typename T, size_t N, size_t M>
NdArray< T, M, N > superdex::Transpose ( NdArray< T, N, M > const & mat)
inlinenodiscardconstexpr

Definition at line 677 of file matrix_utils_inl.h.

◆ Transpose2x2()

template<typename T>
Simd< T, 4 > superdex::Transpose2x2 ( Simd< T, 4 > const & m)
inlinenodiscard

Definition at line 703 of file matrix_utils_inl.h.

◆ Transpose3x3()

template<typename T, size_t D0>
NdArray< Simd< T, 4 >, 3 > superdex::Transpose3x3 ( NdArray< Simd< T, 4 >, D0 > const & m)
inlinenodiscard

Definition at line 710 of file matrix_utils_inl.h.

◆ Transpose4x4()

template<typename T>
NdArray< Simd< T, 4 >, 4 > superdex::Transpose4x4 ( NdArray< Simd< T, 4 >, 4 > const & m)
inlinenodiscard

Definition at line 688 of file matrix_utils_inl.h.

◆ TripleProduct()

template<typename T>
T superdex::TripleProduct ( NdArray< T, 3 > const & a,
NdArray< T, 3 > const & b,
NdArray< T, 3 > const & c )
inlinenodiscardconstexpr

Definition at line 378 of file math_utils_inl.h.

◆ VDet3x3()

template<typename T, size_t N>
Simd< T, 4 > superdex::VDet3x3 ( NdArray< Simd< T, 4 >, N > const & A)
inlinenodiscard

Definition at line 644 of file matrix_utils_inl.h.

◆ VDiagonalMatrix() [1/2]

template<size_t N, typename T>
NdArray< Simd< T, 4 >, N > superdex::VDiagonalMatrix ( Simd< T, 4 > const & diagonalVector)
inlinenodiscard

Definition at line 591 of file matrix_utils_inl.h.

◆ VDiagonalMatrix() [2/2]

template<size_t N, typename T>
NdArray< Simd< T, 4 >, N > superdex::VDiagonalMatrix ( T valueOnDiagonal)
inlinenodiscard

Definition at line 612 of file matrix_utils_inl.h.

◆ VDot()

template<int COUNT = -1, class V>
V superdex::VDot ( V a,
V b )
inline

Definition at line 826 of file simd_inl.h.

◆ VDSkew3()

template<typename T = real>
NdArray< Simd< T, 4 >, 3, 3 > superdex::VDSkew3 ( )
inlinenodiscard

Definition at line 904 of file matrix_utils_inl.h.

◆ VEqual()

template<class V>
V superdex::VEqual ( V a,
V b )
inline

Definition at line 700 of file simd_inl.h.

◆ VEye()

template<size_t N, typename T = real>
NdArray< Simd< T, 4 >, N > superdex::VEye ( )
inlinenodiscard

Definition at line 617 of file matrix_utils_inl.h.

◆ VGetRotationMatrix()

VMatrix3x3r superdex::VGetRotationMatrix ( TransformRT const & transform)
inlinenodiscard

Definition at line 28 of file transform_rt_utils.h.

◆ VIsFinite() [1/4]

template<class T, int DN, size_t D0, size_t... DIMS>
Simd< T, DN > superdex::VIsFinite ( NdArray< Simd< T, DN >, D0, DIMS... > const & a)
inlinenodiscard

Per-lane finiteness check on a SIMD-typed NdArray.

Returns a per-lane SIMD mask.

Note
Use when you need per-lane finiteness instead of the whole-array IsFinite, which collapses the result to a single bool.

Definition at line 416 of file math_utils_inl.h.

◆ VIsFinite() [2/4]

Vec4r superdex::VIsFinite ( Quaternion const & q)
inlinenodiscard

Definition at line 189 of file quaternion_utils_inl.h.

◆ VIsFinite() [3/4]

template<class T, int N>
Simd< T, N > superdex::VIsFinite ( Simd< T, N > a)
inline

Definition at line 755 of file simd_inl.h.

◆ VIsFinite() [4/4]

Vec4r superdex::VIsFinite ( TransformRT const & a)
inline

Definition at line 236 of file transform_rt_inl.h.

◆ VNearEqual() [1/2]

template<typename T, size_t D0, int D1>
Simd< T, D1 > superdex::VNearEqual ( NdArray< Simd< T, D1 >, D0 > const & a,
NdArray< Simd< T, D1 >, D0 > const & b,
Simd< T, D1 > epsilon = kDefaultNearEqualEpsilon<T> )
inlinenodiscard

Definition at line 95 of file math_utils_inl.h.

◆ VNearEqual() [2/2]

template<class V>
V superdex::VNearEqual ( V a,
V b,
V epsilon )
inline

Definition at line 733 of file simd_inl.h.

◆ VNearZero()

template<class V>
V superdex::VNearZero ( V a,
V epsilon )
inline

Definition at line 738 of file simd_inl.h.

◆ VNorm()

template<int COUNT = -1, class T, int N>
Simd< T, N > superdex::VNorm ( Simd< T, N > a)
inline

Definition at line 844 of file simd_inl.h.

◆ VNormSqr()

template<int COUNT = -1, class T, int N>
Simd< T, N > superdex::VNormSqr ( Simd< T, N > a)
inline

Definition at line 837 of file simd_inl.h.

◆ VNotEqual()

template<class V>
V superdex::VNotEqual ( V a,
V b )
inline

Definition at line 705 of file simd_inl.h.

Variable Documentation

◆ kAutoLinearSolverMaxIter

int superdex::kAutoLinearSolverMaxIter = -1
constexpr

Sentinel value for LinearSolverParams::maxIter that lets Mochi automatically select the maximum number of linear solver iterations.

Definition at line 344 of file linear_solver_params.h.

◆ kDefaultAnisoAlpha

real superdex::kDefaultAnisoAlpha = 1000_r
inlineconstexpr

Default anisotropic stiffness (α) [Pa].

Definition at line 36 of file material_types.h.

◆ kDefaultAnisoLength

real superdex::kDefaultAnisoLength = 1_r
inlineconstexpr

Default anisotropic reference length (dimensionless).

Definition at line 39 of file material_types.h.

◆ kDefaultArapStiffness

real superdex::kDefaultArapStiffness = 1000_r
inlineconstexpr

Default ARAP stiffness (μ) [Pa].

Definition at line 33 of file material_types.h.

◆ kDefaultDensity

real superdex::kDefaultDensity = 1000_r
inlineconstexpr

Default material density [kg/m³].

Definition at line 39 of file material_params.h.

◆ kDefaultGravity

Real3 superdex::kDefaultGravity = {0_r, -9.8_r, 0_r}
inlineconstexpr

Default gravity acceleration in world frame [m/s²].

Definition at line 43 of file mochi_scene.h.

◆ kDefaultNearEqualEpsilon

template<typename T>
T superdex::kDefaultNearEqualEpsilon {0}
inlineconstexpr

Definition at line 202 of file basic_utils.h.

◆ kDefaultNearEqualEpsilon< double >

template<>
double superdex::kDefaultNearEqualEpsilon< double > {1.0e-6}
inlineconstexpr

Definition at line 204 of file basic_utils.h.

◆ kDefaultNearEqualEpsilon< float >

template<>
float superdex::kDefaultNearEqualEpsilon< float > {1.0e-6f}
inlineconstexpr

Definition at line 203 of file basic_utils.h.

◆ kDefaultNearEqualEpsilon< Simd< T, N > >

template<class T, int N>
Simd<T, N> const superdex::kDefaultNearEqualEpsilon< Simd< T, N > > {kDefaultNearEqualEpsilon<T>}
inline

Definition at line 297 of file simd.h.

◆ kDefaultPoissonRatio

real superdex::kDefaultPoissonRatio = 0.45_r
inlineconstexpr

Default Poisson's ratio (dimensionless).

Definition at line 30 of file material_types.h.

◆ kDefaultRelStepTol

real superdex::kDefaultRelStepTol = 10_r * std::numeric_limits<real>::epsilon()
constexpr

Default tolerance for the L2 norm of the non-linear solver's raw linear-solve increment.

Avoids attempting to solve beyond the floating-point noise floor.

See also
NonLinearSolverParams::relStepTol.

Definition at line 324 of file nonlinear_solver_params.h.

◆ kDefaultYoungsModulus

real superdex::kDefaultYoungsModulus = 1e5_r
inlineconstexpr

Default Young's modulus [Pa].

Definition at line 27 of file material_types.h.

◆ kDegreesPerRadian

real superdex::kDegreesPerRadian = 180_r / kPI
inlineconstexpr

Definition at line 29 of file constants.h.

◆ kFourthOrderEye

NdArray<real, 3, 3, 3, 3> superdex::kFourthOrderEye = FourthOrderEye()
staticconstexpr

Definition at line 58 of file constants.h.

◆ kFourthOrderEyeSym

NdArray<real, 3, 3, 3, 3> superdex::kFourthOrderEyeSym = FourthOrderEyeSym()
staticconstexpr

Definition at line 75 of file constants.h.

◆ kGridSdfDefaultBoundaryPadding

real superdex::kGridSdfDefaultBoundaryPadding
staticconstexpr
Initial value:
=
Parameters for contact mechanics simulation.
real penaltyThresholdDefault
Default contact detection threshold [m].

Default value for GridSdfParams::boundaryPaddingDist [m].

Note
For best performance, an SDF should have more padding than the actor's contact penalty threshold distance. This default was chosen to be 5X the default penalty threshold distance so that an SDF will have sufficient padding when loaded with any scale value greater than or equal to 0.2 (per axis).
See also
ContactParams::penaltyThresholdDefault

Definition at line 87 of file grid_sdf_params.h.

◆ kInf

real superdex::kInf = std::numeric_limits<real>::infinity()
inlineconstexpr

Definition at line 33 of file constants.h.

◆ kInf3

Real3 superdex::kInf3 = {kInf, kInf, kInf}
inlineconstexpr

Definition at line 41 of file constants.h.

◆ kInvalidHandle

uint64_t superdex::kInvalidHandle = 0
inlineconstexpr

Default value for an invalid handle.

Definition at line 29 of file mochi_handle.h.

◆ kIouterI

NdArray<real, 3, 3, 3, 3> superdex::kIouterI = IouterI()
staticconstexpr

Definition at line 90 of file constants.h.

◆ kIsNdArray

template<typename T>
bool superdex::kIsNdArray = IsNdArray<std::decay_t<T>>::value
staticconstexpr

Definition at line 101 of file nd_array.h.

◆ kIsResizeNoInitSafe

template<typename T>
bool superdex::kIsResizeNoInitSafe = IsResizeNoInitSafe<T>::value
inlineconstexpr

Helper variable template for IsResizeNoInitSafe.

Definition at line 80 of file dynamic_array.h.

◆ kMeshDataSpaceDim

int superdex::kMeshDataSpaceDim = 3
inlineconstexpr

Spatial dimensionality of mesh data.

Definition at line 37 of file mesh_data.h.

◆ kMinus2PiPlus2Pi

Real2 superdex::kMinus2PiPlus2Pi = {-2_r * kPI, 2_r * kPI}
inlineconstexpr

Definition at line 34 of file constants.h.

◆ kMinusOne

template<typename T>
T superdex::kMinusOne = T{0} - 1
constexpr

Definition at line 26 of file constants.h.

◆ kPI

real superdex::kPI = 3.14159265358979323846_r
inlineconstexpr

Definition at line 27 of file constants.h.

◆ kRadiansPerDegree

real superdex::kRadiansPerDegree = kPI / 180_r
inlineconstexpr

Definition at line 28 of file constants.h.

◆ kReal3Ones

Real3 superdex::kReal3Ones = {1_r, 1_r, 1_r}
inlineconstexpr

Definition at line 37 of file constants.h.

◆ kReal3XAxis

Real3 superdex::kReal3XAxis = {1_r, 0_r, 0_r}
inlineconstexpr

Definition at line 38 of file constants.h.

◆ kReal3YAxis

Real3 superdex::kReal3YAxis = {0_r, 1_r, 0_r}
inlineconstexpr

Definition at line 39 of file constants.h.

◆ kReal3ZAxis

Real3 superdex::kReal3ZAxis = {0_r, 0_r, 1_r}
inlineconstexpr

Definition at line 40 of file constants.h.

◆ kReal3Zeros

Real3 superdex::kReal3Zeros = {0_r, 0_r, 0_r}
inlineconstexpr

Definition at line 36 of file constants.h.

◆ kSecondOrderIdentity

NdArray<real, 3, 3> superdex::kSecondOrderIdentity
inlineconstexpr
Initial value:
{
Real3{1_r, 0_r, 0_r},
Real3{0_r, 1_r, 0_r},
Real3{0_r, 0_r, 1_r}}
NdArray< real, 3 > Real3
Definition nd_array.h:106

Definition at line 43 of file constants.h.

◆ kSentinelIndex

int superdex::kSentinelIndex = -1
constexpr

Definition at line 106 of file constants.h.

◆ kSimdDefaultSize

template<class T>
int superdex::kSimdDefaultSize = Unsupported architecture / sizeof(T)
constexpr

Definition at line 33 of file simd.h.

◆ kSqrt2

real superdex::kSqrt2 = 1.41421356237309504880_r
inlineconstexpr

Definition at line 30 of file constants.h.

◆ kSqrt3Over2

real superdex::kSqrt3Over2 = 0.86602540378443864676_r
inlineconstexpr

Definition at line 32 of file constants.h.

◆ kSqrtPi

real superdex::kSqrtPi = 1.772453850905515881919427556567825376987457275390625_r
inlineconstexpr

Definition at line 31 of file constants.h.

◆ kUnitInterval

Real2 superdex::kUnitInterval = {0_r, 1_r}
inlineconstexpr

Definition at line 35 of file constants.h.