r3mpbitm

r3mpbitm

Class

real/code/r3mpbitm.h

Library

r3code

Description:

Bitmap shader class. This shader can be used for defining material properties, such as color, using bit maps, such as JPEG, BMP, etc.

See Also

real/code/r3matprp.h

Super Class

r3Matprop

R3CLID_MATPROP

JavaScript

r3Mpbitmap

Class Identifier

R3CLID_MPBITMAP - 586

Methods

AUTOINDEXRANGE,

Attributes

BaseIndex, TileAnimation, FlipAnimation, ReverseAnimation, Image, NumFrames, FormatType, FormatDigits, Format, AnimationType, BindingObject, ImageName, ImageIndex, TextureAnimation, RealName, OpenSilently, RenderAlways,

Registration

int R3RegisterMPBitmapClass(R3APP *app);

R3MPBMM_AUTOINDEXRANGE

Method

AUTOINDEXRANGE

Identifier

R3MPBMM_AUTOINDEXRANGE

Return

R3BOOL, FALSE if no indices detected

JavaScript

rc = obj.AUTOINDEXRANGE();

Description

Scans the folder of the current image name and initializes R3MPBMA_BaseIndex and R3MPBMA_NumFrames if an indexed sequence is detected

BaseIndex

Attribute

BaseIndex

Identifier

R3MPBMA_BaseIndex

JavaScript type

Integer

C type

R3INT

Description

base index for texture animation

Syntax


jsobj.SetBaseIndex(value);
value = jsobj.GetBaseIndex();


R3INT value = ...;
R3SetAttrs(r3obj, R3MPBMA_BaseIndex, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3MPBMA_BaseIndex, &value, R3TAG_END);

TileAnimation

Attribute

TileAnimation

Identifier

R3MPBMA_TileAnimation

JavaScript type

Boolean

C type

R3BOOL

Description

tile animation to be used as a texture map

Syntax


jsobj.SetTileAnimation(value);
value = jsobj.GetTileAnimation();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3MPBMA_TileAnimation, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3MPBMA_TileAnimation, &value, R3TAG_END);

FlipAnimation

Attribute

FlipAnimation

Identifier

R3MPBMA_FlipAnimation

JavaScript type

Boolean

C type

R3BOOL

Description

if tiling, flip every odd sequence

Syntax


jsobj.SetFlipAnimation(value);
value = jsobj.GetFlipAnimation();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3MPBMA_FlipAnimation, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3MPBMA_FlipAnimation, &value, R3TAG_END);

ReverseAnimation

Attribute

ReverseAnimation

Identifier

R3MPBMA_ReverseAnimation

JavaScript type

Boolean

C type

R3BOOL

Description

play texture animation in reversed order

Syntax


jsobj.SetReverseAnimation(value);
value = jsobj.GetReverseAnimation();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3MPBMA_ReverseAnimation, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3MPBMA_ReverseAnimation, &value, R3TAG_END);

Image

Attribute

Image

Identifier

R3MPBMA_Image

JavaScript type

Object

C type

R3OBJ*

Description

R3OBJ, image object

Syntax


value = jsobj.GetImage();


R3OBJ* value;
R3GetAttrs(r3obj, R3MPBMA_Image, &value, R3TAG_END);

NumFrames

Attribute

NumFrames

Identifier

R3MPBMA_NumFrames

JavaScript type

Integer

C type

R3INT

Description

number of frames in the texture animation

Syntax


jsobj.SetNumFrames(value);
value = jsobj.GetNumFrames();


R3INT value = ...;
R3SetAttrs(r3obj, R3MPBMA_NumFrames, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3MPBMA_NumFrames, &value, R3TAG_END);

FormatType

Attribute

FormatType

Identifier

R3MPBMA_FormatType

JavaScript type

Integer

C type

R3INT

Description

see format types below

Syntax


jsobj.SetFormatType(value);
value = jsobj.GetFormatType();


R3INT value = ...;
R3SetAttrs(r3obj, R3MPBMA_FormatType, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3MPBMA_FormatType, &value, R3TAG_END);

FormatDigits

Attribute

FormatDigits

Identifier

R3MPBMA_FormatDigits

JavaScript type

Integer

C type

R3INT

Description

number of digits

Syntax


jsobj.SetFormatDigits(value);
value = jsobj.GetFormatDigits();


