Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
0.8.4:primitives [2022/06/16 15:35] – [TGorillaCapsule] admin | 0.8.4:primitives [2022/07/22 12:55] (current) – [TGorillaModel] admin | ||
---|---|---|---|
Line 249: | Line 249: | ||
{{: | {{: | ||
+ | |||
+ | <file pascal> | ||
+ | uses | ||
+ | Gorilla.Torus; | ||
+ | | ||
+ | [...] | ||
+ | |||
+ | begin | ||
+ | FTorus := TGorillaTorus.Create(GorillaViewport1); | ||
+ | FTorus.Parent := GorillaViewport1; | ||
+ | | ||
+ | FTorus.Radius1 := 1; | ||
+ | FTorus.Radius2 := 0.3; | ||
+ | | ||
+ | {$IFDEF MSWINDOWS} | ||
+ | /// create a very detailled torus. | ||
+ | FTorus.RadSegments := 128; | ||
+ | FTorus.Sides := 128; | ||
+ | {$ELSE} | ||
+ | /// on Android platform number of vertices is limited to 32K. | ||
+ | FTorus.RadSegments := 24; | ||
+ | FTorus.Sides := 18; | ||
+ | {$ENDIF} | ||
+ | | ||
+ | /// make it larger | ||
+ | FTorus.SetSize(2, | ||
+ | | ||
+ | /// to forbid mouse interaction | ||
+ | FTorus.SetHitTestValue(false); | ||
+ | end; | ||
+ | </ | ||
+ | |||
+ | ==== TGorillaGrid ==== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | <file pascal> | ||
+ | uses | ||
+ | Gorilla.Grid; | ||
+ | | ||
+ | [...] | ||
+ | |||
+ | begin | ||
+ | FGrid := TGorillaGrid.Create(GorillaViewport1); | ||
+ | FGrid.Parent := GorillaViewport1; | ||
+ | | ||
+ | /// make it larger | ||
+ | FGrid.SetSize(10, | ||
+ | | ||
+ | /// pre configure grid, othwise nothing will be rendered | ||
+ | FGrid.DefaultLines := 16; | ||
+ | FGrid.Frequency := 0.25; | ||
+ | FGrid.Marks := 0.5; | ||
+ | FGrid.LineColor := TAlphaColorRec.Cornflowerblue; | ||
+ | end; | ||
+ | </ | ||
+ | |||
+ | |||
==== TGorillaGrid3D ==== | ==== TGorillaGrid3D ==== | ||
+ | |||
+ | The Grid3D component is a container holding 3 instances of TGorillaGrid for each 3D axis: GridX, GridY and GridZ. | ||
{{: | {{: | ||
+ | |||
+ | <file pascal> | ||
+ | uses | ||
+ | Gorilla.Grid; | ||
+ | | ||
+ | [...] | ||
+ | |||
+ | begin | ||
+ | FGrid3D := TGorillaGrid3D.Create(GorillaViewport1); | ||
+ | FGrid3D.Parent := GorillaViewport1; | ||
+ | | ||
+ | /// make it larger | ||
+ | FGrid3D.SetSize(10, | ||
+ | | ||
+ | /// to modify each grid inside of the container use GridX, GridY or GridZ property | ||
+ | FGrid3D.GridX.DefaultLines := 16; | ||
+ | FGrid3D.GridX.Frequency := 1.5; | ||
+ | FGrid3D.GridX.Marks := 2.5; | ||
+ | FGrid3D.GridX.LineColor := TAlphaColorRec.Cornflowerblue; | ||
+ | end; | ||
+ | </ | ||
+ | |||
==== TGorillaModel ==== | ==== TGorillaModel ==== | ||
Line 259: | Line 341: | ||
For detailled reading on loading models, please have a closer look [[models|here]]. | For detailled reading on loading models, please have a closer look [[models|here]]. | ||
- | Next step:: [[terrain|Terrain]] | + | Next step: [[cameras|Cameras]] |