Mattie,
         You might have confused between transform(Vector3f normal) and
transform(Point3f point). For transform(Vector3f normal), the forth element
of the normal is assumed to be zero.

    /**
     * Transforms the normal parameter by this transform and places the value
     * back into normal.  The fourth element of the normal is assumed to be
     * zero.
     * Note: For correct lighting results, if a transform has uneven scaling
     * surface normals should transformed by the inverse transpose of
     * the transform. This the responsibility of the application and is not
     * done automatically by this method.
     * @param normal   the input normal to be transformed
     */
    public final void transform(Vector3f normal)



     /**
     * Transforms the point parameter with this transform and
     * places the result back into point.  The fourth element of the
     * point input paramter is assumed to be one.
     * @param point  the input point to be transformed
     */
    public final void transform(Point3f point)



- Chien Yang
  Java 3D Team.

> Delivered-To: [EMAIL PROTECTED]
> X-Priority: 3 (Normal)
> Mime-Version: 1.0
> Date: Wed, 22 Aug 2001 18:01:05 +0200
> From: matthias sweertvaegher <[EMAIL PROTECTED]>
> Subject: [JAVA3D] bug in Transform3D.transform(Vector3f) ?!
> To: [EMAIL PROTECTED]
>
> hello
>
> I believe I have discovered a bug in the Transform3D class
>
> the documentation says the following about Transform3D.transform(Vector3f) :
> Transforms the point parameter with this transform and places the result back
into point. The fourth element of the point input paramter is assumed to be one.
>
> However when I pass a vector3f to the transform method , the vector stays
(0,0,0)
> My transform works, because when I transform a vector4f initialised to
(0,0,0,1) the vector is correctly transformed
> So I believe the transformmethod doesn't use a w-value=1
> Or am I interpreting the meaning of "....assumed to be one" wrong?
>
> 1) transform of vector3f , pos stays (0,0,0)
>         Vector3f pos = new Vector3f();  //initialises pos to (0,0,0)
>         transform3d.transform(pos);
>
> 2) transform of vector4f , pos is correctly transformed
>         Vector4f pos = new Vector4f(0,0,0,1);
>         transform3d.transform(pos);
>
> regards,
> mattie
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to