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

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::IImageData:
SimplygonSDK::IObject

Public Member Functions

virtual void AddColors (rid valuetype, const char *format)=0
 
virtual void AddField (const char *name, rid valuetype, unsigned int tuplesize)=0
 
virtual void DeepCopy (IImageData *source, bool copy_data)=0
 
virtual const char * GetClass ()
 
virtual CountedPointer< IValueArrayGetColors ()=0
 
virtual rstring GetColorsFormat ()=0
 
virtual rid GetColorsValueType ()=0
 
virtual CountedPointer< IValueArrayGetField (const char *name)=0
 
virtual rid GetFieldValueType (const char *name)=0
 
virtual CountedPointer< IFieldDataGetImageFields ()=0
 
virtual unsigned int GetType ()=0
 
virtual unsigned int GetXSize ()=0
 
virtual unsigned int GetYSize ()=0
 
virtual unsigned int GetZSize ()=0
 
virtual bool HasColors ()=0
 
virtual bool HasField (const char *name)=0
 
virtual bool IsA (const char *type) const
 
virtual CountedPointer< IImageDataNewCopy (bool copy_data)=0
 
virtual void RemoveColors ()=0
 
virtual void RemoveField (const char *name)=0
 
virtual void Reset ()=0
 
virtual void Set1DSize (unsigned int _xs)=0
 
virtual void Set2DSize (unsigned int _xs, unsigned int _ys)=0
 
virtual void Set3DSize (unsigned int _xs, unsigned int _ys, unsigned int _zs)=0
 
virtual void SetCubeSize (unsigned int _xs, unsigned int _ys)=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 IImageDataSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

IImageData holds unpacked image data. The data is stored in an IFieldData object as value fields. For simplicity all images are implemented as 3D images, but has an extent of 1 in Z for 2D images, and an extent of 1 in both Y and Z for 1D images. Cube maps are stored as a 3D image with Z-depth of 6 (one for each side)

Definition at line 6627 of file SimplygonSDK.h.

Member Function Documentation

◆ AddColors()

virtual void SimplygonSDK::IImageData::AddColors ( rid  valuetype,
const char *  format 
)
pure virtual

Adds the Colors field.

Parameters
valuetypeis the type used to store the tuples. Use TYPES_ID_UCHAR base type for 8-bit per channel data, and TYPES_ID_USHORT base type for 16-bit per channel data.
formatis a string that describes the format of the color field. Each character in format represents a color channel in the color tuple. All characters in the format string must be unique and uppercase. Normal values for format are: RGB, RGBA, YUV, HLS, CMYK, L and R. In these examples the tuplesize of the formats will be 3,4,3,3,4,1 and 1, respectively. The format string must be at least one character long. Use the SG_IMAGEDATA_FORMAT_[] defines to define the standard types.

◆ AddField()

virtual void SimplygonSDK::IImageData::AddField ( const char *  name,
rid  valuetype,
unsigned int  tuplesize 
)
pure virtual

Adds a field. The field must have a name that does not conflict with any of the existing fields' names. The field is referenced by the image after the call to AddField()

Parameters
namethe name of the field to add
valuetypethe type of the field, types listed in SimplygonSDK::BaseTypes
tuplesizethe size of tuples in the new field

◆ DeepCopy()

virtual void SimplygonSDK::IImageData::DeepCopy ( IImageData source,
bool  copy_data 
)
pure virtual

Copies the field setup and data from another object. To only copy the setup, set copy_data to false.

Parameters
sourcethe IImageData object to copy from
copy_datatrue if the data should be copied along with the image data properties

◆ GetClass()

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

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::IObject.

◆ GetColors()

virtual CountedPointer<IValueArray> SimplygonSDK::IImageData::GetColors ( )
pure virtual

Gets the Colors field.

Returns
the value array used by the colors field.

◆ GetColorsFormat()

virtual rstring SimplygonSDK::IImageData::GetColorsFormat ( )
pure virtual

Gets the color field format specification

Returns
the format specification string

◆ GetColorsValueType()

virtual rid SimplygonSDK::IImageData::GetColorsValueType ( )
pure virtual

Gets the base type used by the colors field

Returns
the base type used by the colors field.

◆ GetField()

