ConicRay
ConicRay
Represents a direction vector+angle Mainly used inside particle systems for pick a motion direction at spawn
Kind: global class
Copyright: "Company Named Limited"
- ConicRay
- instance
- .direction :
Vector3
- .angle :
number
- .toBinaryBuffer(buffer)
- .fromBinaryBuffer(buffer)
- .equals(other) ⇒
boolean
- .roughlyEquals(other, tolerance) ⇒
boolean
- .copy(other)
- .containsDirectionVector(v3) ⇒
boolean
- .sampleRandomDirection(random, result)
- .direction :
- static
- instance
conicRay.direction : Vector3
Must be normalized
Kind: instance property of ConicRay
Read only: true
conicRay.angle : number
Half-angle of the cone, that is the angle between the center axis and the edge of the cone In radians
Kind: instance property of ConicRay
conicRay.toBinaryBuffer(buffer)
Kind: instance method of ConicRay
Param | Type |
---|---|
buffer | BinaryBuffer |
conicRay.fromBinaryBuffer(buffer)
Kind: instance method of ConicRay
Param | Type |
---|---|
buffer | BinaryBuffer |
conicRay.equals(other) ⇒ boolean
Kind: instance method of ConicRay
Param | Type |
---|---|
other | ConicRay |
conicRay.roughlyEquals(other, tolerance) ⇒ boolean
Kind: instance method of ConicRay
Param | Type |
---|---|
other | ConicRay |
tolerance | number |
conicRay.copy(other)
Kind: instance method of ConicRay
Param | Type |
---|---|
other | ConicRay |
conicRay.containsDirectionVector(v3) ⇒ boolean
Includes boundary matches
Kind: instance method of ConicRay
Param | Type |
---|---|
v3 | Vector3 |
conicRay.sampleRandomDirection(random, result)
NOTE: Heavily based on a stackoverflow answer
Kind: instance method of ConicRay
See: https://stackoverflow.com/questions/38997302/create-random-unit-vector-inside-a-defined-conical-region/39003745#39003745
Param | Type |
---|---|
random | function |
result | Vector3 |
ConicRay.fromScalars(x, y, z, angle) ⇒ ConicRay
Kind: static method of ConicRay
Param | Type |
---|---|
x | number |
y | number |
z | number |
angle | number |