I would like to be able to attach some extra data, ideally in the form of a stringlist, to a range of GLobjects (planes, heightfields, spheres, etc.). Is there some straightforward way of doing this in GLScene that does not involve writing new classes for everything?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You simply add a new field Stings: TStringList to base object TGLBaseSceneObject.
Remember to add it to Assign method.
If you use it only via code (not IDE designer) you can leave the original GLS.Scene.pas in libarry sources, copy the file in your project folder, add new property Strings to TGLBaseSceneObject end add property, Assign, etc and add the GLS.Scene in your project sources.
In this way you don't touch original source code but your project will use a "fucked" code sources with new Strings property to any glscene object.
For eg. I've added to any object to have customized axis references.
Natively ShowAxes show always lines for X/Y/Z versors but In may case I want to draw only X or Y or Z or XY or XZ, etc.
I've copied GLS.Scene.pas from library in project sources and added it to project.
Made the changes (specific only for this project) so I can programmatically change what ShowAxes does leaving untouched other projects behaviour.
Check code with { == SID BEG == } and { == SID END == }
Hi Shine World,
Sorry for the slow aknowlegement, stuff happened... Anyway, thanks for the info, I think that will certainly get me on the right track.
D
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to be able to attach some extra data, ideally in the form of a stringlist, to a range of GLobjects (planes, heightfields, spheres, etc.). Is there some straightforward way of doing this in GLScene that does not involve writing new classes for everything?
You simply add a new field Stings: TStringList to base object TGLBaseSceneObject.
Remember to add it to Assign method.
If you use it only via code (not IDE designer) you can leave the original GLS.Scene.pas in libarry sources, copy the file in your project folder, add new property Strings to TGLBaseSceneObject end add property, Assign, etc and add the GLS.Scene in your project sources.
In this way you don't touch original source code but your project will use a "fucked" code sources with new Strings property to any glscene object.
For eg. I've added to any object to have customized axis references.
Natively ShowAxes show always lines for X/Y/Z versors but In may case I want to draw only X or Y or Z or XY or XZ, etc.
I've copied GLS.Scene.pas from library in project sources and added it to project.
Made the changes (specific only for this project) so I can programmatically change what ShowAxes does leaving untouched other projects behaviour.
Check code with { == SID BEG == } and { == SID END == }
To add a new property is very close to that.
Last edit: shine world 2023-05-20
Hi Shine World,
Sorry for the slow aknowlegement, stuff happened... Anyway, thanks for the info, I think that will certainly get me on the right track.
D