// Generated by scripts/generate.mjs from bindings/api.mjs. Do not edit.
///|
#external
pub type CatmullRomCurve3
///|
#module("@mizchi/three-mbt/geometry")
extern "js" fn CatmullRomCurve3::ffi_create_CatmullRomCurve3(
points : FixedArray[Vector3],
closed : Bool,
curve_type : CatmullRomType,
tension : Double,
) -> CatmullRomCurve3 = "catmullRomCurve3"
///|
pub fn CatmullRomCurve3::CatmullRomCurve3(
points : FixedArray[Vector3],
closed? : Bool = false,
curve_type? : CatmullRomType = Centripetal,
tension? : Double = 0.5,
) -> CatmullRomCurve3 {
CatmullRomCurve3::ffi_create_CatmullRomCurve3(
points, closed, curve_type, tension,
)
}
///|
pub fn CatmullRomCurve3::as_curve3(self : CatmullRomCurve3) -> Curve3 = "%identity"
///|
pub extern "js" fn CatmullRomCurve3::closed(self : CatmullRomCurve3) -> Bool =
#| (self) => self.closed
///|
pub extern "js" fn CatmullRomCurve3::set_closed(
self : CatmullRomCurve3,
value : Bool,
) -> Unit =
#| (self, value) => { self.closed = value; }
///|
pub extern "js" fn CatmullRomCurve3::tension(self : CatmullRomCurve3) -> Double =
#| (self) => self.tension
///|
pub extern "js" fn CatmullRomCurve3::set_tension(
self : CatmullRomCurve3,
value : Double,
) -> Unit =
#| (self, value) => { self.tension = value; }
///|
pub extern "js" fn CatmullRomCurve3::points(
self : CatmullRomCurve3,
) -> FixedArray[Vector3] =
#| (self) => self.points.slice()
///|
pub extern "js" fn CatmullRomCurve3::set_points(
self : CatmullRomCurve3,
points : FixedArray[Vector3],
) -> Unit =
#| (self, points) => { self.points = points.slice(); self.updateArcLengths(); }
///|
extern "js" fn CatmullRomCurve3::ffi_get_point(
self : CatmullRomCurve3,
t : Double,
target : Vector3,
) -> Vector3 =
#| (self, t, target) => self.getPoint(t, target)
///|
/// Passes target to the native method and preserves its return value. An omitted target is allocated per call.
pub fn CatmullRomCurve3::get_point(
self : CatmullRomCurve3,
t : Double,
target? : Vector3 = Vector3(0, 0, 0),
) -> Vector3 {
self.ffi_get_point(t, target)
}
///|
extern "js" fn CatmullRomCurve3::ffi_get_point_at(
self : CatmullRomCurve3,
u : Double,
target : Vector3,
) -> Vector3 =
#| (self, u, target) => self.getPointAt(u, target)
///|
/// Passes target to the native method and preserves its return value. An omitted target is allocated per call.
pub fn CatmullRomCurve3::get_point_at(
self : CatmullRomCurve3,
u : Double,
target? : Vector3 = Vector3(0, 0, 0),
) -> Vector3 {
self.ffi_get_point_at(u, target)
}
///|
extern "js" fn CatmullRomCurve3::ffi_get_tangent(
self : CatmullRomCurve3,
t : Double,
target : Vector3,
) -> Vector3 =
#| (self, t, target) => self.getTangent(t, target)
///|
/// Passes target to the native method and preserves its return value. An omitted target is allocated per call.
pub fn CatmullRomCurve3::get_tangent(
self : CatmullRomCurve3,
t : Double,
target? : Vector3 = Vector3(0, 0, 0),
) -> Vector3 {
self.ffi_get_tangent(t, target)
}
///|
extern "js" fn CatmullRomCurve3::ffi_get_tangent_at(
self : CatmullRomCurve3,
u : Double,
target : Vector3,
) -> Vector3 =
#| (self, u, target) => self.getTangentAt(u, target)
///|
/// Passes target to the native method and preserves its return value. An omitted target is allocated per call.
pub fn CatmullRomCurve3::get_tangent_at(
self : CatmullRomCurve3,
u : Double,
target? : Vector3 = Vector3(0, 0, 0),
) -> Vector3 {
self.ffi_get_tangent_at(u, target)
}
///|
pub extern "js" fn CatmullRomCurve3::get_points(
self : CatmullRomCurve3,
divisions : Int,
) -> FixedArray[Vector3] =
#| (self, divisions) => self.getPoints(divisions)
///|
pub extern "js" fn CatmullRomCurve3::get_spaced_points(
self : CatmullRomCurve3,
divisions : Int,
) -> FixedArray[Vector3] =
#| (self, divisions) => self.getSpacedPoints(divisions)
///|
pub extern "js" fn CatmullRomCurve3::get_length(
self : CatmullRomCurve3,
) -> Double =
#| (self) => self.getLength()
///|
pub extern "js" fn CatmullRomCurve3::update_arc_lengths(
self : CatmullRomCurve3,
) -> Unit =
#| (self) => self.updateArcLengths()
///|
pub extern "js" fn CatmullRomCurve3::compute_frenet_frames(
self : CatmullRomCurve3,
segments : Int,
closed : Bool,
) -> FrenetFrames =
#| (self, segments, closed) => self.computeFrenetFrames(segments, closed)