glscene

 

TGLScene

Page history last edited by skinhat 4 yrs ago

Top level of a scene. Typically created design time from a component from the GLScene palette in the Delphi IDE. At design time its is possible to add objects such as spheres, lights and cameras. A camera defined on a TGLScene can be used by a TGLSceneViewer to display a scene.
The following is a more format description:

The scene contains the scene description (lights, geometry...), which is basicly a hierarchical scene graph made of TGLBaseSceneObject. It will usually contain one or more TGLCamera object, which can be referred by a Viewer component for rendering purposes.

The scene's objects can be accessed directly from Delphi code (as regular components), but those are edited with a specific editor (double-click on the TGLScene component at design-time to invoke it). To add objects at runtime, use the AddNewChild method of TGLBaseSceneObject.

Important properties and methods:

findsceneobject TGLBaseSceneObject: Searches the scene for an object of a specific name.

  For example: FSkydome:=TGLSkydome(glscene.findsceneobject('skydome'));

addsceneobject: Adds an object and runtime to a scene.

  For example: TGLSprite(glscene.AddNewChild(TGLSprite));

Unit: GLScene

Descends from TGLUpdateAbleComponent.

Comments (0)

You don't have permission to comment on this page.