Class: Pdfrb::Model::Type::ThreeDNode

Inherits:
Cos::Dictionary show all
Defined in:
lib/pdfrb/model/type/three_d_node.rb

Overview

3D Node (s13.6.4). A node in a 3D model's scene graph.

Instance Attribute Summary

Attributes inherited from Object

#document, #gen, #oid, #value

Instance Method Summary collapse

Methods inherited from Cos::Dictionary

#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate

Methods inherited from Object

#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type

Constructor Details

This class inherits a constructor from Pdfrb::Model::Cos::Dictionary

Instance Method Details

#dataObject



14
# File 'lib/pdfrb/model/type/three_d_node.rb', line 14

def data; self[:Data]; end

#has_render_mode?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/pdfrb/model/type/three_d_node.rb', line 17

def has_render_mode?
  !!render_mode
end

#instanceObject



13
# File 'lib/pdfrb/model/type/three_d_node.rb', line 13

def instance; self[:Instance]; end

#matrixObject



12
# File 'lib/pdfrb/model/type/three_d_node.rb', line 12

def matrix; self[:M]; end

#nameObject



9
# File 'lib/pdfrb/model/type/three_d_node.rb', line 9

def name; self[:N]; end

#opacityObject



10
# File 'lib/pdfrb/model/type/three_d_node.rb', line 10

def opacity; self[:O]; end

#render_modeObject



15
# File 'lib/pdfrb/model/type/three_d_node.rb', line 15

def render_mode; self[:RM]; end

#resolved_instanceObject



21
22
23
24
25
26
# File 'lib/pdfrb/model/type/three_d_node.rb', line 21

def resolved_instance
  ref = instance
  return nil unless ref && document

  document.object(ref)
end

#resolved_render_modeObject



28
29
30
31
32
33
# File 'lib/pdfrb/model/type/three_d_node.rb', line 28

def resolved_render_mode
  ref = render_mode
  return nil unless ref && document

  document.object(ref)
end

#typeObject



8
# File 'lib/pdfrb/model/type/three_d_node.rb', line 8

def type; self[:Type]; end

#visible?Boolean

Returns:

  • (Boolean)


11
# File 'lib/pdfrb/model/type/three_d_node.rb', line 11

def visible?; truthy?(self[:V]); end