class Prism::Transform
- Prism::Transform
- Crash::Component
- Reference
- Object
Overview
Handles positional transformations
Included Modules
Defined in:
prism/transform.cr:6prism/transform.cr:70
Constructors
Instance Method Summary
-
#elevate_by(amount : Float32)
Changes the object's elevation by the distance
-
#elevate_to(position : Float32)
Elevates the object to the exact position
-
#get_look_at_direction(point : Vector3f, up : Vector3f) : Quaternion
Creates a transformation to look at a point This is handy for applying some form of lerp'ing.
-
#get_transformation : Matrix4f
Returns the transformation
-
#look_at(point : Vector3f, up : Vector3f)
Rotates to look at the point
-
#look_at(transform : Prism::Transform)
Rotates to look at the transform
-
#look_at(object : Prism::Entity)
Rotates to look at the object
-
#move_east(distance : Float32)
Moves the shape towards east by the distance
-
#move_north(distance : Float32)
Moves the shape towards north by the distance
- #move_south(distance : Float32)
- #move_to(x : Float32, y : Float32, z : Float32)
- #move_to(entity : Crash::Entity)
- #move_west(distance : Float32)
- #pos : Prism::Maths::Vector3f
- #pos=(pos : Prism::Maths::Vector3f)
- #rot : Prism::Maths::Quaternion
- #rot=(rot : Prism::Maths::Quaternion)
- #rotate(axis : Vector3f, angle : Float32)
-
#rotate_x_axis(angle : Angle)
Rotates the shape around the x-axis
-
#rotate_y_axis(angle : Angle)
Rotates the shape around the y-axis
-
#rotate_z_axis(angle : Angle)
Rotates the shape around the z-axis
- #scale(factor : Float32)
- #scale : Prism::Maths::Vector3f
- #scale=(scale : Prism::Maths::Vector3f)
Instance methods inherited from module Prism::Maths
barry_centric_weight(p1 : Vector3f, p2 : Vector3f, p3 : Vector3f, pos : Vector2f) : Float32
barry_centric_weight,
to_rad(degree : Float32) : Float32
to_rad
Constructor Detail
Instance Method Detail
Creates a transformation to look at a point This is handy for applying some form of lerp'ing.