#include <esve/engine/dim4/Make_Frame.hxx>
Inheritance diagram for esve::engine::dim4::Make_Frame< T_Target, T_Frame >:

Public Member Functions | |
| Make_Frame () | |
| Default constructor. | |
| template<typename T_Arg> | Make_Frame (T_Arg &) |
| Construct T_Target with an arbitrary argument. | |
| template<typename T_Arg> | Make_Frame (const T_Arg &) |
| Construct T_Target with an arbitrary argument. | |
Protected Member Functions | |
| void | compute () |
| Receive the compute() message. | |
| virtual void | pretransform () |
| Virtual hook to subclasses. Recompute untransformed points, if needed. | |
| virtual void | posttransform () |
| Virtual hook to subclasses. Do something with the transformed points (such as computing normals). | |
| virtual bool | changed () const |
| Virtual hook to subclasses. Whether untransformed points have changed. | |
| virtual void | apply_transform () |
| Transform the points. | |
The target class must provide the following:
class Your_Class { public: // ... protected: // Input iterator for the untransformed points. // The iterator may be anything which dereferences to quat. input_iterator points_begin() const ; input_iterator points_end() const ; // Output iterator for the transformed points. // The iterator may be anything which dereferences to quat. output_iterator transformed_points_begin() ; // Return true if any points have been moved. // The system will re-apply the transform. virtual bool changed() const ; // Called just before the transform is applied. // This is where points should be updated, if needed. virtual void pretransform() ; // Called just after the transform is applied. // Compute normals here. virtual void posttransform() ; // ... private: // ... } ;
When these methods are provided, the statement
engine::dim4::Make_Frame<Your_Class> your_object ;
If Your_Class cannot be default-constructed, you have the option of giving Make_Frame one argument which is passed along to the constructor of Your_Class.
Make_Frame also makes the class a member of the compute tree, replacing compute() with the pretransform() and posttransform() virtual hooks.
The transform must be hooked up to a compute() message sender. Front-ends which have an add_geom() method will take care of this automatically. Otherwise you must establish computation order by adding the transform to a message::Compute_Sender such as a camera. See message::Compute_Receiver.
1.3.4