BenQ Mobile

javax.microedition.m3g
Class RayIntersection

java.lang.Object
  extended byjavax.microedition.m3g.RayIntersection

public class RayIntersection
extends java.lang.Object

A RayIntersection object is filled in by the pick methods in Group. RayIntersection stores a reference to the intersected Mesh or Sprite3D and information about the intersection point. RayIntersection is strictly a run-time object; it cannot be loaded from a file by Loader.


Constructor Summary
RayIntersection()
          Constructs a new RayIntersection object with default values.
 
Method Summary
 float getDistance()
          Retrieves the distance from the pick ray origin to the intersection point.
 Node getIntersected()
          Retrieves the picked Mesh or Sprite3D object.
 float getNormalX()
          Retrieves the X component of the surface normal at the intersection point.
 float getNormalY()
          Retrieves the Y component of the surface normal at the intersection point.
 float getNormalZ()
          Retrieves the Z component of the surface normal at the intersection point.
 void getRay(float[] ray)
          Retrieves the origin (ox oy oz) and direction (dx dy dz) of the pick ray, in that order.
 int getSubmeshIndex()
          Retrieves the index of the submesh where the intersection point is located within the intersected Mesh.
 float getTextureS(int index)
          Retrieves the S texture coordinate at the intersection point on the picked Mesh or Sprite3D.
 float getTextureT(int index)
          Retrieves the T texture coordinate at the intersection point on the picked Mesh or Sprite3D.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RayIntersection

public RayIntersection()
Constructs a new RayIntersection object with default values.

Method Detail

getIntersected

public Node getIntersected()
Retrieves the picked Mesh or Sprite3D object.


getRay

public void getRay(float[] ray)
Retrieves the origin (ox oy oz) and direction (dx dy dz) of the pick ray, in that order.


getDistance

public float getDistance()
Retrieves the distance from the pick ray origin to the intersection point.


getSubmeshIndex

public int getSubmeshIndex()
Retrieves the index of the submesh where the intersection point is located within the intersected Mesh.


getTextureS

public float getTextureS(int index)
Retrieves the S texture coordinate at the intersection point on the picked Mesh or Sprite3D.


getTextureT

public float getTextureT(int index)
Retrieves the T texture coordinate at the intersection point on the picked Mesh or Sprite3D.


getNormalX

public float getNormalX()
Retrieves the X component of the surface normal at the intersection point.


getNormalY

public float getNormalY()
Retrieves the Y component of the surface normal at the intersection point.


getNormalZ

public float getNormalZ()
Retrieves the Z component of the surface normal at the intersection point.


BenQ Mobile

Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner.
All Rights Reserved.
BenQ Corp. is a trademark licensee of Siemens AG.


For further information about Mobility Toolkit (MTK) visit our Developer Portal.