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 voidDraw(CHuiGc &, const THuiImage *, const THuiImage *, TReal32)
IMPORT_C voidMakeCubeL(TReal32, TReal32, TReal32, TReal32)
IMPORT_C voidMakeSphereL(TReal32, TInt, TInt)
IMPORT_C voidMakeTorusL(TReal32, TReal32, TInt, TInt, TReal32)
IMPORT_C voidReset()
IMPORT_C voidScaleUniformly(TReal32, TReal32, TReal32)
IMPORT_C voidStretchUniformly(TReal32, TReal32, TReal32, TReal32, TReal32, TReal32)
IMPORT_C voidUpdateSurface(TReal32, TReal32)
Protected Member Functions
IMPORT_C voidProceduralMeshExtension(const TUid &, TAny **)
Public Attributes
THuiMaterial iMaterial
Private Attributes
TInt iSpare

Constructor & Destructor Documentation

CHuiProceduralMesh()

IMPORT_CCHuiProceduralMesh()

Default constructor.

~CHuiProceduralMesh()

IMPORT_C~CHuiProceduralMesh()

Destructor.

Member Functions Documentation

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

IMPORT_C voidDraw(CHuiGc &aGc,
const THuiImage *aImage = 0,
const THuiImage *aSecondaryImage = 0,
TReal32aSecondaryAlpha = 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 voidMakeCubeL(TReal32aSizeX,
TReal32aSizeY,
TReal32aSizeZ,
TReal32aEdgeRadius
)[virtual]

Creates a cube mesh.

Parameters

TReal32 aSizeX
TReal32 aSizeY
TReal32 aSizeZ
TReal32 aEdgeRadius

MakeSphereL(TReal32, TInt, TInt)

IMPORT_C voidMakeSphereL(TReal32aRadius,
TIntaColumns,
TIntaRows
)[virtual]

Creates a sphere mesh.

Parameters

TReal32 aRadius
TInt aColumns
TInt aRows

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

IMPORT_C voidMakeTorusL(TReal32aMainRadius,
TReal32aOuterRadius,
TIntaMainSegments,
TIntaOuterSegments,
TReal32aSegmentAngleOffset = 0
)[virtual]

Creates a torus mesh.

Parameters

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

ProceduralMeshExtension(const TUid &, TAny **)

IMPORT_C voidProceduralMeshExtension(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 & aExtensionUidUID, which is being used for recognizing the extension
TAny ** aExtensionParamsReturn pointer to the extension API, once recognized from the extension uid

Reset()

IMPORT_C voidReset()[virtual]

Resets the mesh. All contents are destroyed.

ScaleUniformly(TReal32, TReal32, TReal32)

IMPORT_C voidScaleUniformly(TReal32aX,
TReal32aY,
TReal32aZ
)[virtual]

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

Parameters

TReal32 aXX scaling factor.
TReal32 aYY scaling factor.
TReal32 aZZ scaling factor.

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

IMPORT_C voidStretchUniformly(TReal32aXLimit,
TReal32aXOffset,
TReal32aYLimit,
TReal32aYOffset,
TReal32aZLimit,
TReal32aZOffset
)[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 voidUpdateSurface(TReal32aYaw,
TReal32aPitch
)[virtual]

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

Parameters

TReal32 aYawAngle around object Y axis.
TReal32 aPitchAngle 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