Class: Stagecraft::Mesh

Inherits:
Node
  • Object
show all
Defined in:
lib/stagecraft/core/mesh.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#cast_shadow, #children, #name, #parent, #position, #receive_shadow, #render_order, #rotation, #scale, #visible, #world_version

Instance Method Summary collapse

Methods inherited from Node

#add, #find, #local_matrix, #look_at, #remove, #transform_dirty!, #traverse, #world_matrix, #world_matrix_with_version, #world_position

Constructor Details

#initialize(geometry, material) ⇒ Mesh

Returns a new instance of Mesh.



8
9
10
11
12
13
14
# File 'lib/stagecraft/core/mesh.rb', line 8

def initialize(geometry, material, **)
  super(**)
  self.geometry = geometry
  self.material = material
  @frustum_culled = true
  @morph_weights = []
end

Instance Attribute Details

#frustum_culledObject

Returns the value of attribute frustum_culled.



6
7
8
# File 'lib/stagecraft/core/mesh.rb', line 6

def frustum_culled
  @frustum_culled
end

#geometryObject

Returns the value of attribute geometry.



5
6
7
# File 'lib/stagecraft/core/mesh.rb', line 5

def geometry
  @geometry
end

#materialObject

Returns the value of attribute material.



5
6
7
# File 'lib/stagecraft/core/mesh.rb', line 5

def material
  @material
end

#morph_weightsObject

Returns the value of attribute morph_weights.



6
7
8
# File 'lib/stagecraft/core/mesh.rb', line 6

def morph_weights
  @morph_weights
end

#skinObject

Returns the value of attribute skin.



6
7
8
# File 'lib/stagecraft/core/mesh.rb', line 6

def skin
  @skin
end