- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FCDEffectParameterSurface Class Reference
[COLLADA Effect Classes [ColladaFX]]

A COLLADA surface parameter. More...

`#include <FCDEffectParameterSurface.h>`

Inheritance diagram for FCDEffectParameterSurface:

List of all members.

## Public Member Functions
| FCDEffectParameterSurface (FCDocument *document)
| Constructor: do not use directly.
virtual | ~FCDEffectParameterSurface ()
| Destructor.
virtual Type | GetType () const
| Retrieves the type of effect parameter class.
FCDEffectParameterSurfaceInit * | GetInitMethod ()
| Retrieves the initialization method for the surface parameter.
const FCDEffectParameterSurfaceInit * | GetInitMethod () const
| See above.
void | SetInitMethod (FCDEffectParameterSurfaceInit *method)
| Sets the initialization method for the surface parameter.
const FCDImage ** | GetImages () const
| Retrieves the list of images that make up this surface. See above.
size_t | GetImageCount () const
| Retrieves the number of COLLADA images that make up this surface.
FCDImage * | GetImage (size_t index=0)
| Retrieves a specific image.
const FCDImage * | GetImage (size_t index=0) const
| See above.
size_t | FindImage (const FCDImage *image) const
| Retrieves the index that matches the given image.
size_t | AddImage (FCDImage *image, size_t index=(size_t)-1)
| Adds an image to the list.
void | RemoveImage (FCDImage *image)
| Removes an image from the list.
const FMVector3 & | GetSize () const
| Retrieves the wanted dimensions of the surface.
void | SetSize (const FMVector3 &dimensions)
| Sets the wanted dimensions of the surface.
float | GetViewportRatio () const
| Retrieves the viewport ratio to use when the surface is a render target.
void | SetViewportRatio (float ratio)
| Sets the viewport ratio to use when the surface is a render target.
uint16 | GetMipLevelCount () const
| Retrieves the wanted number of mip-levels.
void | SetMipLevelCount (uint16 levelCount)
| Sets the wanted number of mip-levels.
bool | IsGenerateMipMaps () const
| Retrieves whether to generate the mip-map levels on load.
void | SetGenerateMipMaps (bool _generateMipmaps)
| Sets whether to generate the mip-map levels of load.
void | SetFormat (const fm::string &_format)
| Sets/Gets format.
const fm::string & | GetFormat ()
void | SetSurfaceType (const fm::string &_type)
| Sets type.
const fm::string & | GetSurfaceType ()
| Retrieves type.
virtual bool | IsValueEqual (FCDEffectParameter *parameter)
| Compares this parameter's value with another.
virtual FCDEffectParameter * | Clone (FCDEffectParameter *clone=NULL) const
| Creates a full copy of the effect parameter.
virtual void | Overwrite (FCDEffectParameter *target)
| [INTERNAL] Overwrites the target parameter with this parameter.
StringList & | GetNames ()
| [INTERNAL] Retrieve the list of image names
FCDFormatHint * | AddFormatHint ()
| Adds a format hint to the surface parameter.
FCDFormatHint * | GetFormatHint ()
| Retrieves the format hint of the surface parameter.
const FCDFormatHint * | GetFormatHint () const

## Detailed Description

A COLLADA surface parameter.

This parameters hold the texture loading information. The texture placement information should be held by the sampler parameter.

See also:
  FCDEffectParameterSampler

## Constructor & Destructor Documentation

FCDEffectParameterSurface::FCDEffectParameterSurface | ( | FCDocument * | document | ) |

  | Constructor: do not use directly. Instead, use the appropriate AddEffectParameter function. Parameters:
  | document | The COLLADA document that owns the effect parameter.

## Member Function Documentation

FCDFormatHint* FCDEffectParameterSurface::AddFormatHint | ( |  | ) |

| Adds a format hint to the surface parameter. Will fail silently if one already exists.

size_t FCDEffectParameterSurface::AddImage | ( | FCDImage * | image,
|  | size_t | index = `(size_t)-1`
| ) |

  | Adds an image to the list. The initialization method indexes the images from this list. This function will verify that this image does not already exist within the list, so use the returned index. Parameters:
  | image | The new image.
  | index | The index at which to insert the image. Set the index to -1 in order to append the image to the list.
Returns: The index of the image within the list.

virtual FCDEffectParameter* FCDEffectParameterSurface::Clone | ( | FCDEffectParameter * | clone = `NULL` | ) | const`[virtual]`

  | Creates a full copy of the effect parameter. Parameters:
  | clone | The cloned effect parameter. If this pointer is NULL, a new effect parameter will be created and you will need to delete this pointer.
Returns: The cloned effect parameter. Reimplemented from FCDEffectParameter.

size_t FCDEffectParameterSurface::FindImage | ( | const FCDImage * | image | ) | const

  | Retrieves the index that matches the given image. Parameters:
  | image | The image to match.
Returns: The index within the list for this image. This index may be -1 if no match was found.

FCDFormatHint* FCDEffectParameterSurface::GetFormatHint | ( |  | ) | `[inline]`

