|
Rumba C++ SDK
|
This class holds the evaluation context passed to the evaluation handler during a plug evaluation. More...
#include <EvalContext.h>
Public Member Functions | |
| virtual | ~EvalContext () |
| virtual int | value_count () const =0 |
| Returns the number of dependencies value available. More... | |
| virtual float | frame (int index) const =0 |
| virtual float | evaluation_time () const =0 |
| virtual bool | evaluate_default () const =0 |
| virtual Value | value (int index) const =0 |
| Returns the n-th dependency value. More... | |
| virtual bool | as_bool (int index) const =0 |
| Returns the n-th dependency value as a bool. More... | |
| virtual int | as_int (int index) const =0 |
| Returns the n-th dependency value as an integer. More... | |
| virtual float | as_float (int index) const =0 |
| Returns the n-th dependency value as a float. More... | |
| virtual double | as_double (int index) const =0 |
| Returns the n-th dependency value as a double. More... | |
| virtual const std::string & | as_string (int index) const =0 |
| Returns the n-th dependency value as a string. More... | |
| virtual std::wstring | as_wstring (int index) const =0 |
| Returns the n-th dependency value as a wide string. More... | |
| virtual const Imath::V2d & | as_V2d (int index) const =0 |
| Returns the n-th dependency value as a V2d. More... | |
| virtual const Imath::V3d & | as_V3d (int index) const =0 |
| Returns the n-th dependency value as a V3d. More... | |
| virtual const Imath::V4d & | as_V4d (int index) const =0 |
| Returns the n-th dependency value as a V4d. More... | |
| virtual const Imath::V2i & | as_V2i (int index) const =0 |
| Returns the n-th dependency value as a V2i. More... | |
| virtual const Imath::V3i & | as_V3i (int index) const =0 |
| Returns the n-th dependency value as a V3i. More... | |
| virtual const Imath::V4i & | as_V4i (int index) const =0 |
| Returns the n-th dependency value as a V4i. More... | |
| virtual const Imath::M44d & | as_M44d (int index) const =0 |
| Returns the n-th dependency value as a M44d. More... | |
| virtual const Imath::Box3f & | as_Box3f (int index) const =0 |
| Returns the n-th dependency value as a Box3f. More... | |
| virtual const Imath::Quatd & | as_Quatd (int index) const =0 |
| Returns the n-th dependency value as a Quatd. More... | |
| virtual const Imath::Color4f & | as_Color4f (int index) const =0 |
| Returns the n-th dependency value as a Color4f. More... | |
| virtual std::shared_ptr< const UserData > | as_user_data (int index) const =0 |
| Returns the n-th dependency value as a user data. More... | |
| virtual maquina::Plug | plug () const =0 |
| virtual maquina::Plug | plug (int index) const =0 |
| Returns the n-th dependency plug. More... | |
| virtual bool | is_valid (int index) const =0 |
| Tell if the n-th value is valid. More... | |
| virtual bool | is_interactive () const =0 |
| Tell if the evaluation is done during an interactive session. More... | |
| virtual std::pair< maquina::Value, maquina::PartialInvalidationPtr > | partial_invalidation () const =0 |
| Returns the previous cached of the currently evaluated plug if available. If not, the second member is nullptr and value is Value::default_value. More... | |
This class holds the evaluation context passed to the evaluation handler during a plug evaluation.
Use this interface to query the dependency count and the dependencies value. This interface is implemented by the application.
|
inlinevirtual |
|
pure virtual |
Returns the n-th dependency value as a bool.
You must be sure this value is an integer, a float or a boolean or you get false.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a Box3f.
You must be sure this value is a Box3f or you will have an empty box.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a Color4f.
You must be sure this value is a Color4f or you will have a default value.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a double.
You must be sure this value is an integer, a float or a boolean or you get 0.0.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a float.
You must be sure this value is an integer, a float or a boolean or you get 0.0.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as an integer.
You must be sure this value is an integer, a float or a boolean or you get 0.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a M44d.
You must be sure this value is a M44d or you will have an identity matrix.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a Quatd.
You must be sure this value is a Quatd or you will have an identity quaternion.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a string.
You must be sure this value is a string or you will have an empty string.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a user data.
You must be sure this value is a user data or you will have a nullptr.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a V2d.
You must be sure this value is a V2d or you will have {0,0}.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a V2i.
You must be sure this value is a V2i or you will have {0,0}.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a V3d.
You must be sure this value is a V3d or you will have {0,0,0}.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a V3i.
You must be sure this value is a V3i or you will have {0,0,0}.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a V4d.
You must be sure this value is a V4d or you will have {0,0,0,0}.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a V4i.
You must be sure this value is a V4i or you will have {0,0,0,0}.
| [in] | index | index of the dependency to query |
|
pure virtual |
Returns the n-th dependency value as a wide string.
You must be sure this value is a string or you will have an empty string.
| [in] | index | index of the dependency to query |
|
pure virtual |
Check the evaluation is done for the default value.
Returns true if the evaluation is computing a default value.
|
pure virtual |
Get the evaluation time.
This value can be used to read the value from a custom cache (be sure to use Plug::force_varying(true) when the cache is time varying).
|
pure virtual |
Get the frame of an index in a 'all_frames' dependence.
An 'all_frames' dependence takes the form of an Array storing all values of the dependence on the time line. If this array has a size of 1, the dependence is either constant or evaluated at a substep. Otherwise, this function makes the mapping from an index in that array to the corresponding frame.
| index | Index in a 'all_frames' array of size greater than one. |
|
pure virtual |
Tell if the evaluation is done during an interactive session.
|
pure virtual |
Tell if the n-th value is valid.
Values are always valid except when using temporal dependencies. Some temporal dependencies may have an invalid value, if they are out of the animation range for instance. In that case, the user must make sure the value is valid before to get it.
|
pure virtual |
Returns the previous cached of the currently evaluated plug if available. If not, the second member is nullptr and value is Value::default_value.
|
pure virtual |
Returns the plug evaluated with this context. Make sure to not modify the plug during the evaluation otherwise it will lead to undefined behaviors.
|
pure virtual |
Returns the n-th dependency plug.
|
pure virtual |
|
pure virtual |
Returns the number of dependencies value available.