All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VisualizationBase Class CATTexturePixelImage

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---VisualizationBase.CATPixelImage
        |
        +---CATTexturePixelImage
 

Usage: you must use this class as is. You should never derive it.


public class CATTexturePixelImage

Class to create an image used in texture mapping.


Constructor and Destructor Index


o CATTexturePixelImage(CATPixelImage&)
Copy constructor
o CATTexturePixelImage(CATTexturePixelImage&)
Copy constructor
o CATTexturePixelImage(int,int,PixelImageFormat)
Contructs a blank texture of given size.
o CATTexturePixelImage(int,int,PixelImageFormat,unsigned char*)
Constructs a texture of given size and data.

Method Index


o AddReference()
Increments the reference counter of the texture.
o ChangeFormat(CATPixelImageFormat)
Changes the image format.
o Destroy()
Deletes the texture.
o GetPathName()
Returns the pathname of the image used as the texture.
o GetReferenceNumber()
Returns the reference counter value of the texture.
o Modify(int,int,PixelImageFormat,unsigned char*,DeallocatePixels)
Modify the image used as the texture.
o SendMaterialNotification(CATMaterialNotificationType)
Updates the display after a modification of the graphic material.
o SetPathName(CATString&)
Sets the pathname of the image used as the texture.
o SubReference()
Decrements the reference counter of the texture.
o WriteToFile(CATString&,CATString&)
Writes the texture to a file.

Constructor and Destructor


o CATTexturePixelImage
public CATTexturePixelImage( const CATPixelImage& iImage)
Copy constructor
o CATTexturePixelImage
public CATTexturePixelImage( const CATTexturePixelImage& iImage)
Copy constructor
o CATTexturePixelImage
public CATTexturePixelImage( const int iWidth,
const int iHeight,
const PixelImageFormat iPixelDataFormat)
Contructs a blank texture of given size.
Parameters:
iWidth
Width of the image used as the texture.
iHeight
Height of the image used as the texture.
iPixelDataFormat
Format of the data. @see PixelImageFormat
o CATTexturePixelImage
public CATTexturePixelImage( const int iWidth,
const int iHeight,
const PixelImageFormat iPixelDataFormat,
const unsigned char* iPixelData)
Constructs a texture of given size and data.
Parameters:
iWidth
Width of the image used as the texture.
iHeight
Height of the image used as the texture.
iPixelDataFormat
Format of the data. @see PixelImageFormat
iPixelData
Data of the image used as the texture.

Methods


o AddReference
public void AddReference()
Increments the reference counter of the texture.
o ChangeFormat
public virtual int ChangeFormat(CATPixelImageFormat iFormat)
Changes the image format.
Valid conversions are: RGB to RGBA and RGBA to RGB.
Parameters:
iFormat
The new format.
Returns:

Legal values
0
Success.
o Destroy
public virtual int Destroy()
Deletes the texture.
o GetPathName
public virtual const CATString & GetPathName()const
Returns the pathname of the image used as the texture.
o GetReferenceNumber
public int GetReferenceNumber()const
Returns the reference counter value of the texture.
o Modify
public virtual int Modify(int iWidth,
int iHeight,
PixelImageFormat iFormat,
unsigned char* iPixels,
DeallocatePixels iFlag= PixDeallocateYESfree)
Modify the image used as the texture.
Parameters:
iWidth
Width of new image used as the texture.
iHeight
Height of new image used asthe texture.
iFormat
Pixel data format of new image used as the texture.
iPixels
Pixel data of new image used as the texture
iFormat
Inactive.
o SendMaterialNotification
public virtual void SendMaterialNotification(CATMaterialNotificationType iType)
Updates the display after a modification of the graphic material.
o SetPathName
public virtual void SetPathName( const CATString& iPathName)
Sets the pathname of the image used as the texture.
Parameters:
iPathName
Pathname of the image.
o SubReference
public void SubReference()
Decrements the reference counter of the texture.
o WriteToFile
public virtual int WriteToFile( const CATString& iFileFormat,
const CATString& iPathName) const
Writes the texture to a file.
Parameters:
iFileFormat
The output file format.
Legal values
iFileFormat
The output file format.
Legal values
"TIFF"
True color uncompressed TIFF file.
"TIFFTCPB"
True color PackBits compressed TIFF file.
"TIFFINDEX"
Indexed (256 colors) uncompressed TIFF file.
"TIFFPB"
Indexed (256 colors) PackBits compressed TIFF file.
"TIFFGREY"
Grey scale PackBits compressed TIFF file.
"TIFFBWPB"
Bilevel (black and white) PackBits compressed TIFF file.
"RGB"
RGB file (SGI format).
"HPRTL"
HP/RTL - 300 dpi.
"BMP"
Windows Bitmap.
"JPEG_FAIR"
JPEG, fair quality.
"JPEG"
JPEG, medium quality.
"JPEG_HIGH"
JPEG, high quality.
"PNG"
Portable Network Graphics.
"DDS"
Microsoft DirectDraw Surface.
iPathName
The file to save the image in.
Returns:

Legal values
0
Success.

This object is included in the file: CATTexturePixelImage.h
If needed, your Imakefile.mk should include the module: CATViz

Copyright © 2003, Dassault Systèmes. All rights reserved.