In Files

Parent

Label

Author

Manuela Ruiz (mruiz@lcc.uma.es)

A label can be associated to points

Attributes

value[R]

Value of the label. It is basically a Sketchup::Material object or Constants::INTERSECTION_LABEL

Public Class Methods

new(value) click to toggle source
value

the value for the label

Initializing the label

     # File lib/geometry.rb, line 502
502:         def initialize(value)

503:                 if Shade.using_sketchup

504:                         if (value.kind_of? Sketchup::Material)

505:                                 @value = value.name

506:                         else

507:                                 @value = value

508:                         end

509:                 else

510:                         @value = value

511:                 end

512:         end

Public Instance Methods

<(other_label) click to toggle source
other_label

another Label

returns

true if this label is lesser than the specified label

     # File lib/geometry.rb, line 517
517:         def <(other_label)

518:                 if Shade.using_sketchup

519:                         if @value.kind_of? Sketchup::Material

520:                                 name = @value.name

521:                         else

522:                                 name = @value

523:                         end

524:                 else

525:                         name = @value

526:                 end

527:                 if Shade.using_sketchup

528:                         if other_label.value.kind_of? Sketchup::Material

529:                                 other_name = other_label.value.name

530:                         else

531:                                 other_name = other_label.value

532:                         end

533:                 else

534:                         other_name = other_label.value

535:                 end

536:                 return name < other_name

537:         end
==(other_label) click to toggle source
other_label

another Label

returns

true if this label and other_label are identical

     # File lib/geometry.rb, line 556
556:         def == (other_label)

557:                 result = false

558:                 if other_label.kind_of? Label

559:                         if Shade.using_sketchup

560:                                 if @value.kind_of? Sketchup::Material

561:                                         name = @value.name

562:                                 else

563:                                         name = @value

564:                                 end

565:                         else

566:                                 name = @value

567:                         end

568:                         if Shade.using_sketchup

569:                                 if other_label.value.kind_of? Sketchup::Material

570:                                         other_name = other_label.value.name

571:                                 else

572:                                         other_name = other_label.value

573:                                 end

574:                         else

575:                                 other_name = other_label.value

576:                         end

577:                         result = (name == other_name)

578:                 end

579:                 return result

580:         end
clone() click to toggle source
is_design

true iff we need a design shape

Produces another Label, identical to this one

     # File lib/geometry.rb, line 585
585:         def clone()

586:                 new_label = Label.new(@value)

587:                 return new_label

588:         end
hash() click to toggle source
returns

the hash code for this label

     # File lib/geometry.rb, line 591
591:         def hash

592:                 return @value.hash

593:         end
name() click to toggle source
returns

the name of the label

     # File lib/geometry.rb, line 540
540:         def name()

541:                 if Shade.using_sketchup

542:                         if @value.kind_of? Sketchup::Material

543:                                 return @value.name

544:                         else

545:                                 return @value

546:                         end

547:                 else

548:                         return @value

549:                 end

550:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.