Class: Ra::Pattern::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ra/pattern/base.rb

Overview

An abstract pattern. Any concrete subclass of pattern must implement the method ‘color`.

Direct Known Subclasses

Checkers, Gradient, Rings, Stripes, Texture

Instance Method Summary collapse

Instance Method Details

#color(point:) ⇒ Ra::Color

Parameters:

  • point (Vector)

    <u = 0.0..1.0, v = 0.0..1.0>

Returns:

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/ra/pattern/base.rb', line 9

def color(point:)
  raise NotImplementedError, '#color must be implemented by a concrete subclass'
end