15 #include <vsg/app/Camera.h>
16 #include <vsg/utils/Intersector.h>
28 using IndexRatios = std::vector<IndexRatio>;
41 Intersection(
const dvec3& in_localIntersection,
const dvec3& in_worldIntersection,
double in_ratio,
const dmat4& in_localToWorld,
const NodePath& in_nodePath,
const DataList& in_arrays,
const IndexRatios& in_indexRatios, uint32_t in_instanceIndex);
43 dvec3 localIntersection;
44 dvec3 worldIntersection;
50 IndexRatios indexRatios;
51 uint32_t instanceIndex = 0;
54 operator bool()
const {
return !nodePath.empty(); }
57 using Intersections = std::vector<ref_ptr<Intersection>>;
58 Intersections intersections;
63 void popTransform()
override;
68 bool intersectDraw(uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount)
override;
69 bool intersectDrawIndexed(uint32_t firstIndex, uint32_t indexCount, uint32_t firstInstance, uint32_t instanceCount)
override;
78 std::vector<LineSegment> _lineSegmentStack;
Definition: LineSegmentIntersector.h:38
LineSegmentIntersector is an Intersector subclass that provides support for computing intersections b...
Definition: LineSegmentIntersector.h:32
void pushTransform(const Transform &transform) override
clone and transform this Intersector to provide a new Intersector in local coordinates
bool intersectDraw(uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount) override
intersect with a vkCmdDraw primitive
bool intersectDrawIndexed(uint32_t firstIndex, uint32_t indexCount, uint32_t firstInstance, uint32_t instanceCount) override
intersect with a vkCmdDrawIndexed primitive
bool intersects(const dsphere &bs) override
check for intersection with sphere
IndexRatio is a pair of index and ratio used to specify the baricentric coords of primitives that hav...
Definition: LineSegmentIntersector.h:23
Definition: LineSegmentIntersector.h:73