com.jme3.math
クラス Rectangle

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

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

Rectangle defines a finite plane within three dimensional space that is specified via three points (A, B, C). These three points define a triangle with the forth point defining the rectangle ((B + C) - A.

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

コンストラクタの概要
Rectangle()
          Constructor creates a new Rectangle with no defined corners.
Rectangle(Vector3f a, Vector3f b, Vector3f c)
          Constructor creates a new Rectangle with defined A, B, and C points that define the area of the rectangle.
 
メソッドの概要
 Rectangle clone()
           
 Vector3f getA()
          getA returns the first point of the rectangle.
 Vector3f getB()
          getB returns the second point of the rectangle.
 Vector3f getC()
          getC returns the third point of the rectangle.
 Vector3f random()
          random returns a random point within the plane defined by: A, B, C, and (B + C) - A.
 Vector3f random(Vector3f result)
          random returns a random point within the plane defined by: A, B, C, and (B + C) - A.
 void read(JmeImporter e)
           
 void setA(Vector3f a)
          setA sets the first point of the rectangle.
 void setB(Vector3f b)
          setB sets the second point of the rectangle.
 void setC(Vector3f c)
          setC sets the third point of the rectangle.
 void write(JmeExporter e)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Rectangle

public Rectangle()
Constructor creates a new Rectangle with no defined corners. A, B, and C must be set to define a valid rectangle.


Rectangle

public Rectangle(Vector3f a,
                 Vector3f b,
                 Vector3f c)
Constructor creates a new Rectangle with defined A, B, and C points that define the area of the rectangle.

パラメータ:
a - the first corner of the rectangle.
b - the second corner of the rectangle.
c - the third corner of the rectangle.
メソッドの詳細

getA

public Vector3f getA()
getA returns the first point of the rectangle.

戻り値:
the first point of the rectangle.

setA

public void setA(Vector3f a)
setA sets the first point of the rectangle.

パラメータ:
a - the first point of the rectangle.

getB

public Vector3f getB()
getB returns the second point of the rectangle.

戻り値:
the second point of the rectangle.

setB

public void setB(Vector3f b)
setB sets the second point of the rectangle.

パラメータ:
b - the second point of the rectangle.

getC

public Vector3f getC()
getC returns the third point of the rectangle.

戻り値:
the third point of the rectangle.

setC

public void setC(Vector3f c)
setC sets the third point of the rectangle.

パラメータ:
c - the third point of the rectangle.

random

public Vector3f random()
random returns a random point within the plane defined by: A, B, C, and (B + C) - A.

戻り値:
a random point within the rectangle.

random

public Vector3f random(Vector3f result)
random returns a random point within the plane defined by: A, B, C, and (B + C) - A.

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

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 Rectangle clone()
オーバーライド:
クラス java.lang.Object 内の clone