[x3d-public] ImageTexture width/height_changed
Leonard Daly
Leonard.Daly at realism.com
Sun Dec 2 18:59:40 PST 2018
Hi Holger,
I am not sure that the actual pixel count matters. X3D always uses
fractional positioning. The aspect ratio would matter so images would
not get stretched unnaturally.
Also, I am not sure from your definition how those fields could ever be
set or events generated. The are listed as initialize only, but the
'_changed' suffix implies output.
I think a better field (for 2D stuff) is
SFFloat [out] aspect_changed
or some other suitable field/event name.
The 3D case is trickier because you need to define which axes are being
used to construct the ratio and you would need at least 2 values.
Leonard Daly
> An ImageTexture loads the texture from file and it is currently not
> clear for X3D authors if they load the image from unkown origin, for
> instance from the Internet, or if the url changes dynamically, what
> width/height the texture has.
>
> I suggest to add two new field:
>
> ImageTexture {
> ...
> SFInt32 [] width_changed
> SFInt32 [] height_changed
> }
>
> This follows the same layout as the AudioClip node has with its
> duration_changed field.
>
> For completeness also MovieTexture and ImageTexture3D should have
> these fields.
>
> MovieTexture {
> ...
> SFInt32 [] width_changed
> SFInt32 [] height_changed
> }
>
> ImageTexture3D {
> ...
> SFInt32 [] width_changed
> SFInt32 [] height_changed
> SFInt32 [] depth_changed
> }
>
> Maybe also ImageCubeMapTexture should have such field, which needs to
> be defined.
>
--
*Leonard Daly*
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Past Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20181202/437127eb/attachment.html>
More information about the x3d-public
mailing list