Constructor
new DefReflection(normalize)
Default values
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalize |
Boolean | false | Whether the vector should be normalized |
- Source:
Methods
compute(createInfo) → {Object}
Computes the reflection
Parameters:
Name | Type | Description |
---|---|---|
createInfo |
CreateInfo | The creation info |
- Source:
Returns:
The reflection with type TYPE_VECTOR
- Type
- Object
(static) fromVectorNormal(params) → {CreateInfo}
Computes the reflection of a vector along a normal.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) reflectVector(i, n) → {Object}
Computes the reflection of an incident diretion I along a vector N: I - 2.0 * dot(N, I) * N
Parameters:
Name | Type | Description |
---|---|---|
i |
Object | The incident direction |
n |
Object | The normal |
- Source:
Returns:
The reflected vector
- Type
- Object