|
1 /* |
|
2 * Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: test functions for alfproceduralmesh.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // [INCLUDE FILES] |
|
21 #include <alf/alfproceduralmesh.h> |
|
22 #include <alf/alfmeshvisual.h> |
|
23 |
|
24 #include "testplatalfvisual.h" |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS =============================== |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // CTestPlatAlfVisual::TestProMeshMakeMethodsL |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 TInt CTestPlatAlfVisual::TestProMeshMakeMethodsL( CStifItemParser& /*aItem*/ ) |
|
36 { |
|
37 // Print to UI |
|
38 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
39 _LIT( KTestProMeshMakeMethodsL, "TestProMeshMakeMethodsL" ); |
|
40 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestProMeshMakeMethodsL ); |
|
41 // Print to log file |
|
42 iLog->Log( KTestProMeshMakeMethodsL ); |
|
43 |
|
44 CAlfMeshVisual* meshVisual = CAlfMeshVisual::AddNewL( *iAlfCtl ); |
|
45 meshVisual->CreateMeshL( EAlfMeshTypeProcedural ); |
|
46 CAlfProceduralMesh* proMesh = meshVisual->ProceduralMesh(); |
|
47 STIF_ASSERT_NOT_NULL( proMesh ); |
|
48 proMesh->MakeCubeL( 1, 1, 1, 1 ); |
|
49 proMesh->MakeSphereL( 1, 1, 1 ); |
|
50 proMesh->MakeTorusL( 1, 1, 1, 1, 1 ); |
|
51 |
|
52 return KErrNone; |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CTestPlatAlfVisual::TestProMeshMaterialMethodsL |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 TInt CTestPlatAlfVisual::TestProMeshMaterialMethodsL( CStifItemParser& /*aItem*/ ) |
|
60 { |
|
61 // Print to UI |
|
62 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
63 _LIT( KTestProMeshMaterialMethodsL, "TestProMeshMaterialMethodsL" ); |
|
64 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestProMeshMaterialMethodsL ); |
|
65 // Print to log file |
|
66 iLog->Log( KTestProMeshMaterialMethodsL ); |
|
67 |
|
68 CAlfMeshVisual* meshVisual = CAlfMeshVisual::AddNewL( *iAlfCtl ); |
|
69 meshVisual->CreateMeshL( EAlfMeshTypeProcedural ); |
|
70 CAlfProceduralMesh* proMesh = meshVisual->ProceduralMesh(); |
|
71 STIF_ASSERT_NOT_NULL( proMesh ); |
|
72 TAlfMaterial material = proMesh->Material(); |
|
73 proMesh->SetMaterial( material ); |
|
74 |
|
75 return KErrNone; |
|
76 } |
|
77 |
|
78 |
|
79 // [End of File] |