Hello!
castle-engine\src\images\castleimages.pas
acSimpleYesNo = acBlending deprecated 'use acTest';
wrong value?
Actually there was a number of comments-obly typos that i already forgot. But this one seems to hatch into the code and made me log into the forum Those were mistakes like a letter missed or changed or inserted into some ID. Perhaps one could make word statistics gatherer for CGE sources, stupir words counter with matcher for words used <= 5 times. If it is ever worth it…
https://castle-engine.io/x3d_implementation_geometry2d.php#section_example_pascal
Supported nodes
Missed TTriangleFanNode
, also no link to TLineSetNode
, also no example of setting coords to Triangles-based nodes.
The OutlineGeometry.Coord := OutlineCoords;
from the example won’t work on them. Hopefully would TriangleSetNode.CoordField.Value := OutlineCoords;
- but it takes some time to find it in sources.
For some hopefully simple yet realistic possible example.
function DiagShape(const Source: RAnglesDiagram; const baseZ: single;
clOutline, clInner: TCastleColor;
const AlphaOutline: single = 1;
const AlphaInner: single = 0.5): TX3DRootNode;
I want to render a rotatable sensor, with RAnglesDiagram
basically being an array of {angle, radius} pairs and an interpolation method. In the end i want a rotating polar-coord chart with translucent inner filling and opaque or less translucent outline.
Here is it rendered with usual LCL TImage for example, not translucent, not rotatable and not having other objects in the scene
I am NOT asking to implement it, just maybe giving you a good idea for a demo/tutorial, maybe not.
In general, that example created to demonstrate 2D uses almost exclusively 3D nodes. Basically twi chapters of the page deny one another.
Could’ve showcase TAppearanceNode
and TUnlitMaterialNode
.
Also, space missed in //Scene.Rotation :=
in WindowUpdate
In general, most nodes like triangles have a “mirror class” - Txxxx and TIndexedXXX - and your demos seem to prefer the latter. It is somewhat confusing, would be good if the intended difference between those would be outlined somewhere. Why there should be both, what are usecases favoring one or another.
Also, maybe it is personal, when i read through tutorials i always feel myself shaky, as there is no mention of memory/object ownership. Tutorials seem to be of “create and keep until program exit” type. Some tutorials of “delete and recreate” kind would feel nice ro have, perhaps.