function CreateAdditionalMesh: TCastleScene;
var
Coord: TCoordinateNode;
TexCoord: TTextureCoordinateNode;
IndexedFaceSet: TIndexedFaceSetNode;
BaseTexture: TImageTextureNode;
Material: TPhysicalMaterialNode;
Appearance: TAppearanceNode;
Shape: TShapeNode;
Transform: TTransformNode;
RootNode: TX3DRootNode;
begin
Coord := TCoordinateNode.Create;
Coord.SetPoint([
Vector3(-15.205387, -66.775894, -0.092525),
Vector3(9.317978, -66.775894, -0.092525),
Vector3(-15.205387, -68.674622, -0.092525),
Vector3(9.317978, -68.674622, -0.092525),
Vector3(9.317978, -78.330063, 3.456294),
Vector3(-15.205387, -78.330063, 3.456294),
Vector3(9.317978, -80.814240, 7.241702),
Vector3(-15.205387, -80.814240, 7.241702)
]);
TexCoord := TTextureCoordinateNode.Create;
TexCoord.SetPoint([
Vector2(0.0001, 0.9964),
Vector2(1.0000, 0.9964),
Vector2(1.0000, 0.8541),
Vector2(0.0001, 0.8541),
Vector2(0.0001, 0.7118),
Vector2(1.0000, 0.7118),
Vector2(1.0000, 0.5695),
Vector2(0.0001, 0.5695),
Vector2(0.0001, 0.5695),
Vector2(1.0000, 0.5695),
Vector2(1.0000, 0.4272),
Vector2(0.0001, 0.4272)
]);
IndexedFaceSet := TIndexedFaceSetNode.Create;
IndexedFaceSet.Coord := Coord;
IndexedFaceSet.TexCoord := TexCoord;
IndexedFaceSet.SetTexCoordIndex([0, 1, 2, 3, -1, 4, 5, 6, 7, -1, 8, 9, 10, 11, -1]);
IndexedFaceSet.SetCoordIndex([0, 1, 3, 2, -1, 2, 3, 4, 5, -1, 5, 4, 6, 7, -1]);
IndexedFaceSet.Solid := false;
BaseTexture := TImageTextureNode.Create;
BaseTexture.SetUrl(['castle-data:/textures/tunnel_road.jpg']);
Material := TPhysicalMaterialNode.Create;
Material.BaseTexture := BaseTexture;
Material.BaseColor := Vector3(1, 1, 0);
Appearance := TAppearanceNode.Create;
Appearance.Material := Material;
Shape := TShapeNode.Create;
Shape.Geometry := IndexedFaceSet;
Shape.Appearance := Appearance;
Transform := TTransformNode.Create;
Transform.Translation := Vector3(0, 0, 0);
Transform.Rotation := Vector4(1, 0, 0, -Pi / 2);
Transform.AddChildren(Shape);
RootNode := TX3DRootNode.Create;
RootNode.AddChildren(Transform);
Result := TCastleScene.Create(FreeAtStop);
Result.Load(RootNode, true);
end;