| Retrieves the format hint of the surface parameter. Returns: The format hint of the parameter. If this pointer is NULL, no format hint is provided.

FCDImage* FCDEffectParameterSurface::GetImage | ( | size_t | index = `0` | ) | `[inline]`

  | Retrieves a specific image. Parameters:
  | index | The index of the image.
Returns: The image. This pointer will be NULL if the index is out-of-bounds.

size_t FCDEffectParameterSurface::GetImageCount | ( |  | ) | const`[inline]`

| Retrieves the number of COLLADA images that make up this surface. There should never be more than six images to build a surface. In the large majority of cases, expect one image. Returns: The number of images.

const FCDImage** FCDEffectParameterSurface::GetImages | ( |  | ) | const`[inline]`

| Retrieves the list of images that make up this surface. See above. There should never be more than six images to build a surface. In the large majority of cases, expect one image. Returns: The list of images.

FCDEffectParameterSurfaceInit* FCDEffectParameterSurface::GetInitMethod | ( |  | ) | `[inline]`

| Retrieves the initialization method for the surface parameter. The initialization method is a powerful method of describing how to build complex textures, such as cube maps, from one or multiple image files. Returns: The surface initialization method. This pointer will be NULL, if no initialization method is provided.

uint16 FCDEffectParameterSurface::GetMipLevelCount | ( |  | ) | const`[inline]`

| Retrieves the wanted number of mip-levels. This parameter is optional and may be zero to indicate that you should retrieve the mip-levels from the image file(s) or generate a full mip-chain, depending on the mip-map generate flag. See also: GetMipMapGenerate Returns: The wanted number of mip-levels.

const FMVector3& FCDEffectParameterSurface::GetSize | ( |  | ) | const`[inline]`

| Retrieves the wanted dimensions of the surface. This parameter is optional and may contain all zeroes to indicate that you should read the surface dimensions from the image file(s). Returns: The wanted dimensions.

virtual Type FCDEffectParameterSurface::GetType | ( |  | ) | const`[inline, virtual]`

| Retrieves the type of effect parameter class. Returns: The parameter class type: SURFACE. Implements FCDEffectParameter.

float FCDEffectParameterSurface::GetViewportRatio | ( |  | ) | const`[inline]`

| Retrieves the viewport ratio to use when the surface is a render target. Returns: The viewport ratio.

bool FCDEffectParameterSurface::IsGenerateMipMaps | ( |  | ) | const`[inline]`

| Retrieves whether to generate the mip-map levels on load. The alternative is to load the mip-map levels from the image files. Returns: Whether to generate the mip-map levels on load.

virtual bool FCDEffectParameterSurface::IsValueEqual | ( | FCDEffectParameter * | parameter | ) | `[virtual]`

  | Compares this parameter's value with another. Parameters:
  | parameter | The given parameter to compare with.
Returns: true if the values are equal Implements FCDEffectParameter.

virtual void FCDEffectParameterSurface::Overwrite | ( | FCDEffectParameter * | target | ) | `[virtual]`

  | [INTERNAL] Overwrites the target parameter with this parameter. This function is used during the flattening of materials. Parameters:
  | target | The target parameter to overwrite.
Reimplemented from FCDEffectParameter.

void FCDEffectParameterSurface::RemoveImage | ( | FCDImage * | image | ) |

  | Removes an image from the list. The initialization method indexes the images from this list. This function will shift all the indexes in the initialization method so that they continue matching the correct image. Parameters:
  | image | The image to remove. Its memory is not released.

void FCDEffectParameterSurface::SetGenerateMipMaps | ( | bool | _generateMipmaps | ) | `[inline]`

  | Sets whether to generate the mip-map levels of load. The alternative is to load the mip-map levels from the image files. Parameters:
  | _generateMipmaps | Whether to generate the mip-map levels on load.

void FCDEffectParameterSurface::SetInitMethod | ( | FCDEffectParameterSurfaceInit * | method | ) |

  | Sets the initialization method for the surface parameter. The initialization method is a powerful method of describing how to build complex textures, such as cube maps, from one or multiple image files. Parameters:
  | method | The new initialization method. The old initialization method will be released. You should create a new initialization method for each surface parameter.

void FCDEffectParameterSurface::SetMipLevelCount | ( | uint16 | levelCount | ) | `[inline]`

  | Sets the wanted number of mip-levels. This parameter is optional and can be zero to indicate that you should retrieve the mip-levels from the image file(s) or generate a full mip-chain, depending on the mip-map generate flag. Parameters:
  | levelCount | The wanted number of mip-levels.

void FCDEffectParameterSurface::SetSize | ( | const FMVector3 & | dimensions | ) | `[inline]`

  | Sets the wanted dimensions of the surface. This parameter is optional and can contain all zeroes to indicate that you should read the surface dimensions from the image file(s). Parameters:
  | dimensions | The wanted dimensions.

void FCDEffectParameterSurface::SetViewportRatio | ( | float | ratio | ) | `[inline]`

  | Sets the viewport ratio to use when the surface is a render target. Parameters:
  | ratio | The viewport ratio.

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

- FCDocument/FCDEffectParameterSurface.h