Class BitmapTex
See Also: Class Texmap, Class StdUVGen, Class TextureOutput.
class BitmapTex: public Texmap, public FPMixinInterface
Description:
This class is an interface into the Bitmap texture. All methods of this class are implemented by the system.
Methods:
Prototype:
virtual void SetFilterType(int ft)=0;
Remarks:
Sets the bitmap filtering method used.
Parameters:
int ft
Image filtering types. One of the following values:
FILTER_PYR
Pyramidal.
FILTER_SAT
Summed Area.
FILTER_NADA
None.
Prototype:
virtual void SetAlphaSource(int as)=0;
Remarks:
This method may be used to set the alpha source for the bitmap.
Parameters:
int as
Alpha source types. One of the following values:
ALPHA_FILE
Image alpha (if present).
ALPHA_RGB
RGB Intensity.
ALPHA_NONE
None (opaque).
Prototype:
virtual void SetAlphaAsMono(BOOL onoff)=0;
Remarks:
The Mono Channel Intensity may be either RGB Intensity or Alpha.
Parameters:
BOOL onoff
TRUE for Alpha; FALSE for RGB Intensity.
Prototype:
virtual void SetAlphaAsRGB(BOOL onoff)=0;
Remarks:
This method is available in release 2.0 and later only.
The Alpha Source may be either from the RGB channels or Image Alpha channel.
Parameters:
BOOL onoff
TRUE for RGB; FALSE for Alpha channel.
Prototype:
virtual void SetMapName(TCHAR *name)=0;
Remarks:
Sets the filename of the bitmap used.
Parameters:
TCHAR *name
The filename of the bitmap.
Prototype:
virtual StdUVGen* GetUVGen()=0;
Remarks:
Retrieves a pointer to the StdUVGen interface for this bitmap. This allows access to the mapping parameters such as UV offsets, blur, angle, noise level, etc.
The following methods allow access to the values from the 'Time' rollup.
Prototype:
virtual void SetEndCondition(int endcond)=0;
Remarks:
Sets the end condition setting.
Parameters:
int endcond
The end condition. One of the following values:
END_LOOP
END_PINGPONG
END_HOLD
Prototype:
virtual void SetStartTime(TimeValue t)=0;
Remarks:
Sets the start time setting.
Parameters:
TimeValue t
The new start time.
Prototype:
virtual void SetPlaybackRate(float r)=0;
Remarks:
Sets the playback rate setting.
Parameters:
float r
The new playback rate. This is frames of the bitmap per frame of rendering time. If the value is 1 then you are playing 1 frame for every render frame. If it is 0.5 then the bitmap frame is held for 2 rendering frames.
Prototype:
virtual int GetFilterType()=0;
Remarks:
Returns the filter type.
Return Value:
One of the following values:
FILTER_PYR
Pyramidal.
FILTER_SAT
Summed Area Table.
FILTER_NADA
None.
Prototype:
virtual int GetAlphaSource()=0;
Remarks:
Returns the alpha source.
Return Value:
One of the following values:
ALPHA_FILE
ALPHA_RGB
ALPHA_NONE
Prototype:
virtual int GetEndCondition()=0;
Remarks:
Returns the end condition setting.
Return Value:
One of the following values:
END_LOOP
END_PINGPONG
END_HOLD
Prototype:
virtual BOOL GetAlphaAsMono(BOOL onoff)=0;
Remarks:
The Mono Channel Intensity may be either RGB Intensity or Alpha.
Parameters:
BOOL onoff
This parameter is ignored.
Return Value:
TRUE if Alpha; FALSE if RGB Intensity.
Prototype:
virtual BOOL GetAlphaAsRGB(BOOL onoff)=0;
Remarks:
This method is available in release 2.0 and later only.
The Alpha Channel may be either RGB or Image Alpha.
Parameters:
BOOL onoff
This parameter is ignored.
Return Value:
TRUE for RGB; FALSE for Image Alpha.
Prototype:
virtual TCHAR *GetMapName()=0;
Remarks:
Returns the name of the bitmap file.
Prototype:
virtual TimeValue GetStartTime()=0;
Remarks:
Returns the start frame setting as a TimeValue.
Prototype:
virtual float GetPlaybackRate()=0;
Remarks:
Returns the playback rate setting.
Prototype:
virtual StdUVGen* GetUVGen()=0;
Remarks:
Retrieves a pointer to the StdUVGen interface for this bitmap. This allows access to the mapping parameters such as UV offsets, blur, angle, noise level, etc.
Prototype:
virtual TextureOutput* GetTexout()=0;
Remarks:
Returns a pointer to a class to access TextureOutput properties of this texture.
Prototype:
virtual Bitmap *GetBitmap(TimeValue t);
Remarks:
This method is available in release 2.0 and later only.
Returns a pointer to the Bitmap associated with this Bitmap Texture.
Parameters:
TimeValue t
The time at which to return the bitmap.
Prototype:
virtual void SetBitmap(Bitmap *bm);
Remarks:
This method is available in release 4.0 and later only.
This will swap the bitmap pointer without updating BitmapInfo.
Parameters:
Bitmap *bm
A pointer to the bitmap.
Default Implementation:
{ }
Prototype:
virtual BitmapLoadDlg();
Remarks:
This method is available in release 3.0 and later only.
This method brings up a bitmap loader dialog.
Default Implementation:
{ return 0; }
Prototype:
virtual ReloadBitmapAndUpdate();
Remarks:
This method is available in release 3.0 and later only.
This method forces the bitmap to reload and the view to be redrawn.
Default Implementation:
{ return 0; }
Prototype:
void fnReload()=0;
Remarks:
This method is available in release 4.0 and later only.
This method reloads the bitmap texture and operates as if the user pressed the reload button.
Prototype:
void fnViewImage()=0;
Remarks:
This method is available in release 4.0 and later only.
This method will view the bitmap texture image and operates as if the user pressed the view image button.