FMX.GUI3d Sample

From RAD Studio Code Examples
Jump to: navigation, search

This sample is a demonstration of how to build 3D Graphical User Interface (GUI) applications.

Location

You can find the GUI3d sample project at:

Description

The GUI3d sample demonstrates how to build 3D GUI applications. The sample uses a 3D layer that holds a 2D button. The button, which has a TGlow effect attached, enables a float animation.

How to Use the Sample

  1. Navigate to the location given above and open GUI3dCPP.cbproj.
  2. Select the target platform.
  3. Press F9 or choose Run > Run.
  4. Interact with the sample: left-click on the button labeled as Flip to activate the animation.

Files

File in C++ Contains

GUI3dCPP.cbproj

The project itself.

Unit1.fmx

The main form where the components are located.

GUI3dCPPCH.h, Unit1.cpp

Used to define and implement the sample.

Classes

TForm3D1 is the main form that represents the main window of the sample. It contains the following components:

Implementation

When you run the application, you see a button labeled as Flip. The button has a glow effect attached with the GlowColor property set to Gold. When you click on the button, an OnClick event occurs. The OnClick event animates the 3D layer. The sample uses the AnimateFloat and AnimateFloatDelay methods of the TFmxObject class to define three different animations for the 3D Layer object.

Uses

See Also

Samples