|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.jme3.math.LineSegment
public class LineSegment
LineSegment represents a segment in the space. This is a portion of a Line that has a limited start and end points.
A LineSegment is defined by an origin, a direction and an extent (or length). Direction should be a normalized vector. It is not internally normalized.
This class provides methods to calculate distances between LineSegments, Rays and Vectors.
It is also possible to retrieve both end points of the segment getPositiveEnd(Vector3f)
and getNegativeEnd(Vector3f)
. There are also methods to check whether
a point is within the segment bounds.
Ray
,
直列化された形式コンストラクタの概要 | |
---|---|
LineSegment()
|
|
LineSegment(LineSegment ls)
|
|
LineSegment(Vector3f start,
Vector3f end)
Creates a new LineSegment with a given origin and end. |
|
LineSegment(Vector3f origin,
Vector3f direction,
float extent)
Creates a new LineSegment with the given origin, direction and extent. |
メソッドの概要 | |
---|---|
LineSegment |
clone()
|
float |
distance(LineSegment ls)
|
float |
distance(Ray r)
|
float |
distance(Vector3f point)
|
float |
distanceSquared(LineSegment test)
|
float |
distanceSquared(Ray r)
|
float |
distanceSquared(Vector3f point)
|
Vector3f |
getDirection()
|
float |
getExtent()
|
Vector3f |
getNegativeEnd(Vector3f store)
|
Vector3f |
getOrigin()
|
Vector3f |
getPositiveEnd(Vector3f store)
|
boolean |
isPointInsideBounds(Vector3f point)
Evaluates whether a given point is contained within the axis aligned bounding box that contains this LineSegment. |
boolean |
isPointInsideBounds(Vector3f point,
float error)
Evaluates whether a given point is contained within the axis aligned bounding box that contains this LineSegment. |
void |
read(JmeImporter e)
|
void |
set(LineSegment ls)
|
void |
setDirection(Vector3f direction)
|
void |
setExtent(float extent)
|
void |
setOrigin(Vector3f origin)
|
void |
write(JmeExporter e)
|
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public LineSegment()
public LineSegment(LineSegment ls)
public LineSegment(Vector3f origin, Vector3f direction, float extent)
Creates a new LineSegment with the given origin, direction and extent.
Note that the origin is not one of the ends of the LineSegment, but its center.
public LineSegment(Vector3f start, Vector3f end)
Creates a new LineSegment with a given origin and end. This constructor will calculate the center, the direction and the extent.
メソッドの詳細 |
---|
public void set(LineSegment ls)
public float distance(Vector3f point)
public float distance(LineSegment ls)
public float distance(Ray r)
public float distanceSquared(Vector3f point)
public float distanceSquared(LineSegment test)
public float distanceSquared(Ray r)
public Vector3f getDirection()
public void setDirection(Vector3f direction)
public float getExtent()
public void setExtent(float extent)
public Vector3f getOrigin()
public void setOrigin(Vector3f origin)
public Vector3f getPositiveEnd(Vector3f store)
public Vector3f getNegativeEnd(Vector3f store)
public void write(JmeExporter e) throws java.io.IOException
Savable
内の write
java.io.IOException
public void read(JmeImporter e) throws java.io.IOException
Savable
内の read
java.io.IOException
public LineSegment clone()
java.lang.Object
内の clone
public boolean isPointInsideBounds(Vector3f point)
Evaluates whether a given point is contained within the axis aligned bounding box that contains this LineSegment.
This function is float error aware.
public boolean isPointInsideBounds(Vector3f point, float error)
Evaluates whether a given point is contained within the axis aligned bounding box that contains this LineSegment.
This function accepts an error parameter, which is added to the extent of the bounding box.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |