com.jme3.math
クラス Line

java.lang.Object
  上位を拡張 com.jme3.math.Line
すべての実装されたインタフェース:
Savable, java.io.Serializable, java.lang.Cloneable

public class Line
extends java.lang.Object
implements Savable, java.lang.Cloneable, java.io.Serializable

Line defines a line. Where a line is defined as infinite along two points. The two points of the line are defined as the origin and direction.

関連項目:
直列化された形式

コンストラクタの概要
Line()
          Constructor instantiates a new Line object.
Line(Vector3f origin, Vector3f direction)
          Constructor instantiates a new Line object.
 
メソッドの概要
 Line clone()
           
 float distance(Vector3f point)
           
 float distanceSquared(Vector3f point)
           
 Vector3f getDirection()
          getDirection returns the direction of the line.
 Vector3f getOrigin()
          getOrigin returns the origin of the line.
 void orthogonalLineFit(java.nio.FloatBuffer points)
           
 Vector3f random()
          random determines a random point along the line.
 Vector3f random(Vector3f result)
          random determines a random point along the line.
 void read(JmeImporter e)
           
 void setDirection(Vector3f direction)
          setDirection sets the direction of the line.
 void setOrigin(Vector3f origin)
          setOrigin sets the origin of the line.
 void write(JmeExporter e)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Line

public Line()
Constructor instantiates a new Line object. The origin and direction are set to defaults (0,0,0).


Line

public Line(Vector3f origin,
            Vector3f direction)
Constructor instantiates a new Line object. The origin and direction are set via the parameters.

パラメータ:
origin - the origin of the line.
direction - the direction of the line.
メソッドの詳細

getOrigin

public Vector3f getOrigin()
getOrigin returns the origin of the line.

戻り値:
the origin of the line.

setOrigin

public void setOrigin(Vector3f origin)
setOrigin sets the origin of the line.

パラメータ:
origin - the origin of the line.

getDirection

public Vector3f getDirection()
getDirection returns the direction of the line.

戻り値:
the direction of the line.

setDirection

public void setDirection(Vector3f direction)
setDirection sets the direction of the line.

パラメータ:
direction - the direction of the line.

distanceSquared

public float distanceSquared(Vector3f point)

distance

public float distance(Vector3f point)

orthogonalLineFit

public void orthogonalLineFit(java.nio.FloatBuffer points)

random

public Vector3f random()
random determines a random point along the line.

戻り値:
a random point on the line.

random

public Vector3f random(Vector3f result)
random determines a random point along the line.

パラメータ:
result - Vector to store result in
戻り値:
a random point on the line.

write

public void write(JmeExporter e)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

read

public void read(JmeImporter e)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException

clone

public Line clone()
オーバーライド:
クラス java.lang.Object 内の clone