com.jme3.math
クラス Triangle

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

public class Triangle
extends AbstractTriangle
implements Savable, java.io.Serializable

Triangle defines a object for containing triangle information. The triangle is defined by a collection of three Vector3f objects.

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

コンストラクタの概要
Triangle()
           
Triangle(Vector3f p1, Vector3f p2, Vector3f p3)
          Constructor instantiates a new Triangle object with the supplied vectors as the points.
 
メソッドの概要
 void calculateCenter()
          calculateCenter finds the average point of the triangle.
 void calculateNormal()
          calculateCenter finds the average point of the triangle.
 Triangle clone()
           
static Vector3f computeTriangleNormal(Vector3f v1, Vector3f v2, Vector3f v3, Vector3f store)
           
 Vector3f get(int i)
          get retrieves a point on the triangle denoted by the index supplied.
 Vector3f get1()
           
 Vector3f get2()
           
 Vector3f get3()
           
 Vector3f getCenter()
          obtains the center point of this triangle (average of the three triangles)
 int getIndex()
          obtains an index that this triangle represents if it is contained in a OBBTree.
 Vector3f getNormal()
          obtains the unit length normal vector of this triangle, if set or calculated
 float getProjection()
          obtains the projection of the vertices relative to the line origin.
 void read(JmeImporter e)
           
 void set(int i, float x, float y, float z)
          set sets one of the triangles points to that specified as a parameter.
 void set(int i, Vector3f point)
          set sets one of the triangles points to that specified as a parameter.
 void set(Vector3f v1, Vector3f v2, Vector3f v3)
           
 void set1(Vector3f v)
           
 void set2(Vector3f v)
           
 void set3(Vector3f v)
           
 void setCenter(Vector3f center)
          sets the center point of this triangle (average of the three triangles)
 void setIndex(int index)
          sets an index that this triangle represents if it is contained in a OBBTree.
 void setNormal(Vector3f normal)
          sets the normal vector of this triangle (to conform, must be unit length)
 void setProjection(float projection)
          sets the projection of the vertices relative to the line origin.
 void write(JmeExporter e)
           
 
クラス com.jme3.math.AbstractTriangle から継承されたメソッド
collideWith
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Triangle

public Triangle()

Triangle

public Triangle(Vector3f p1,
                Vector3f p2,
                Vector3f p3)
Constructor instantiates a new Triangle object with the supplied vectors as the points. It is recommended that the vertices be supplied in a counter clockwise winding to support normals for a right handed coordinate system.

パラメータ:
p1 - the first point of the triangle.
p2 - the second point of the triangle.
p3 - the third point of the triangle.
メソッドの詳細

get

public Vector3f get(int i)
get retrieves a point on the triangle denoted by the index supplied.

パラメータ:
i - the index of the point.
戻り値:
the point.

get1

public Vector3f get1()
定義:
クラス AbstractTriangle 内の get1

get2

public Vector3f get2()
定義:
クラス AbstractTriangle 内の get2

get3

public Vector3f get3()
定義:
クラス AbstractTriangle 内の get3

set

public void set(int i,
                Vector3f point)
set sets one of the triangles points to that specified as a parameter.

パラメータ:
i - the index to place the point.
point - the point to set.

set

public void set(int i,
                float x,
                float y,
                float z)
set sets one of the triangles points to that specified as a parameter.

パラメータ:
i - the index to place the point.

set1

public void set1(Vector3f v)

set2

public void set2(Vector3f v)

set3

public void set3(Vector3f v)

set

public void set(Vector3f v1,
                Vector3f v2,
                Vector3f v3)
定義:
クラス AbstractTriangle 内の set

calculateCenter

public void calculateCenter()
calculateCenter finds the average point of the triangle.


calculateNormal

public void calculateNormal()
calculateCenter finds the average point of the triangle.


getCenter

public Vector3f getCenter()
obtains the center point of this triangle (average of the three triangles)

戻り値:
the center point.

setCenter

public void setCenter(Vector3f center)
sets the center point of this triangle (average of the three triangles)

パラメータ:
center - the center point.

getNormal

public Vector3f getNormal()
obtains the unit length normal vector of this triangle, if set or calculated

戻り値:
the normal vector

setNormal

public void setNormal(Vector3f normal)
sets the normal vector of this triangle (to conform, must be unit length)

パラメータ:
normal - the normal vector.

getProjection

public float getProjection()
obtains the projection of the vertices relative to the line origin.

戻り値:
the projection of the triangle.

setProjection

public void setProjection(float projection)
sets the projection of the vertices relative to the line origin.

パラメータ:
projection - the projection of the triangle.

getIndex

public int getIndex()
obtains an index that this triangle represents if it is contained in a OBBTree.

戻り値:
the index in an OBBtree

setIndex

public void setIndex(int index)
sets an index that this triangle represents if it is contained in a OBBTree.

パラメータ:
index - the index in an OBBtree

computeTriangleNormal

public static Vector3f computeTriangleNormal(Vector3f v1,
                                             Vector3f v2,
                                             Vector3f v3,
                                             Vector3f store)

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