AxisAngleMap

Overview

AxisAngleMap takes an input vector and rotates it about an axis.

When rotating surface normals for non-photorealism, input and output spaces should be set to “render.”


Attribute Reference

General attributes

angle

Float bindable
default: 0.0

the angle of rotation in degrees

axis_space

Int enum
  2 = “world” (default)
  4 = “object”

the space of the axis to rotate about

input_space

Int enum
  0 = “render” (default)
  1 = “camera”
  2 = “world”
  3 = “screen”
  4 = “object”

the space to transform from

input_vector

Vec3f bindable
default: [ 0, 0, 1 ]

input vector to be rotated

output_space

Int enum
  0 = “render” (default)
  1 = “camera”
  2 = “world”
  3 = “screen”
  4 = “object”

the space to transform the resulting vector to

rotation_axis

Vec3f bindable
default: [ 0, 1, 0 ]

axis to be rotated around


Examples

local attrmap = AttributeMap("attrmap") {
    -- shading normals
    ["map_type"] = 3,
}

-- rotate about world space
-- shading normals should remain perpendicular to screen
local axisanglemap0 = AxisAngleMap("axisanglemap0") {
    ["input_vector"] = bind(attrmap),
    ["input_space"] = 0,
    ["rotation_axis"] = Vec3(0,1,0),
    ["axis_space"] = 2,
    ["angle"] = 50,
    ["output_space"] = 0,
}