Simplygon C++ API  8.3.35800.0
SimplygonSDK::IValueArray Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::IValueArray:
SimplygonSDK::IArray SimplygonSDK::IObject SimplygonSDK::IBoolArray SimplygonSDK::ICharArray SimplygonSDK::IDoubleArray SimplygonSDK::IFloatArray SimplygonSDK::IIntArray SimplygonSDK::ILongArray SimplygonSDK::IRealArray SimplygonSDK::IRidArray SimplygonSDK::IShortArray SimplygonSDK::IStringArray SimplygonSDK::IUnsignedCharArray SimplygonSDK::IUnsignedIntArray SimplygonSDK::IUnsignedLongArray SimplygonSDK::IUnsignedShortArray

Public Member Functions

virtual SGDEPRECATED void CopyCombine3Tuples (IValueArray *sourceArray, rid dest_id, rid src_id_1, rid src_id_2, rid src_id_3, real alpha_1, real alpha_2)=0
 
virtual SGDEPRECATED void CopyCombineTuples (IValueArray *sourceArray, rid dest_id, rid src_id_1, rid src_id_2, real alpha)=0
 
virtual const char * GetClass ()
 
virtual SGDEPRECATED bool GetInterpolateTuples ()=0
 
virtual real GetRealItem (rid id)=0
 
virtual SGDEPRECATED void IndexedCombine (IValueArray *source, IRidArray *idtable, IRealArray *blendtable, rid startId)=0
 
virtual SGDEPRECATED void IndexedCombine3 (IValueArray *source, IRidArray *idtable, IRealArray *blendtable, rid startId)=0
 
virtual bool IsA (const char *type) const
 
virtual SGDEPRECATED void SetInterpolateTuples (bool value)=0
 
virtual void SetRealItem (rid id, real value)=0
 
- Public Member Functions inherited from SimplygonSDK::IArray
virtual void AppendArray (IArray *source)=0
 
virtual SGDEPRECATED void AppendTuples (IArray *source)=0
 
virtual void Clear ()=0
 
virtual int CompareTuples (IArray *otherArray, rid tuple_id, rid other_tuple_id)=0
 
virtual void CopyRange (IArray *source_array, rid start_dest_id, rid start_src_id, unsigned int count)=0
 
virtual void CopyTuple (IArray *sourceArray, rid dest_id, rid src_id)=0
 
virtual void DeepCopy (IArray *source)=0
 
virtual void ExtractTuples (IArray *dest, rid start, unsigned int count)=0
 
virtual rstring GetAlternativeName ()=0
 
virtual rid GetBaseType ()=0
 
virtual unsigned int GetItemCount ()=0
 
virtual rid GetMaxItemId ()=0
 
virtual rid GetMaxTupleId ()=0
 
virtual unsigned int GetTupleCount ()=0
 
virtual unsigned int GetTupleSize ()=0
 
virtual void IndexedCopy (IArray *source, IRidArray *idtable, rid startId)=0
 
virtual bool IsEmpty ()=0
 
virtual CountedPointer< IArrayNewCopy (bool copy_data)=0
 
virtual CountedPointer< IArrayNewPackedCopy (IRidArray *index_array)=0
 
virtual void SetAlternativeName (const char *value)=0
 
virtual void SetItemCount (unsigned int count)=0
 
virtual void SetTupleCount (unsigned int tuplecount)=0
 
virtual void SetTupleSize (unsigned int newsize)=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
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 IValueArraySafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IArray
static bool IsClassA (const char *type)
 
static IArraySafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

ReValueArray adds methods to arrays to generically add, set and get tuples, through real values.

Definition at line 2083 of file SimplygonSDK.h.

Member Function Documentation

◆ CopyCombine3Tuples()

virtual SGDEPRECATED void SimplygonSDK::IValueArray::CopyCombine3Tuples ( IValueArray sourceArray,
rid  dest_id,
rid  src_id_1,
rid  src_id_2,
rid  src_id_3,
real  alpha_1,
real  alpha_2 
)
pure virtual
Deprecated:
Method is marked as deprecated and will be removed in future version. CopyCombine3Tuples() combines the data from three tuples into a destination tuple. The call works like CopyCombineTuples(), 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
The source array must be of the same type as this array, and have the same number of items in each tuple. This array can be used as the source array to copy within the array.
Parameters
sourceArraythe array to copy from Value cannot be equal to null.
dest_idthe tuple index to copy to
src_id_1the first source array tuple to copy from
src_id_2the second source array tuple to copy from
src_id_3the third source array tuple to copy from
alpha_1the first interpolation value
alpha_2the second interpolation value

◆ CopyCombineTuples()

