API / geotoolkit3d / scene / surface / contour / Ray / Ray
Contour Ray class
Ray is used to travese contour mesh and find intersections for building labels
Constructors
Constructors
• new Ray(origin?, direction?, contourLevel?)
| Name | Type | Description |
|---|---|---|
Optional origin | Vector3 | The origin of Ray |
Optional direction | Vector3 | The direction of Ray |
Optional contourLevel | number | The contour level that Ray is located at |
Methods
▸ at(distance, target): Vector3
Get a Vector3 that is a given distance along this Ray
| Name | Type | Description |
|---|---|---|
distance | number | the distance in float |
target | Vector3 | the target vector |
Vector3
result vector
▸ clone(): Ray
Return a new Ray with the same origin and direction
this
▸ copy(ray): Ray
Copy the passed ray's properties to this ray
| Name | Type | Description |
|---|---|---|
ray | Ray | the passed ray |
this
▸ getClassName(): string
string
▸ getContourLevel(): number
Get contour level of this ray
number
elevation
▸ getDirection(): Vector3
Get the direction of ray
Vector3
direction
▸ getOrigin(): Vector3
Get the origin of ray
Vector3
origin
▸ intersectTriangle(a, b, c, backfaceCulling, target, normal): Vector3
Check if ray intersects the triangle // from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h
| Name | Type | Description |
|---|---|---|
a | Vector3 | the first vertex in triangle |
b | Vector3 | the second vertex in triangle |
c | Vector3 | the third vertex in triangle |
backfaceCulling | boolean | if true then not checking the backface |
target | Vector3 | the target that stored possible intersection |
normal | Vector3 | the normal of triangle |
Vector3
intersected point
▸ set(origin, direction): Ray
Set origin and direction for Ray
| Name | Type | Description |
|---|---|---|
origin | Vector3 | the origin of ray |
direction | Vector3 | the direction of ray |
this
▸ Static getClassName(): string
string