[][src]Struct gdnative_bindings::AnimationNodeBlendSpace2D

pub struct AnimationNodeBlendSpace2D { /* fields omitted */ }

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

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]

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]

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]

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.

impl DerefMut for AnimationNodeBlendSpace2D[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

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SubClass<T> for T where
    T: GodotObject
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.