gramods
Public Member Functions | Public Attributes | List of all members
gramods::gmGraphics::Node::TransformStackVisitor Struct Reference

Base for Visitor:s that need to track the space transform through traversal. More...

#include <Node.hh>

Inheritance diagram for gramods::gmGraphics::Node::TransformStackVisitor:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmGraphics::Node::TransformStackVisitor:
Collaboration graph
[legend]

Public Member Functions

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< Eigen::Affine3f > stack {Eigen::Affine3f::Identity()}
 

Detailed Description

Base for Visitor:s that need to track the space transform through traversal.

Transform objects will call the apply method with its affine transform as argument upon which this visitor will populate its stack member before calling the standard apply method. Sub classes can then access the stack member, e.g. stack.back() to find the transform of the current 3D space.

Member Function Documentation

◆ apply()

void gramods::gmGraphics::Node::TransformStackVisitor::apply ( gmCore::Object node)
inlineoverridevirtual

This method is called for each visited objects.

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

Reimplemented in gramods::gmGraphics::Node::RenderVisitor, and gramods::gmGraphics::Node::NearFarVisitor.


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