|
Enzo
|
A compiled script that runs once per point and edits the point's attributes. More...
#include <PointScript.h>
Public Member Functions | |
| const std::vector< AttributeBinding > & | getBindings () const |
| Returns every attribute the code binds, in the order they first appear. | |
| std::shared_ptr< PointScript > | clone () const |
| Returns a copy that runs in its own context. | |
| bool | addWrittenAttributes (geo::Primitive &output, String &error) const |
| Adds every attribute the script writes to the output, filled with the default value. | |
| bool | run (const geo::Primitive &input, geo::Primitive &output, Offset begin, Offset end, const ExpressionContext *context, String &error) |
| Runs the script for each valid point in a range. | |
Static Public Member Functions | |
| static std::shared_ptr< PointScript > | compile (const String &code, String &error) |
| Returns the compiled script for the user's code. | |
A compiled script that runs once per point and edits the point's attributes.
The user's code is the body of a function that takes the point offset as pt and reads and writes the point's attributes as @name.
| bool enzo::expr::PointScript::addWrittenAttributes | ( | geo::Primitive & | output, |
| String & | error ) const |
Adds every attribute the script writes to the output, filled with the default value.
| std::shared_ptr< PointScript > enzo::expr::PointScript::clone | ( | ) | const |
Returns a copy that runs in its own context.
|
static |
Returns the compiled script for the user's code.
| bool enzo::expr::PointScript::run | ( | const geo::Primitive & | input, |
| geo::Primitive & | output, | ||
| Offset | begin, | ||
| Offset | end, | ||
| const ExpressionContext * | context, | ||
| String & | error ) |
Runs the script for each valid point in a range.
Reads bindings from the input and stores written ones to the output.