Base class to store recorder data.
More...
#include <GA_AIFEdit.h>
|
| GA_AIFEditDelta () |
|
virtual | ~GA_AIFEditDelta () |
|
virtual int64 | getMemoryUsage (bool inclusive=false) const =0 |
|
virtual GA_AIFEditDelta * | createNew () const =0 |
| Create a new (empty) instance of the derived class. More...
|
|
virtual GA_AIFEditDelta * | clone () const =0 |
| Create a copy of this delta. More...
|
|
virtual bool | isCompatible (const GA_Attribute *attrib) const =0 |
| Test compatibility with a particular attribute. More...
|
|
virtual bool | isCompatible (const GA_AIFEditDelta *delta) const =0 |
|
virtual GA_AIFEditSnapshot * | startEdit (const GA_Attribute *attrib, GA_Offset element)=0 |
|
virtual GA_AIFEditSnapshot * | startEdit (const GA_Attribute *attrib, const GA_Range &elements)=0 |
|
virtual bool | endEdit (GA_AIFEditSnapshot *snapshot, const GA_AIFEditDeltaMap &map, const GA_AIFEditDeltaCoordFrames *frames=0)=0 |
|
virtual bool | mergeEdit (const GA_AIFEditDelta *other, const GA_AIFEditDeltaCoordFrames *otherfr=0, const GA_AIFEditDeltaCoordFrames *localfr=0, bool inverse=false)=0 |
|
virtual bool | mergeSymmetricEdit (const GA_AIFEditDelta *other, const GA_AIFEditDeltaCoordFrames *otherfr, GA_AIFEditSymmetry &symmetry, const GA_AIFEditDeltaMap &map, const GA_AIFEditDeltaCoordFrames *localfr, bool inverse=false)=0 |
|
virtual bool | applyEdit (GA_Attribute *attrib, const GA_AIFEditDeltaMap &map, const UT_Int64Array *subset=0, const GA_AIFEditDeltaCoordFrames *frames=0, bool inverse=false) const =0 |
|
virtual bool | applyScaledEdit (GA_Attribute *attrib, fpreal scale, const GA_AIFEditDeltaMap &map, const UT_Int64Array *subset=0, const GA_AIFEditDeltaCoordFrames *frames=0, bool inverse=false) const =0 |
|
virtual GA_Size | getDeltaCount () const =0 |
| Query the number of indices that have recorded deltas. More...
|
|
virtual void | getDeltaIndices (UT_Int64Array &indices) const =0 |
|
virtual bool | jsonSaveDefinition (UT_JSONWriter &w) const =0 |
|
virtual bool | jsonSave (UT_JSONWriter &w) const =0 |
| Save the delta object to a JSON stream. More...
|
|
virtual bool | jsonLoad (UT_JSONParser &p)=0 |
| Load a delta object from a JSON stream. More...
|
|
virtual bool | legacyLoadTuple (GA_AIFEditDeltaTupleLegacyStream &) |
| Load a legacy tuple delta. Only supported by some subclasses. More...
|
|
virtual bool | legacyLoadIndexPair (GA_AIFEditDeltaIndexPairLegacyStream &) |
| Load a legacy index pair delta. Only supported by some subclasses. More...
|
|
|
virtual void | zeroDeltas ()=0 |
|
virtual void | clearDeltas ()=0 |
|
|
virtual int | getObjectSetCount () const |
|
virtual void | setObjectSetCount (int n) |
|
virtual const
GA_AIFIndexPairObjects * | getObjects (int s=0) const |
|
virtual GA_AIFIndexPairObjects * | getObjects (int s=0) |
|
Base class to store recorder data.
This class is responsible for maintaining changes to an attribute. The class must be able to save/load to a JSON stream.
The deltas are used by painting, editing and other modelling operations. For example, an undo mechanism might be implemented by:
changeAttrib()
{
letUserEditPoints(P);
}
{
}
Definition at line 217 of file GA_AIFEdit.h.
GA_AIFEditDelta::GA_AIFEditDelta |
( |
| ) |
|
virtual GA_AIFEditDelta::~GA_AIFEditDelta |
( |
| ) |
|
|
virtual |
Apply this snapshot's edit delta to the attribute, optionally restricting which delta indices get applied. The optional coordinate frames will be used to apply deltas previously mapped to local space in world space (if supported).
Scale and apply this snapshot's edit delta to the attribute, optionally restricting which delta indices get applied. This operation is not supported by all attributes supporting AIF_Edit. The optional coordinate frames will be used to apply deltas previously mapped to local space in world space (if supported).
virtual void GA_AIFEditDelta::clearDeltas |
( |
| ) |
|
|
pure virtual |
Clear currently stored deltas. The first method, zeroDeltas(), is a lighter-weight clear that will endeavour to hold onto and reuse most allocated memory.
Create a copy of this delta.
Create a new (empty) instance of the derived class.
After editing, the endEdit()
method is called. This allows the computation of the actual delta from the snapshot. Do not use the snapshot again after calling this method. The optional coordinate frames will be used to store the delta relative to the local frame if supported.
static void GA_AIFEditDelta::getAllocationStats |
( |
int64 & |
used, |
|
|
int64 & |
peak |
|
) |
| |
|
static |
virtual GA_Size GA_AIFEditDelta::getDeltaCount |
( |
| ) |
const |
|
pure virtual |
Query the number of indices that have recorded deltas.
Query the indices that have recorded deltas. Note that these are the delta indices, not the orders of the elements in the GA_IndexMap.
virtual int64 GA_AIFEditDelta::getMemoryUsage |
( |
bool |
inclusive = false | ) |
const |
|
pure virtual |
Query and set information about objects referenced by index pair data. Only supported by some subclasses.
Query and set information about objects referenced by index pair data. Only supported by some subclasses.
virtual int GA_AIFEditDelta::getObjectSetCount |
( |
| ) |
const |
|
virtual |
Query and set information about objects referenced by index pair data. Only supported by some subclasses.
virtual bool GA_AIFEditDelta::isCompatible |
( |
const GA_Attribute * |
attrib | ) |
const |
|
pure virtual |
Test compatibility with a particular attribute.
virtual bool GA_AIFEditDelta::isCompatible |
( |
const GA_AIFEditDelta * |
delta | ) |
const |
|
pure virtual |
Test compatibility with another delta. Compatibility in this case refers to ability to merge the deltas.
Load a delta object from a JSON stream.
virtual bool GA_AIFEditDelta::jsonSave |
( |
UT_JSONWriter & |
w | ) |
const |
|
pure virtual |
Save the delta object to a JSON stream.
virtual bool GA_AIFEditDelta::jsonSaveDefinition |
( |
UT_JSONWriter & |
w | ) |
const |
|
pure virtual |
JSON Schema: GA_AIFEditDelta
The schema for a delta consists of an ordered map (array) with two elements. The first, "type", is an ordered pair (array) providing the information needed to allocate a subclass of GA_AIFEditDelta. The second, "data", holds. the private data for the delta, which is saved and loaded by the GA_AIFEditDelta subclass.
[
"name" : "GA_AIFEditDelta",
"description" :
"A delta is defined by an ordered map (array) with two
elements, the definition ("type") and the private data
("data").
"properties": {
},
"data": {
"description" : "Internal delta data",
},
}
]
JSON Schema: GA_AIFEditDelta-Type
The delta "type" field is an ordered pair containing the attribute type and an object holding additional type arguments needed to recreate the delta.
{
"name" : "GA_AIFEditDelta-Type",
"description" : "An ordered pair defining the attribute",
"type" : "array",
"items": [
<"Attribute Type Name">, <"Type Arguments">
],
}
- See Also
- GA_AttributeType
Load a legacy index pair delta. Only supported by some subclasses.
Load a legacy tuple delta. Only supported by some subclasses.
Merge a separate edit into this edit, matching elements by the internal ordered index. The optional coordinate frames will be used to store the delta relative to the local frame if supported.
Merge the edits symmetric to those in a separate edit into this edit, matching elements by internal ordered index. The optional coordinate frames will be used to store the delta relative to the local frame if supported.
static void GA_AIFEditDelta::operator delete |
( |
void * |
p, |
|
|
size_t |
size |
|
) |
| |
|
static |
Deletion of an allocated object.
static void* GA_AIFEditDelta::operator new |
( |
size_t |
size | ) |
|
|
static |
The new & delete operators are overloaded to help with memory tracking. Allocate new object
static void* GA_AIFEditDelta::operator new |
( |
size_t |
size, |
|
|
void * |
p |
|
) |
| |
|
static |
virtual void GA_AIFEditDelta::setObjectSetCount |
( |
int |
n | ) |
|
|
virtual |
Query and set information about objects referenced by index pair data. Only supported by some subclasses.
The startEdit()
method allows the snapshot to see the state of the attribute before any edits are made to the data.
virtual void GA_AIFEditDelta::zeroDeltas |
( |
| ) |
|
|
pure virtual |
Clear currently stored deltas. The first method, zeroDeltas(), is a lighter-weight clear that will endeavour to hold onto and reuse most allocated memory.
The documentation for this class was generated from the following file: