CHuiM3GMesh Class Reference

class CHuiM3GMesh

CHuiM3GMesh is a 3D mesh that can be used in Hitchcock UI Toolkit to incorporate M3G (Mobile 3D Graphics) objects into the user interface.

Constructor & Destructor Documentation

CHuiM3GMesh()

IMPORT_C CHuiM3GMesh ( )

Default constructor.

~CHuiM3GMesh()

IMPORT_C ~CHuiM3GMesh ( ) [virtual]

Destructor.

Member Functions Documentation

AnimateControllers()

IMPORT_C void AnimateControllers ( ) [virtual]

Goes through animation controllers and does animations.

AnimationControllerCount()

IMPORT_C TInt AnimationControllerCount ( ) const [virtual]

Returns number of (hitchcock) animation controllers

ConstructL()

IMPORT_C void ConstructL ( ) [protected, virtual]

2nd phase constructor.

DoLoadSceneL(const TDesC &, M3GInterface)

void DoLoadSceneL ( const TDesC & aFileName,
M3GInterface aInterface
) [private]

Execute the actual scene graph loading.

Parameters

const TDesC & aFileName
M3GInterface aInterface

Draw(CHuiGc &, const THuiImage *, const THuiImage *, TReal32)

IMPORT_C void Draw ( CHuiGc & aGc,
const THuiImage * aImage = 0,
const THuiImage * aSecondaryImage = 0,
TReal32 aSecondaryAlpha = 0.0
) const [virtual]

Draws the loaded M3G scene.

Parameters

CHuiGc & aGc
const THuiImage * aImage = 0
const THuiImage * aSecondaryImage = 0
TReal32 aSecondaryAlpha = 0.0

FindObjectCenter(M3GGroup, TReal32, TBool)

void FindObjectCenter ( M3GGroup aGroup,
TReal32 aTrans,
TBool aFirst = ETrue
) [private]

Finds the center point of the groups objects. Goes the groups inside the group recursively.

Parameters

M3GGroup aGroup group thats center position is needed
TReal32 aTrans translation values to be returned
TBool aFirst = ETrue indicates if aTrans has been initiliazed

LoadSceneL(const TDesC &)

IMPORT_C void LoadSceneL ( const TDesC & aFileName ) [virtual]

Loads an M3G scene graph from an M3G file. The M3G mesh scene graph is loaded from the file given as a parameter. If the filename string is malformed and does not adhere to file path syntax this method leaves with KErrBadName error code. If the file path is not found this method leaves with KErrPathNotFound error code. If the specified file is not found this method leaves with KErrNotFound error code. If the M3G file does not contain any M3G objects or is corrupted this method leaves with KErrCorrupt error code. If this method leaves the whole scene graph content is released. This means that no partial scene graph content can be accessed through this object.

CHuiTextureManager::ImagePath() .

Parameters

const TDesC & aFileName Path to the M3G file from which the M3G scene graph is loaded into this M3G mesh. The texture image path is prepended to this resource file name.

LoadSceneL(const TDesC &, M3GInterface)

IMPORT_C void LoadSceneL ( const TDesC & aFileName,
M3GInterface aInterface
) [protected]

Load scene with m3g interface parameter

Parameters

const TDesC & aFileName
M3GInterface aInterface

M3GMeshExtension(const TUid &, TAny **)

IMPORT_C void M3GMeshExtension ( const TUid & aExtensionUid,
TAny ** aExtensionParams
) [protected, virtual]

Provides expandability, helps keeping the binary compatibility. Since virtual table is now exported and this class is dll derivable and the implementation is more difficult to change, hence this method, which can provide additional extension APIs.

Parameters

const TUid & aExtensionUid UID, which is being used for recognizing the extension
TAny ** aExtensionParams Return pointer to the extension API, once recognized from the extension uid

PopulateAnimationControllerArrayL(const M3GObject)

void PopulateAnimationControllerArrayL ( const M3GObject aObject ) [private]

Populates the iControllers array with animation controllers found from below given object in the M3G object net.

Parameters

const M3GObject aObject

ReleaseScene()

IMPORT_C void ReleaseScene ( ) [protected, virtual]

Will release the loaded scene.

RestoreCamera()

IMPORT_C void RestoreCamera ( ) [virtual]

Restore camera transformations of the M3G world.

RotateObjects(TReal32, TReal32, TReal32, TReal32)

void RotateObjects ( TReal32 aAngle,
TReal32 aAxisX,
TReal32 aAxisY,
TReal32 aAxisZ
) [private]

Parameters

TReal32 aAngle
TReal32 aAxisX
TReal32 aAxisY
TReal32 aAxisZ

RotatePitch(TReal32)

IMPORT_C void RotatePitch ( TReal32 aAngle ) [virtual]

Rotate world around X axis.

Parameters

TReal32 aAngle

RotateYaw(TReal32)

IMPORT_C void RotateYaw ( TReal32 aAngle ) [virtual]

Rotate world around Y axis.

Parameters

TReal32 aAngle

SetAnimationPosition(TInt, TReal32, TInt)

IMPORT_C void SetAnimationPosition ( TInt aControllerId,
TReal32 aTarget,
TInt aTime
) [virtual]

Set position of animation in animation controller.

Parameters

TInt aControllerId ID of the controller.
TReal32 aTarget Target position in the timeline (seconds)
TInt aTime Time to be used in animation

SetViewportRect(const THuiRealRect &)

IMPORT_C void SetViewportRect ( const THuiRealRect & aRect ) [virtual]

Set viewport of the m3g mesh.

Parameters

const THuiRealRect & aRect

StartAnimationController(TInt)

IMPORT_C void StartAnimationController ( TInt aControllerId ) [virtual]

Start animation of the controller

Parameters

TInt aControllerId ID of the animation controller.

StopAnimationController(TInt)

IMPORT_C void StopAnimationController ( TInt aControllerId ) [virtual]

Stop animation of the controller

Parameters

TInt aControllerId ID of the animation controller.

StoreCamera()

IMPORT_C void StoreCamera ( ) [virtual]

Store camera transformations of the M3G world so those can be restored later on and this way animations doesn't mess with camera manipulations.

Member Data Documentation

TReal32 iCamRotation

TReal32 iCamRotation [protected]

TReal32 iCamTranslation

TReal32 iCamTranslation [protected]

M3GCamera iCamera

M3GCamera iCamera [protected]

RArray< THuiM3GMeshAnimationController > iControllers

RArray < THuiM3GMeshAnimationController > iControllers [protected]

TInt iNumObjects

TInt iNumObjects [protected]

M3GObject * iObjects

M3GObject * iObjects [protected]

TInt iSpare

TInt iSpare [protected]

Spare member to help keeping binary compatibility, since HuiM3GMesh is now dll derivable

TBool iUpdateCamera

TBool iUpdateCamera [protected]

THuiRealRect iViewportRect

THuiRealRect iViewportRect [protected]

M3GWorld iWorld

M3GWorld iWorld [protected]