Re: [Crystal-cvs] SF.net SVN: crystal:[39466] CS/trunk/include/csutil/variant.h

res <[email protected]> Wed, 17 Jul 2013 00:13:15 +0200
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <[email protected]>
On 09.07.2013 15:21, Christian Van Brussel wrote:
> About the 32/64 bits inconsistency, maybe we can introduce the explicit
> types CSVAR_INT32 and CSVAR_INT64? Maybe also CSVAR_UINT32 and
> CSVAR_UINT64? And we would deprecate CSVAR_LONG?

Yeah, using explicit bit sizes sounds better.

> Yes, quaternions are somehow limited to rotations only, and the comment
> was actually about that question: "would we limit the 3x3 matrices
> parameters to rotations only?"

Ah, okay.

> A posteriori, I would say that a type for 3x3 matrices can be
> interesting, and that we can either add another type for quaternions or
> add utility methods to convert from a CSVAR_VECTOR4 to a quaternion.

So “it's a quaternion” could be seen as a semantic?
csVariant is probably not the right place for storing that…

> Here the question was whether or not limiting transforms to be
> orthogonal. Most transforms in a rendering engine are a priori
> orthogonal, but non-orthogonal transforms may also be interesting in
> some specific contexts.

Hm. Semantics again?

AFAIK you're using csVariant for editor purposes. So… is there a
mechanic to specify a semantic for some variant value in the editor?

If there is, I would think the approach is to store the “most generic”
type in a csVariant and have the semantics handled in another layer on top.

Then again, sometimes it's rather cumbersome to go from a generic to a
special representation – case in point, extracting rotation from a
matrix. So some less-than-generic types (eg orthogonal transforms) look
rather practical to have.

-f.r.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

_______________________________________________
Crystal-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-develop
signature.asc (application/pgp-signature, 263 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlHlxXsACgkQNCTzcE/07exqzACfeBdpVIfQ3aGwfiBN2m0+TO/a
wYgAnRjk06gsaGbmKqfyNkvDAs1J7R9J
=TNGv
-----END PGP SIGNATURE-----