gramods
Classes | Public Member Functions | Public Attributes | Protected Attributes | List of all members
gramods::gmGraphics::IntersectionVisitor Struct Reference

Visitor that collects intersections. More...

#include <IntersectionVisitor.hh>

Inheritance diagram for gramods::gmGraphics::IntersectionVisitor:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmGraphics::IntersectionVisitor:
Collaboration graph
[legend]

Classes

struct  Intersection
 Data associated with an intersection. More...
 

Public Member Functions

 IntersectionVisitor (IntersectionLine line)
 Create a visitor for checking for intersection against the specified line. More...
 
void apply (gmCore::Object *node) override
 This method is called for each visited objects. More...
 
- Public Member Functions inherited from gramods::gmGraphics::Node::TransformStackVisitor
void apply (gmCore::Object *node) override
 This method is called for each visited objects. More...
 
void apply (Object *node, const Eigen::Affine3f &transform)
 

Public Attributes

std::vector< Intersectionintersections
 This is the list of intersections found by the visitors during traversal. More...
 
- Public Attributes inherited from gramods::gmGraphics::Node::TransformStackVisitor
std::vector< Eigen::Affine3f > stack {Eigen::Affine3f::Identity()}
 

Protected Attributes

const IntersectionLine line
 
std::vector< gmGraphics::Node * > node_path
 

Detailed Description

Visitor that collects intersections.

Example usage:

gmGraphics::IntersectionVisitor iv
scenegraph_root->accept(&iv);
for (const auto &isec : iv.intersections) {
...
static IntersectionLine forwardRay(Eigen::Vector3f p0, Eigen::Vector3f dir)
Creates a IntersectionLine that has infinite forward extent, for intersection testing,...
Definition: IntersectionLine.cpp:14

Constructor & Destructor Documentation

◆ IntersectionVisitor()

gramods::gmGraphics::IntersectionVisitor::IntersectionVisitor ( IntersectionLine  line)
inline

Create a visitor for checking for intersection against the specified line.

Member Function Documentation

◆ apply()

void gramods::gmGraphics::IntersectionVisitor::apply ( gmCore::Object node)
overridevirtual

This method is called for each visited objects.

Reimplemented from gramods::gmCore::Object::Visitor.

Member Data Documentation

◆ intersections

std::vector<Intersection> gramods::gmGraphics::IntersectionVisitor::intersections

This is the list of intersections found by the visitors during traversal.


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