Class ModelNode

Class for drawing Mesh objects.

(Inherited from menori.Node class)

See also:

Fields

ModelNode.material Own copy of the Material that is bound to the model.
ModelNode.mesh The menori.Mesh object that is bound to the model.
ModelNode.color Model color.

Methods

ModelNode:init (mesh[, material=Material.default]) The public constructor.
ModelNode:clone () Clone an object.
ModelNode:calculate_aabb ([index=1]) Calculate AABB by applying the current transformations.
ModelNode:render (scene, environment) Draw a ModelNode object on the screen.


Fields

ModelNode.material
Own copy of the Material that is bound to the model.
  • material
ModelNode.mesh
The menori.Mesh object that is bound to the model.
  • mesh
ModelNode.color
Model color. (Deprecated)
  • color

Methods

ModelNode:init (mesh[, material=Material.default])
The public constructor.

Parameters:

  • mesh menori.Mesh object
  • material menori.Material object. (A new copy will be created for the material) (default Material.default)
ModelNode:clone ()
Clone an object.

Returns:

    menori.ModelNode object
ModelNode:calculate_aabb ([index=1])
Calculate AABB by applying the current transformations.

Parameters:

  • index number The index of the primitive in the mesh. (default 1)

Returns:

    menori.ml.bound3 object
ModelNode:render (scene, environment)
Draw a ModelNode object on the screen. This function will be called implicitly in the hierarchy when a node is drawn with scene:render_nodes()

Parameters:

  • scene menori.Scene object that is used when drawing the model
  • environment menori.Environment object that is used when drawing the model
generated by LDoc 1.4.6 Last updated 2023-03-21 17:41:24