Re: [orx-dev] Vectors should be constructed from sections.

5 views
Skip to first unread message

Enis BAYRAMOĞLU

unread,
Oct 4, 2015, 11:55:31 PM10/4/15
to orx...@googlegroups.com

I have another tiny config proposal; you're allowed to use sections as config:

[MyObject]
Position = SomeVector

[SomeVector]
x = 0
y = 30
z = -0.1

The benefit is that section-driven vectors can make use of all the nice config features like inheritance and field references.

orx-project

unread,
Oct 5, 2015, 12:46:50 AM10/5/15
to orx...@googlegroups.com
I'm not a big fan of this one, it makes a special case of vectors, compared to other native types handled in config. Also one would then need to handle not only x, y and z but also r, g, b, rho, theta and phi, which would complexify the whole thing to handled them in a general manner.

If you really need to use inheritance for vectors in some situations, a wrapper on the user side for, say, only x, y and z, should be rather straightforward to do.


--
You received this message because you are subscribed to the Google Groups "orx-dev" group.
To post to this group, send email to orx...@googlegroups.com.
Visit this group at http://groups.google.com/group/orx-dev.

Enis BAYRAMOĞLU

unread,
Oct 5, 2015, 12:57:12 AM10/5/15
to orx...@googlegroups.com
Fair enough, it was just a proposal to solve the vector element referencing problem.

orx-project

unread,
Oct 5, 2015, 1:02:26 AM10/5/15
to orx...@googlegroups.com
If we go with your proposal of the command value (which I like even if I have replied to it yet), it should cover this case as well. Maybe an helper command/alias could be added to make things more concise.

Enis BAYRAMOĞLU

unread,
Oct 5, 2015, 1:04:31 AM10/5/15
to orx...@googlegroups.com
Sure, that proposal would make this obsolete. You could even use that to effectively achieve this via user code.
Reply all
Reply to author
Forward
0 new messages