R3INT value = ...;
R3SetAttrs(r3obj, R3MPBMA_FormatDigits, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3MPBMA_FormatDigits, &value, R3TAG_END);

Format

Attribute

Format

Identifier

R3MPBMA_Format

JavaScript type

String

C type

char*

Description

printf style format string

Syntax


jsobj.SetFormat(value);
value = jsobj.GetFormat();


char* value = ...;
R3SetAttrs(r3obj, R3MPBMA_Format, value, R3TAG_END);
char* value;
R3GetAttrs(r3obj, R3MPBMA_Format, &value, R3TAG_END);

AnimationType

Attribute

AnimationType

Identifier

R3MPBMA_AnimationType

JavaScript type

Integer

C type

R3INT

Description

read only, see animation file types below

Syntax


jsobj.SetAnimationType(value);
value = jsobj.GetAnimationType();


R3INT value = ...;
R3SetAttrs(r3obj, R3MPBMA_AnimationType, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3MPBMA_AnimationType, &value, R3TAG_END);

BindingObject

Attribute

BindingObject

Identifier

R3MPBMA_BindingObject

JavaScript type

Object

C type

R3OBJ*

Description

'R3MPBMA_BindingObject' not documented

Syntax


jsobj.SetBindingObject(value);
value = jsobj.GetBindingObject();


R3OBJ* value = ...;
R3SetAttrs(r3obj, R3MPBMA_BindingObject, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3MPBMA_BindingObject, &value, R3TAG_END);

ImageName

Attribute

ImageName

Identifier

R3MPBMA_ImageName

JavaScript type

String

C type

char*

Description

image or animation file name

Syntax


jsobj.SetImageName(value);
value = jsobj.GetImageName();


char* value = ...;
R3SetAttrs(r3obj, R3MPBMA_ImageName, value, R3TAG_END);
char* value;
R3GetAttrs(r3obj, R3MPBMA_ImageName, &value, R3TAG_END);

ImageIndex

Attribute

ImageIndex

Identifier

R3MPBMA_ImageIndex

JavaScript type

Integer

C type

R3INT

Description

current frame in the animation. Set only in record mode to keyframe the index.

Syntax


jsobj.SetImageIndex(value);
value = jsobj.GetImageIndex();


R3INT value = ...;
R3SetAttrs(r3obj, R3MPBMA_ImageIndex, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3MPBMA_ImageIndex, &value, R3TAG_END);

TextureAnimation

Attribute

TextureAnimation

Identifier

R3MPBMA_TextureAnimation

JavaScript type

Integer

C type

R3INT

Description

see animation methods below

Syntax


jsobj.SetTextureAnimation(value);
value = jsobj.GetTextureAnimation();


R3INT value = ...;
R3SetAttrs(r3obj, R3MPBMA_TextureAnimation, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3MPBMA_TextureAnimation, &value, R3TAG_END);

RealName

Attribute

RealName

Identifier

R3MPBMA_RealName

JavaScript type

String

C type

char*

Description

final name decorated with possible anim. index

Syntax


value = jsobj.GetRealName();


char* value;
R3GetAttrs(r3obj, R3MPBMA_RealName, &value, R3TAG_END);

OpenSilently

Attribute

OpenSilently

Identifier

R3MPBMA_OpenSilently

JavaScript type

Boolean

C type

R3BOOL

Description

if true no error messages are given if file not found

Syntax


jsobj.SetOpenSilently(value);
value = jsobj.GetOpenSilently();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3MPBMA_OpenSilently, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3MPBMA_OpenSilently, &value, R3TAG_END);

RenderAlways

Attribute

RenderAlways

Identifier

R3MPBMA_RenderAlways

JavaScript type

Boolean

C type

R3BOOL

Description

if true object is rendered even if the file is not found

Syntax


jsobj.SetRenderAlways(value);
value = jsobj.GetRenderAlways();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3MPBMA_RenderAlways, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3MPBMA_RenderAlways, &value, R3TAG_END);

for backward compatiblity

animation file types

R3MPBMATYPE_UNKNOWN
R3MPBMATYPE_ANIMATIONFILE
R3MPBMATYPE_SEPARATEIMAGES

R3MPBMANIM_NONE
R3MPBMANIM_AUTOMATIC
R3MPBMANIM_KEYFRAME

Format types

R3MPFORMAT_AUTO
R3MPFORMAT_CUSTOM