virtual CountedPointer<IValueArray> SimplygonSDK::IImageData::GetField ( const char *  name)
pure virtual

Gets a field.

Parameters
namethe name of the field to get
Returns
the requested field

◆ GetFieldValueType()

virtual rid SimplygonSDK::IImageData::GetFieldValueType ( const char *  name)
pure virtual

Gets a field's value type.

Parameters
namethe name of the field whose type to get, types listed in SimplygonSDK::BaseTypes
Returns
the base type of the field

◆ GetImageFields()

virtual CountedPointer<IFieldData> SimplygonSDK::IImageData::GetImageFields ( )
pure virtual

Get the ImageFields field data object, that holds all fields within the image

Returns
the ImageFields field data object

◆ GetType()

virtual unsigned int SimplygonSDK::IImageData::GetType ( )
pure virtual

Get the type of this image data.

Returns
the type of this image data

◆ GetXSize()

virtual unsigned int SimplygonSDK::IImageData::GetXSize ( )
pure virtual

Get the X dimension size of this image data.

Returns
the X dimension size of this image data.

◆ GetYSize()

virtual unsigned int SimplygonSDK::IImageData::GetYSize ( )
pure virtual

Get the Y dimension size of this image data.

Returns
the Y dimension size of this image data.

◆ GetZSize()

virtual unsigned int SimplygonSDK::IImageData::GetZSize ( )
pure virtual

Get the Z dimension size of this image data.

Returns
the Z dimension size of this image data.

◆ HasColors()

virtual bool SimplygonSDK::IImageData::HasColors ( )
pure virtual

Checks if the image has a color field

Returns
true if the image has a color field

◆ HasField()

virtual bool SimplygonSDK::IImageData::HasField ( const char *  name)
pure virtual

Check if a field exists in the IImageData object.

Parameters
namethe name of the field to check for
Returns
true if field exists, otherwise false

◆ IsA()

virtual bool SimplygonSDK::IImageData::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::IObject.

◆ IsClassA()

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

The IsClassA function returns true if IImageData 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 6648 of file SimplygonSDK.h.

◆ NewCopy()

virtual CountedPointer<IImageData> SimplygonSDK::IImageData::NewCopy ( bool  copy_data)
pure virtual

Creates another image data object with the same field setup. To also copy the data to the new object, set copy_data to true.

Parameters
copy_dataif true, all data is copied
Returns
the new copy of the image data object

◆ RemoveColors()

virtual void SimplygonSDK::IImageData::RemoveColors ( )
pure virtual

Removes the Colors field.

◆ RemoveField()

virtual void SimplygonSDK::IImageData::RemoveField ( const char *  name)
pure virtual

Removes a field.

Parameters
namethe name of the field to remove

◆ Reset()

virtual void SimplygonSDK::IImageData::Reset ( )
pure virtual

Clears all data from the image, and removes all data fields. The type is reset to 2D

◆ SafeCast()

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

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

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

Definition at line 6661 of file SimplygonSDK.h.

◆ Set1DSize()

virtual void SimplygonSDK::IImageData::Set1DSize ( unsigned int  _xs)
pure virtual

Set the X dimension size of this image data.

Parameters
_xsthe desired X dimension size of this image data

◆ Set2DSize()

virtual void SimplygonSDK::IImageData::Set2DSize ( unsigned int  _xs,
unsigned int  _ys 
)
pure virtual

Set the X and Y dimension size of this image data.

Parameters
_xsthe desired X dimension size of this image data
_ysthe desired Y dimension size of this image data

◆ Set3DSize()

virtual void SimplygonSDK::IImageData::Set3DSize ( unsigned int  _xs,
unsigned int  _ys,
unsigned int  _zs 
)
pure virtual

Set the X, Y and Z dimension size of this image data.

Parameters
_xsthe desired X dimension size of this image data
_ysthe desired Y dimension size of this image data
_zsthe desired Z dimension size of this image data

◆ SetCubeSize()

virtual void SimplygonSDK::IImageData::SetCubeSize ( unsigned int  _xs,
unsigned int  _ys 
)
pure virtual

Set the 6 uniform cube side dimensions of this image data.

Parameters
_xsthe desired X dimension size of each cube side in this image data
_ysthe desired Y dimension size of each cube side in this image data

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