CHuiProceduralMesh Class Reference

class CHuiProceduralMesh

CHuiProceduralMesh is the base class for renderer-specific implementations of 3D triangle meshes. It also defines the public interface that applications can use to manipulate meshes. It is possible to instantiate CHuiProceduralMesh itself, but the resulting mesh instance will have no functionality.

Public Member Functions
CHuiProceduralMesh ()
~CHuiProceduralMesh ()
IMPORT_C void Draw ( CHuiGc &, const THuiImage *, const THuiImage *, TReal32 )
IMPORT_C void MakeCubeL ( TReal32 , TReal32 , TReal32 , TReal32 )
IMPORT_C void MakeSphereL ( TReal32 , TInt , TInt )
IMPORT_C void MakeTorusL ( TReal32 , TReal32 , TInt , TInt , TReal32 )
IMPORT_C void Reset ()
IMPORT_C void ScaleUniformly ( TReal32 , TReal32 , TReal32 )
IMPORT_C void StretchUniformly ( TReal32 , TReal32 , TReal32 , TReal32 , TReal32 , TReal32 )
IMPORT_C void UpdateSurface ( TReal32 , TReal32 )
Protected Member Functions
IMPORT_C void ProceduralMeshExtension (const TUid &, TAny **)
Public Attributes
THuiMaterial iMaterial
Private Attributes
TInt iSpare

Constructor & Destructor Documentation

CHuiProceduralMesh()

IMPORT_C CHuiProceduralMesh ( )

Default constructor.

~CHuiProceduralMesh()

IMPORT_C ~CHuiProceduralMesh ( )

Destructor.

Member Functions Documentation

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]

Draw the mesh.

Parameters

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

MakeCubeL(TReal32, TReal32, TReal32, TReal32)

IMPORT_C void MakeCubeL ( TReal32 aSizeX,
TReal32 aSizeY,
TReal32 aSizeZ,
TReal32 aEdgeRadius
) [virtual]

Creates a cube mesh.

Parameters

TReal32 aSizeX
TReal32 aSizeY
TReal32 aSizeZ
TReal32 aEdgeRadius

MakeSphereL(TReal32, TInt, TInt)

IMPORT_C void MakeSphereL ( TReal32 aRadius,
TInt aColumns,
TInt aRows
) [virtual]

Creates a sphere mesh.

Parameters

TReal32 aRadius
TInt aColumns
TInt aRows

MakeTorusL(TReal32, TReal32, TInt, TInt, TReal32)

IMPORT_C void MakeTorusL ( TReal32 aMainRadius,
TReal32 aOuterRadius,
TInt aMainSegments,
TInt aOuterSegments,
TReal32 aSegmentAngleOffset = 0
) [virtual]

Creates a torus mesh.

Parameters

TReal32 aMainRadius
TReal32 aOuterRadius
TInt aMainSegments
TInt aOuterSegments
TReal32 aSegmentAngleOffset = 0

ProceduralMeshExtension(const TUid &, TAny **)

IMPORT_C void ProceduralMeshExtension ( 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

Reset()

IMPORT_C void Reset ( ) [virtual]

Resets the mesh. All contents are destroyed.

ScaleUniformly(TReal32, TReal32, TReal32)

IMPORT_C void ScaleUniformly ( TReal32 aX,
TReal32 aY,
TReal32 aZ
) [virtual]

Scale the mesh uniformly along each axis. Normals are also scaled and renormalized.

Parameters

TReal32 aX X scaling factor.
TReal32 aY Y scaling factor.
TReal32 aZ Z scaling factor.

StretchUniformly(TReal32, TReal32, TReal32, TReal32, TReal32, TReal32)

IMPORT_C void StretchUniformly ( TReal32 aXLimit,
TReal32 aXOffset,
TReal32 aYLimit,
TReal32 aYOffset,
TReal32 aZLimit,
TReal32 aZOffset
) [virtual]

Stretch the mesh uniformly along the X, Y, and Z axes. Negative side of each axis is offseted negatively. Positive side of each side is offseted positively. Normals are not affected.

Parameters

TReal32 aXLimit
TReal32 aXOffset
TReal32 aYLimit
TReal32 aYOffset
TReal32 aZLimit
TReal32 aZOffset

UpdateSurface(TReal32, TReal32)

IMPORT_C void UpdateSurface ( TReal32 aYaw,
TReal32 aPitch
) [virtual]

Updates the surface material of the mesh. Generate new texture coordinates based on the angles.

Parameters

TReal32 aYaw Angle around object Y axis.
TReal32 aPitch Angle around object X axis.

Member Data Documentation

THuiMaterial iMaterial

THuiMaterial iMaterial

Appearance properties.

TInt iSpare

TInt iSpare [private]

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