Quadratic3
Quadratic3
Quadric Error Metric Triangular 4x4 matrix, see https://en.wikipedia.org/wiki/Triangular_matrix
Kind: global class
quadratic3.toVector3(result)
Kind: instance method of Quadratic3
Param | Type |
---|---|
result | ArrayLike.<number> | Array.<number> | Float32Array |
quadratic3.toTensorM3(m3)
Kind: instance method of Quadratic3
Param | Type |
---|---|
m3 | ArrayLike.<number> | Array.<number> | Float32Array |
quadratic3.toTensorM3Inverse(m3, epsilon) ⇒ boolean
Equivalent to taking a tensor followed by matrix inversion
Kind: instance method of Quadratic3
Returns: boolean
- whether operation was successful or not
Param | Type |
---|---|
m3 | ArrayLike.<number> | Array.<number> | Float32Array |
epsilon | number |
quadratic3.setFromVector4(x, y, z, w)
Set from plane expressed as a 4 component vector
Kind: instance method of Quadratic3
Param | Type | Description |
---|---|---|
x | number | plane normal |
y | number | plane normal |
z | number | plane normal |
w | number | plane offset |
quadratic3.setFromFace(face)
Kind: instance method of Quadratic3
Param | Type |
---|---|
face | TopoTriangle |
quadratic3.evaluate(x, y, z) ⇒ number
Squared distance from the given point to plane encoded by the quadratic
Kind: instance method of Quadratic3
Param | Type |
---|---|
x | number |
y | number |
z | number |
quadratic3.optimize(out) ⇒ boolean
Find optimal vertex position based on the quadratic
Based on Blender's implementation: https://github.com/blender/blender/blob/594f47ecd2d5367ca936cf6fc6ec8168c2b360d0/source/blender/blenlib/intern/quadric.c
Kind: instance method of Quadratic3
Param | Type |
---|---|
out | Array.<number> |
quadratic3.add(Q)
Kind: instance method of Quadratic3
Param | Type |
---|---|
Q | Quadratic3 |
quadratic3.multiplyScalar(v)
Kind: instance method of Quadratic3
Param | Type |
---|---|
v | number |
quadratic3.clone() ⇒ Quadratic3
Kind: instance method of Quadratic3
quadratic3.copy(other)
Kind: instance method of Quadratic3
Param | Type |
---|---|
other | Quadratic3 |
quadratic3.clear()
Set all matrix values to 0
Kind: instance method of Quadratic3