[−][src]Struct gdnative_bindings::AnimationNodeBlendSpace2D
core class AnimationNodeBlendSpace2D inherits AnimationRootNode (reference counted).
Official documentation
See the documentation of this class in the Godot engine's official documentation.
Memory management
The lifetime of this object is automatically managed through reference counting.
Class hierarchy
AnimationNodeBlendSpace2D inherits methods from:
Safety
All types in the Godot API have "interior mutability" in Rust parlance.
To enforce that the official thread-safety guidelines are
followed, the typestate pattern is used in the Ref and TRef smart pointers,
and the Instance API. The typestate Access in these types tracks whether the
access is unique, shared, or exclusive to the current thread. For more information,
see the type-level documentation on Ref.
Implementations
impl AnimationNodeBlendSpace2D[src]
Constants
pub const BLEND_MODE_DISCRETE: i64[src]
pub const BLEND_MODE_DISCRETE_CARRY: i64[src]
pub const BLEND_MODE_INTERPOLATED: i64[src]
impl AnimationNodeBlendSpace2D[src]
pub fn new() -> Ref<Self, Unique>[src]
Creates a new instance of this object.
This is a reference-counted type. The returned object is automatically managed
by Ref.
pub fn add_blend_point(
&self,
node: impl AsArg<AnimationRootNode>,
pos: Vector2,
at_index: i64
)[src]
&self,
node: impl AsArg<AnimationRootNode>,
pos: Vector2,
at_index: i64
)
Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
Default Arguments
at_index--1
pub fn add_triangle(&self, x: i64, y: i64, z: i64, at_index: i64)[src]
Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
Default Arguments
at_index--1
pub fn auto_triangles(&self) -> bool[src]
If [code]true[/code], the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point].
pub fn blend_mode(&self) -> BlendMode[src]
Controls the interpolation between animations. See [enum BlendMode] constants.
pub fn get_blend_point_count(&self) -> i64[src]
Returns the number of points in the blend space.
pub fn blend_point_node(
&self,
point: i64
) -> Option<Ref<AnimationRootNode, Shared>>[src]
&self,
point: i64
) -> Option<Ref<AnimationRootNode, Shared>>
Returns the [AnimationRootNode] referenced by the point at index [code]point[/code].
pub fn blend_point_position(&self, point: i64) -> Vector2[src]
Returns the position of the point at index [code]point[/code].
pub fn max_space(&self) -> Vector2[src]
The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point].
pub fn min_space(&self) -> Vector2[src]
The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point].
pub fn snap(&self) -> Vector2[src]
Position increment to snap to when moving a point.
pub fn get_triangle_count(&self) -> i64[src]
Returns the number of triangles in the blend space.
pub fn get_triangle_point(&self, triangle: i64, point: i64) -> i64[src]
Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code].
pub fn x_label(&self) -> GodotString[src]
Name of the blend space's X axis.
pub fn y_label(&self) -> GodotString[src]
Name of the blend space's Y axis.
pub fn remove_blend_point(&self, point: i64)[src]
Removes the point at index [code]point[/code] from the blend space.
pub fn remove_triangle(&self, triangle: i64)[src]
Removes the triangle at index [code]triangle[/code] from the blend space.
pub fn set_auto_triangles(&self, enable: bool)[src]
If [code]true[/code], the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point].
pub fn set_blend_mode(&self, mode: i64)[src]
Controls the interpolation between animations. See [enum BlendMode] constants.
pub fn set_blend_point_node(
&self,
point: i64,
node: impl AsArg<AnimationRootNode>
)[src]
&self,
point: i64,
node: impl AsArg<AnimationRootNode>
)
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
pub fn set_blend_point_position(&self, point: i64, pos: Vector2)[src]
Updates the position of the point at index [code]point[/code] on the blend axis.
pub fn set_max_space(&self, max_space: Vector2)[src]
The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point].
pub fn set_min_space(&self, min_space: Vector2)[src]
The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point].
pub fn set_snap(&self, snap: Vector2)[src]
Position increment to snap to when moving a point.
pub fn set_x_label(&self, text: impl Into<GodotString>)[src]
Name of the blend space's X axis.
pub fn set_y_label(&self, text: impl Into<GodotString>)[src]
Name of the blend space's Y axis.
Methods from Deref<Target = AnimationRootNode>
Trait Implementations
impl Debug for AnimationNodeBlendSpace2D[src]
impl Deref for AnimationNodeBlendSpace2D[src]
type Target = AnimationRootNode
The resulting type after dereferencing.
fn deref(&self) -> &AnimationRootNode[src]
impl DerefMut for AnimationNodeBlendSpace2D[src]
fn deref_mut(&mut self) -> &mut AnimationRootNode[src]
impl GodotObject for AnimationNodeBlendSpace2D[src]
type RefKind = RefCounted
The memory management kind of this type. This modifies the behavior of the
Ref smart pointer. See its type-level documentation for more
information. Read more
fn class_name() -> &'static str[src]
fn null() -> Null<Self>[src]
fn new() -> Ref<Self, Unique> where
Self: Instanciable, [src]
Self: Instanciable,
fn cast<T>(&self) -> Option<&T> where
T: GodotObject + SubClass<Self>, [src]
T: GodotObject + SubClass<Self>,
fn upcast<T>(&self) -> &T where
Self: SubClass<T>,
T: GodotObject, [src]
Self: SubClass<T>,
T: GodotObject,
unsafe fn assume_shared(&self) -> Ref<Self, Shared>[src]
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>, [src]
Self: GodotObject<RefKind = RefCounted>,
unsafe fn assume_unique(&self) -> Ref<Self, Unique>[src]
impl Instanciable for AnimationNodeBlendSpace2D[src]
impl Sealed for AnimationNodeBlendSpace2D[src]
impl SubClass<AnimationNode> for AnimationNodeBlendSpace2D[src]
impl SubClass<AnimationRootNode> for AnimationNodeBlendSpace2D[src]
impl SubClass<Object> for AnimationNodeBlendSpace2D[src]
impl SubClass<Reference> for AnimationNodeBlendSpace2D[src]
impl SubClass<Resource> for AnimationNodeBlendSpace2D[src]
Auto Trait Implementations
impl RefUnwindSafe for AnimationNodeBlendSpace2D
impl !Send for AnimationNodeBlendSpace2D
impl !Sync for AnimationNodeBlendSpace2D
impl Unpin for AnimationNodeBlendSpace2D
impl UnwindSafe for AnimationNodeBlendSpace2D
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> SubClass<T> for T where
T: GodotObject, [src]
T: GodotObject,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,