Book Image

Expert Delphi - Second Edition

By : Marco Cantù, Paweł Głowacki
Book Image

Expert Delphi - Second Edition

By: Marco Cantù, Paweł Głowacki

Overview of this book

Master Delphi, the most powerful Object Pascal IDE and versatile component library for cross-platform native app development, by harnessing its capabilities for building natively compiled, blazingly fast apps for all major platforms, including Android, iOS, Windows, Mac, and Linux. Expert Delphi begins with a quick overview of Delphi, helping you get acquainted with the IDE and the Object Pascal language. The book then quickly progresses to more advanced concepts, followed by the architecture of applications and the FireMonkey library, guiding you through building server-side services, parallel programming, and database access. Toward the end, you’ll learn how to integrate your app with various web services and deploy them effectively. By the end of this book, you’ll be adept at building powerful, cross-platform, native apps for iOS, Android, Windows, and macOS—all from a single code base.
Table of Contents (21 chapters)
Free Chapter
1
Part 1: Building Blocks
6
Part 2: Going Mobile
12
Part 3: From Data to Services
19
Index

Ready-to-use 3D objects

In the first part of this chapter, we looked into some of the low-level and direct APIs for building 3D apps in FireMonkey. Now let’s start looking in more detail into the ready-to-use components.

There are different 3D objects that we can use in our Delphi FireMonkey apps, from really simple ones, such as TStrokeCube or TGrid3D, that just render a few lines in 3D space, to more complex components that maintain their own vertex and index buffers for drawing complex geometries with triangles. This is a typical approach for rendering arbitrary geometries in 3D apps such as mobile games and it requires quite a lot of coding.

At the lowest level, all 3D objects inherit from the TControl3D class, which introduces location and transformations in 3D space. This class also adds interactivity to all 3D controls by implementing different mouse events that are translated to touch events on mobile targets. These user events have different parameters that provide...