PIECE: door 4x6x1

Some pieces can have only 2 "cardinalities" because are simetric.

DEFINITION:

<MaterialGroup x:Key="doorM">
			<DiffuseMaterial>
				<DiffuseMaterial.Brush>
						<ImageBrush ImageSource="door.png" TileMode="None" ViewportUnits="Absolute" Viewport="0 0 1 1" AlignmentX="Left" AlignmentY="Top" Opacity="1.000000" />
				</DiffuseMaterial.Brush>
			</DiffuseMaterial>
			<SpecularMaterial SpecularPower="29.8667">
				<SpecularMaterial.Brush>
						<SolidColorBrush Color="White" Opacity="1.000000"/>
				</SpecularMaterial.Brush>
			</SpecularMaterial>
		</MaterialGroup>
		<Transform3DGroup x:Key="doorT">
			 
				 
				<ScaleTransform3D ScaleX="0.1"  ScaleY="0.1"  ScaleZ="0.1" />
				<RotateTransform3D>
					<RotateTransform3D.Rotation>
						<AxisAngleRotation3D Angle="0" Axis="0 1 0"/>
					</RotateTransform3D.Rotation>
				</RotateTransform3D>
 
			<TranslateTransform3D Offset="OffsetX="+2"  OffsetY="0" OffsetZ="-0.4"  />
			 
		</Transform3DGroup>
		 
		<MeshGeometry3D x:Key="doorG"
			TriangleIndices="0,1,2 3,4,5 6,7,8 9,10,11 12,13,14 15,16,17 18,19,20 21,22,23 24,25,26 27,28,29 30,31,32 33,34,35 "
			Normals="0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,1,0 0,1,0 0,1,0 0,1,0 0,1,0 0,1,0 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 1,0,0 1,0,0 1,0,0 1,0,0 1,0,0 1,0,0 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 -1,0,0 -1,0,0 -1,0,0 -1,0,0 -1,0,0 -1,0,0 "
			TextureCoordinates="0.6275,0.052459 0.356728,0.052459 0.1275,0.052459 0.1275,0.052459 -0.143272,0.052459 0.6275,0.052459 0.6275,0.947541 -0.143272,0.947541 0.1275,0.947541 0.1275,0.947541 0.356728,0.947541 0.6275,0.947541 0.6275,0.052459 0.856728,0.052459 0.856728,0.947541 0.856728,0.947541 0.6275,0.947541 0.6275,0.052459 -0.143272,0.052459 0.1275,0.052459 0.1275,0.947541 0.1275,0.947541 -0.143272,0.947541 -0.143272,0.052459 0.1275,0.052459 0.356728,0.052459 0.356728,0.947541 0.356728,0.947541 0.1275,0.947541 0.1275,0.052459 0.356728,0.052459 0.6275,0.052459 0.6275,0.947541 0.6275,0.947541 0.356728,0.947541 0.356728,0.052459 "
			Positions="-19.9716,-6.6231e-016,2.98278 -19.9716,6.6231e-016,-2.98278 19.9716,6.6231e-016,-2.98278 19.9716,6.6231e-016,-2.98278 19.9716,-6.6231e-016,2.98278 -19.9716,-6.6231e-016,2.98278 -19.9716,59.6555,2.98278 19.9716,59.6555,2.98278 19.9716,59.6555,-2.98278 19.9716,59.6555,-2.98278 -19.9716,59.6555,-2.98278 -19.9716,59.6555,2.98278 -19.9716,-6.6231e-016,2.98278 19.9716,-6.6231e-016,2.98278 19.9716,59.6555,2.98278 19.9716,59.6555,2.98278 -19.9716,59.6555,2.98278 -19.9716,-6.6231e-016,2.98278 19.9716,-6.6231e-016,2.98278 19.9716,6.6231e-016,-2.98278 19.9716,59.6555,-2.98278 19.9716,59.6555,-2.98278 19.9716,59.6555,2.98278 19.9716,-6.6231e-016,2.98278 19.9716,6.6231e-016,-2.98278 -19.9716,6.6231e-016,-2.98278 -19.9716,59.6555,-2.98278 -19.9716,59.6555,-2.98278 19.9716,59.6555,-2.98278 19.9716,6.6231e-016,-2.98278 -19.9716,6.6231e-016,-2.98278 -19.9716,-6.6231e-016,2.98278 -19.9716,59.6555,2.98278 -19.9716,59.6555,2.98278 -19.9716,59.6555,-2.98278 -19.9716,6.6231e-016,-2.98278 " />

The texture of the piece (right-click the image to download), can be changed (remember to recompile). Important to note that it is inverted and deformed:

REMEMBER: to include the texture file in the .CSPROJ.


PREVIOUS LESSON NEXT LESSON
T.CONTENTS HOMEPAGE