PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
VertexTriangleMixedCcdDcd.h
Go to the documentation of this file.
1
11
12#ifndef PBAT_GPU_CONTACT_VERTEXTRIANGLEMIXEDCCDDCD_H
13#define PBAT_GPU_CONTACT_VERTEXTRIANGLEMIXEDCCDDCD_H
14
15#include "PhysicsBasedAnimationToolkitExport.h"
16#include "pbat/gpu/Aliases.h"
18
19#include <vector>
20
21namespace pbat::gpu::impl::contact {
22class VertexTriangleMixedCcdDcd;
23} // namespace pbat::gpu::impl::contact
24
25namespace pbat::gpu::contact {
26
32{
33 public:
34 static auto constexpr kDims = 3;
35
43 Eigen::Ref<GpuIndexVectorX const> const& B,
44 Eigen::Ref<GpuIndexVectorX const> const& V,
45 Eigen::Ref<GpuIndexMatrixX const> const& F);
46
48 VertexTriangleMixedCcdDcd& operator=(VertexTriangleMixedCcdDcd const&) = delete;
49
60 PBAT_API VertexTriangleMixedCcdDcd& operator=(VertexTriangleMixedCcdDcd&& other) noexcept;
69 PBAT_API void InitializeActiveSet(
70 common::Buffer const& xt,
71 common::Buffer const& xtp1,
72 Eigen::Vector<GpuScalar, kDims> const& wmin,
73 Eigen::Vector<GpuScalar, kDims> const& wmax);
79 PBAT_API void UpdateActiveSet(common::Buffer const& x, bool bComputeBoxes = true);
85 PBAT_API void FinalizeActiveSet(common::Buffer const& x, bool bComputeBoxes = true);
96 PBAT_API GpuIndexVectorX ActiveVertices() const;
101 PBAT_API std::vector<bool> ActiveMask() const;
111
112 private:
114};
115
116} // namespace pbat::gpu::contact
117
118#endif // PBAT_GPU_CONTACT_VERTEXTRIANGLEMIXEDCCDDCD_H
This file contains the Buffer class for 1- or 2-dimensional GPU buffers of numeric types.
1- or 2-dimensional GPU buffer of numeric types
Definition Buffer.h:25
PBAT_API GpuIndexVectorX ActiveVertices() const
Fetch the active vertices from GPU.
Definition VertexTriangleMixedCcdDcd.cu:123
PBAT_API VertexTriangleMixedCcdDcd(Eigen::Ref< GpuIndexVectorX const > const &B, Eigen::Ref< GpuIndexVectorX const > const &V, Eigen::Ref< GpuIndexMatrixX const > const &F)
Construct a new Vertex Triangle Mixed Ccd Dcd object.
Definition VertexTriangleMixedCcdDcd.cu:18
PBAT_API void FinalizeActiveSet(common::Buffer const &x, bool bComputeBoxes=true)
Removes inactive vertices from the active set.
Definition VertexTriangleMixedCcdDcd.cu:81
PBAT_API GpuIndexMatrixX ActiveVertexTriangleConstraints() const
Fetch the active vertex-triangle constraints from GPU.
Definition VertexTriangleMixedCcdDcd.cu:93
static auto constexpr kDims
Number of spatial dimensions.
Definition VertexTriangleMixedCcdDcd.h:34
PBAT_API void UpdateActiveSet(common::Buffer const &x, bool bComputeBoxes=true)
Updates constraints involved with active vertices.
Definition VertexTriangleMixedCcdDcd.cu:69
PBAT_API void InitializeActiveSet(common::Buffer const &xt, common::Buffer const &xtp1, Eigen::Vector< GpuScalar, kDims > const &wmin, Eigen::Vector< GpuScalar, kDims > const &wmax)
Computes the initial active set.
Definition VertexTriangleMixedCcdDcd.cu:45
PBAT_API std::vector< bool > ActiveMask() const
Fetch the active vertex mask from GPU.
Definition VertexTriangleMixedCcdDcd.cu:129
PBAT_API void SetNearestNeighbourFloatingPointTolerance(GpuScalar eps)
Set the Nearest Neighbour floating point equality tolerance.
Definition VertexTriangleMixedCcdDcd.cu:134
~VertexTriangleMixedCcdDcd()
Destroy the Vertex Triangle Mixed Ccd Dcd object.
Definition VertexTriangleMixedCcdDcd.cu:139
Vertex-triangle contact detection using a mixed CCD/DCD approach.
Definition VertexTriangleMixedCcdDcd.cuh:18
Type aliases for GPU code.
Contact detection public GPU API.
float GpuScalar
Scalar type for GPU code.
Definition Aliases.h:19
Eigen::Vector< GpuIndex, Eigen::Dynamic > GpuIndexVectorX
Index vector type for GPU code.
Definition Aliases.h:28
Eigen::Matrix< GpuIndex, Eigen::Dynamic, Eigen::Dynamic > GpuIndexMatrixX
Index matrix type for GPU code.
Definition Aliases.h:24