virtual SGDEPRECATED void SimplygonSDK::IValueArray::CopyCombineTuples ( IValueArray sourceArray,
rid  dest_id,
rid  src_id_1,
rid  src_id_2,
real  alpha 
)
pure virtual
Deprecated:
Method is marked as deprecated and will be removed in future version. CopyCombineTuples() combines the data from two tuples from a source array into a destination tuple in this array. If InterpolateTuples is set to true, dest_id will receive a linear interpolation of the values, using the alpha value. If InterpolateTuples is set to false, then if alpha is less than 0.5 the contents of src_id_1 will end up in dest, else the contents of src_id_2 will be copied.
dest = src_1*(1-alpha) + src_2*alpha
The source array must be of the same type as this array, and have the same number of items in each tuple. This array can be used as the source array to copy within the array.
Parameters
sourceArraythe array to copy from Value cannot be equal to null.
dest_idthe tuple index to copy to
src_id_1the first source array tuple to copy from
src_id_2the second source array tuple to copy from
alphathe interpolation value

◆ GetClass()

virtual const char* SimplygonSDK::IValueArray::GetClass ( )
virtual

◆ GetInterpolateTuples()

virtual SGDEPRECATED bool SimplygonSDK::IValueArray::GetInterpolateTuples ( )
pure virtual
Deprecated:
Method is marked as deprecated and will be removed in future version. Set the interpolation flag. If set, the tuple values will be interpolated by calls to CopyCombineTuples, CopyCombine3Tuples, IndexedCombine and IndexedCombine3. If not set, then the methods will copy data from the tuple with the highest alpha blend value.
Returns
the interpolation flag

◆ GetRealItem()

virtual real SimplygonSDK::IValueArray::GetRealItem ( rid  id)
pure virtual

GetRealItem() retrieves the item at position id. The id is the id of the item, not the tuple the item belongs to. GetRealItem() converts the value from the actual underlying data type to a real.

Parameters
idthe item to get. Value cannot be less than 0. Value cannot be greater than the value returned by GetMaxItemId().
Returns
the converted real value of the item.

◆ IndexedCombine()

virtual SGDEPRECATED void SimplygonSDK::IValueArray::IndexedCombine ( IValueArray source,
IRidArray idtable,
IRealArray blendtable,
rid  startId 
)
pure virtual
Deprecated:
Method is marked as deprecated and will be removed in future version. Works like IndexedCopy(), but uses two consecutive ids in the idtable, and a blend value from the blend table. The idtable contains (idtable_cnt*2) indices and blendtable contains idtable_cnt blend values. Note! The array must be large enough to hold the copied data.
Parameters
sourcethe source array to combine from Value cannot be equal to null.
idtableis the array with the tuple indices to use for combining Value cannot be equal to null.
blendtablethe array with (alpha) blend values Value cannot be equal to null.
startIdis the first tuple that will receive the combined values

◆ IndexedCombine3()

virtual SGDEPRECATED void SimplygonSDK::IValueArray::IndexedCombine3 ( IValueArray source,
IRidArray idtable,
IRealArray blendtable,
rid  startId 
)
pure virtual
Deprecated:
Method is marked as deprecated and will be removed in future version. 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. Note! The array must be large enough to hold the copied data.
Parameters
sourcethe source array to combine from Value cannot be equal to null.
idtableis the array with the tuple indices to use for combining Value cannot be equal to null.
blendtablethe array with (alpha) blend values Value cannot be equal to null.
startIdis the first tuple that will receive the combined values

◆ IsA()

virtual bool SimplygonSDK::IValueArray::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::IArray.

Reimplemented in SimplygonSDK::IUnsignedShortArray, SimplygonSDK::IUnsignedLongArray, SimplygonSDK::IUnsignedIntArray, SimplygonSDK::IUnsignedCharArray, SimplygonSDK::IShortArray, SimplygonSDK::IRidArray, SimplygonSDK::IRealArray, SimplygonSDK::ILongArray, SimplygonSDK::IIntArray, SimplygonSDK::IFloatArray, SimplygonSDK::IDoubleArray, SimplygonSDK::ICharArray, SimplygonSDK::IBoolArray, and SimplygonSDK::IStringArray.

◆ IsClassA()

static bool SimplygonSDK::IValueArray::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if IValueArray is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 2104 of file SimplygonSDK.h.

◆ SafeCast()

static IValueArray* SimplygonSDK::IValueArray::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a IValueArray pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a IValueArray pointer
Returns
a pointer to the IValueArray object, if the cast can be made, and a NULL pointer otherwise

Definition at line 2117 of file SimplygonSDK.h.

◆ SetInterpolateTuples()

virtual SGDEPRECATED void SimplygonSDK::IValueArray::SetInterpolateTuples ( bool  value)
pure virtual
Deprecated:
Method is marked as deprecated and will be removed in future version. Set the interpolation flag. If set, the tuple values will be interpolated by calls to CopyCombineTuples, CopyCombine3Tuples, IndexedCombine and IndexedCombine3. If not set, then the methods will copy data from the tuple with the highest alpha blend value.
Parameters
valueset to true if tuples should be interpolated

◆ SetRealItem()

virtual void SimplygonSDK::IValueArray::SetRealItem ( rid  id,
real  value 
)
pure virtual

SetRealItem() sets the item at position id. The id is the id of the item, not the tuple the item belongs to. SetRealItem() converts the value from real to the actual underlying data type.

Parameters
idthe item to set. Value cannot be less than 0. Value cannot be greater than the value returned by GetMaxItemId().
valuethe real value to set the item to.

The documentation for this class was generated from the following file: