![]() |
Simplygon C++ API
8.3.35800.0
|
#include <SimplygonSDK.h>
Public Member Functions | |
virtual CountedPointer< IValueArray > | AddBaseTypeField (rid base_type, unsigned int tuple_size, const char *name)=0 |
virtual void | AddField (IValueArray *field)=0 |
virtual void | AddTupleCount (unsigned int tuplecount)=0 |
virtual void | AppendTuples (IFieldData *other, bool add_missing_fields)=0 |
virtual void | Clear ()=0 |
virtual void | CopyCombine3Tuples (IFieldData *source, rid dest_id, rid src_id_1, rid src_id_2, rid src_id_3, real alpha_1, real alpha_2)=0 |
virtual void | CopyCombineTuples (IFieldData *source, rid dest_id, rid src_id_1, rid src_id_2, real alpha)=0 |
virtual void | CopyRange (IFieldData *source, rid start_dest_id, rid start_src_id, unsigned int count)=0 |
virtual void | CopyTuple (IFieldData *source, rid dest_id, rid src_id)=0 |
virtual void | DeepCopy (IFieldData *source, bool copy_data)=0 |
virtual void | ExtractTuples (IFieldData *dest, rid start, unsigned int count)=0 |
virtual const char * | GetClass () |
virtual CountedPointer< IValueArray > | GetField (const char *name)=0 |
virtual unsigned int | GetFieldCount ()=0 |
virtual CountedPointer< IValueArray > | GetFieldWithHandle (rhandle hand)=0 |
virtual CountedPointer< IValueArray > | GetFieldWithId (rid id)=0 |
virtual rhandle | GetFirstFieldHandle ()=0 |
virtual rid | GetMaxFieldId ()=0 |
virtual rid | GetMaxTupleId ()=0 |
virtual rhandle | GetNextFieldHandle (rhandle hand)=0 |
virtual unsigned int | GetTupleCount ()=0 |
virtual void | IndexedCombine (IFieldData *source, IRidArray *idtable, IRealArray *blendtable, rid startId)=0 |
virtual void | IndexedCombine (IFieldData *source, rid *idtable_ridInputDataPtr, real *blendtable_realInputDataPtr, unsigned int idtable_cnt, rid startId)=0 |
virtual void | IndexedCombine3 (IFieldData *source, IRidArray *idtable, IRealArray *blendtable, rid startId)=0 |
virtual void | IndexedCombine3 (IFieldData *source, rid *idtable_ridInputDataPtr, real *blendtable_realInputDataPtr, unsigned int idtable_cnt, rid startId)=0 |
virtual void | IndexedCopy (IFieldData *source, IRidArray *idtable, rid startId)=0 |
virtual void | IndexedCopy (IFieldData *source, rid *idtable_ridInputDataPtr, unsigned int idtable_cnt, rid startId)=0 |
virtual bool | IsA (const char *type) const |
virtual int | IsEmpty ()=0 |
virtual bool | IsSetupIdenticalTo (IFieldData *other)=0 |
virtual CountedPointer< IFieldData > | NewCopy (bool copy_data)=0 |
virtual CountedPointer< IFieldData > | NewPackedCopy (IRidArray *index_array)=0 |
virtual void | RemoveAllFields ()=0 |
virtual void | RemoveField (const char *name)=0 |
virtual void | SafeRemoveField (const char *name)=0 |
virtual void | SetTupleCount (unsigned int tuplecount)=0 |
![]() | |
virtual rid | AddObserver (robserver *Observer, rid EventId)=0 |
virtual void | AddRef ()=0 |
virtual rstring | GetName ()=0 |
virtual void * | GetUserComponentArea (rid userid)=0 |
virtual void | PrintInfo ()=0 |
virtual void | Release ()=0 |
virtual void | RemoveObserver (rid ObserverId)=0 |
virtual void | SetName (const char *Name)=0 |
Static Public Member Functions | |
static bool | IsClassA (const char *type) |
static IFieldData * | SafeCast (IObject *ptr) |
![]() | |
static bool | IsClassA (const char *type) |
static IObject * | SafeCast (IObject *ptr) |
IFieldData represents multiple fields of data. Each field is implemented as an IValueArray object, that has a unique name, and can have complex components (such as scalars, vectors, quaternions, tensors or matrices). All fields are assumed to be of the same length. IFieldData can be seen as an array with complex tuples, where the component can be of different types.
Definition at line 4639 of file SimplygonSDK.h.
|
pure virtual |
Adds a field based on a base type. Only IValueArray objects are allowed. The created and added object is returned.
base_type | should be a base type listed in SimplygonSDK::BaseTypes |
tuple_size | the desired tuple size |
name | the name of the new field |
|
pure virtual |
Adds a field. The field must have a unique name set.
field | the array to add to the field data |
|
pure virtual |
Adds a number of tuples to the current tuple count.
tuplecount | the desired number of tuples to add. Note that the total TupleCount cannot exceed INT_MAX. Value cannot be less than 0. Value cannot be greater than INT_MAX. |
|
pure virtual |
Appends another field data object to this object. The fields are allowed to be setup differently, but then comes at a significant performance penalty. If fields in the other field data object is missing in this object, these will be added, and the items in the old tuples will be set to 0.
other | the field data object that is appended Value cannot be equal to null. |
add_missing_fields | if set to true, missing fields will be added to this field data object. |
|
pure virtual |
Clears all tuples from the fields. The fields, however, are not removed.
|
pure virtual |
CopyCombine3Tuples combines the data from three tuples into a destination tuple. The call works like CobineTuples, but there is three source tuples, and two alpha values. the destination will be weighted by the values:
alpha_3 = 1-(alpha_1 + alpha_2)
dest = src_1*alpha_1 + src_2*alpha_2 + src_3*alpha_3
This field data object can be used as the source field data object to copy within the object.
source | the field data source to combine from |
dest_id | the tuple index to put the combined results into in this field data |
src_id_1 | the first tuple index to use for combining from the field data source |
src_id_2 | the second tuple index to use for combining from the field data source |
src_id_3 | the third tuple index to use for combining from the field data source |
alpha_1 | the first interpolation value used for combining the source tuples |
alpha_2 | the second interpolation value used for combining the source tuples |
|
pure virtual |
CopyCombineTuples() combines the data from two tuples into a destination tuple. This field data object can be used as the source field data object to copy within the object.
source | the field data source to combine from |
dest_id | the tuple index to put the combined results into in this field data |
src_id_1 | the first tuple index to use for combining from the field data source |
src_id_2 | the second tuple index to use for combining from the field data source |
alpha | the interpolation value used for combining the source tuples |
|
pure virtual |
CopyRange() copies a range of tuples from a source field object into this field object. The field objects must have the same field setup. This field object must be resized to hold the tuples before copying.
source | the source field object to copy from |
start_dest_id | the first destination tuple id |
start_src_id | the first source tuple id |
count | the number of tuples to copy |
|
pure virtual |
CopyTuple() copies one tuple to another. Both the dest_id and the source_id must exist in the array. This field data object can be used as the source field data object to copy within the object.
source | the source field data to copy from |
dest_id | the tuple index to copy into in this field data |
src_id | the tuple index to copy from in the source field data |
|
pure virtual |
Copies the field setup and data from another object. To only copy the setup, set copy_data to false.
source | the source array to copy from |
copy_data | true if the data should be copied along with the field data properties |
|
pure virtual |
Extracts a range of tuples from this object. The receiving object is assumed to have exactly the same data fields as this object.
dest | the destination object Value cannot be equal to null. |
start | the id of the first tuple that is extracted |
count | the number of tuples to extract |
|
virtual |
GetClass returns the name of the class of the object.
Reimplemented from SimplygonSDK::IObject.
|
pure virtual |
Retrieves a field. If the field was not found, the return is NULL.
name | the name of the field to fetch |
|
pure virtual |
Returns the number of fields in the field data object. The ids of the fields range from 0 through (GetFieldCount()-1)
|
pure virtual |
Returns the field associated with the specified handle.
hand | the handle to the requested field |
|
pure virtual |
Retrieves a field from its index in the field data.
id | the id of the field |
|
pure virtual |
Returns the handle of the first field. If no fields are added to the object, NULL is returned.
|
pure virtual |
Returns the id of the field with the highest id. NOTE! If no fields exist in the field data object, the return is undefined.
|
pure virtual |
Returns the id of the last tuple in the array. If the array is empty, the value is undefined.
Returns the next handle, or NULL if no more fields exist in the object.
hand | the current handle |
|
pure virtual |
Returns the number of tuples.
|
pure virtual |
Works like IndexedCopy, but uses two consecutive ids in the idtable, and a blend value from the blendtable. The idtable contains (idtable_cnt*2) indices and blendtable contains idtable_cnt blend values.
Does the blend: dest = src1*(1-blend) + src2*blend
The FieldData must have enough tuples to hold the new data.
source | the field data to combine from Value cannot be equal to null. |
idtable | array containing the tuple indices to combine Value cannot be equal to null. |
blendtable | array containing the blend weights Value cannot be equal to null. |
startId | the tuple to begin putting the combinations into |
|
pure virtual |
Works like IndexedCopy, but uses two consecutive ids in the idtable, and a blend value from the blendtable. The idtable contains (idtable_cnt*2) indices and blendtable contains idtable_cnt blend values.
Does the blend: dest = src1*(1-blend) + src2*blend
The FieldData must have enough tuples to hold the new data.
source | the field data to combine from Value cannot be equal to null. |
idtable_ridInputDataPtr | array containing the tuple indices to combine Value cannot be equal to null. |
blendtable_realInputDataPtr | pointer to the blend weights Value cannot be equal to null. |
idtable_cnt | the number of indices to combine |
startId | the tuple to begin putting the combinations into |
|
pure virtual |
Works like IndexedCombine(), but with three ids that are combined through two blend values in the blendtable. The idtable contains (idtable_cnt*3) indices and blendtable contains (idtable_cnt*2) blend values.
Does the blend: dest = src1*blend1 + src2*blend2 + src3*(1-(blend1+blend2))
The FieldData must have enough tuples to hold the new data.
source | the field data to combine from Value cannot be equal to null. |
idtable | array containing the tuple indices to combine Value cannot be equal to null. |
blendtable | array containing the blend weights Value cannot be equal to null. |
startId | the tuple to begin putting the combinations into |
|
pure virtual |
Works like IndexedCombine(), but with three ids that are combined through two blend values in the blendtable. The idtable contains (idtable_cnt*3) indices and blendtable contains (idtable_cnt*2) blend values.
Does the blend: dest = src1*blend1 + src2*blend2 + src3*(1-(blend1+blend2))
The FieldData must have enough tuples to hold the new data.
source | the field data to combine from Value cannot be equal to null. |
idtable_ridInputDataPtr | array containing the tuple indices to combine Value cannot be equal to null. |
blendtable_realInputDataPtr | pointer to the blend weights Value cannot be equal to null. |
idtable_cnt | the number of sets of indices to combine |
startId | the tuple to begin putting the combinations into |
|
pure virtual |
Copies tuples from a source field data object through an id table. The id table dictates the order in which the tuples are to be copied. E.g. If the first item in the id table has the value 14, then the tuple with id 14 in the source array will be copied to the first tuple in this array.
Note! All ids in the id table must be valid ids of tuples in the source field data object. The id table is assumed to have a tuple size of 1. The source and this field data object must have the same underlaying data fields, of the same type and the same tuple sizes. The FieldData must have enough tuples to hold the new data.
source | the source field data object to copy from Value cannot be equal to null. |
idtable | array containing the tuple indices to copy Value cannot be equal to null. |
startId | the first tuple to begin copy into |
|
pure virtual |
Copies tuples from a source field data object through an id table. The id table dictates the order in which the tuples are to be copied. E.g. If the first item in the id table has the value 14, then the tuple with id 14 in the source array will be copied to the first tuple in this array.
Note! All ids in the id table must be valid ids of tuples in the source field data object. The id table is assumed to have a tuple size of 1. The source and this field data object must have the same underlaying data fields, of the same type and the same tuple sizes. The FieldData must have enough tuples to hold the new data.
source | the source field data object to copy from Value cannot be equal to null. |
idtable_ridInputDataPtr | pointer to indices of tuples to copy Value cannot be equal to null. |
idtable_cnt | the number of indices to copy |
startId | the first tuple to begin copy into |
|
virtual |
The IsA function returns true if the object is a or is a descendant of the class named as the type parameter
type | is the name of the class to check if the object is, or is a descendant of |
Reimplemented from SimplygonSDK::IObject.
|
inlinestatic |
The IsClassA function returns true if IFieldData is a or is a descendant of the class named as the type parameter
type | is the name of the class to check if the class is, or is a descendant of |
Definition at line 4660 of file SimplygonSDK.h.
|
pure virtual |
Returns 1 if no tuples exist in the field data.
|
pure virtual |
Compares the field setup of this field data object to another field data object. If the setups are not identical, false is returned. Note! IsSetupIdenticalTo will return false even if the same fields exist in both field data objects, but are not in the same order.
other | The other field data object used for comparison |
|
pure virtual |
Creates another field data object with the same field setup. To also copy the data to the new object, set copy_data to true.
copy_data | true if data should be copied along with the field properties |
|
pure virtual |
Like NewCopy, NewPackedCopy creates a field data object with the same underlying data and tuple settings as the source field data object. However, NewPackedCopy only copies unique tuples, and if the index_array parameter is set, this index array will contain the same number of tuples as the source field data object, and with the ids of a specific tuples within the new copy of the field data object.
index_array | will contain indices to the new packed field data values |
|
pure virtual |
Clears all fields from the object. Releases all data in the object.
|
pure virtual |
Removes a field. Removing a field causes the remaining fields to be remapped to new ids. Note that the field must exist. If not, the method will return error. To remove a field that may not exist, use SafeRemoveField
name | the name of the field |
|
inlinestatic |
SafeCast makes sure the pointer is of a class that can be cast into a IFieldData pointer, and if this is possible, returns the cast pointer.
ptr | is the pointer to be cast into a IFieldData pointer |
Definition at line 4673 of file SimplygonSDK.h.
|
pure virtual |
Removes a field. Removing a field causes the remaining fields to be remapped to new ids.
name | the name of the field |
|
pure virtual |
Resizes the list to the specified tuplecount. If the list is enlarged, the new tuples will contain unspecified data.
tuplecount | the desired tuple count Value cannot be less than 0. Value cannot be greater than INT_MAX. |