Class: OpenCV::Cv::Viz::Mesh

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ropencv/ropencv_types.rb

Constants collapse

LOAD_AUTO =
0
LOAD_PLY =
1
LOAD_OBJ =
2

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


77896
77897
77898
77899
77900
77901
77902
77903
77904
77905
77906
77907
77908
77909
77910
77911
77912
77913
77914
77915
77916
# File 'lib/ropencv/ropencv_types.rb', line 77896

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(MeshStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # overloaded method wrapper for cv::viz::Mesh::Mesh()
    @@cv_viz_mesh_mesh_defaults0 ||= []
    if(args.size >= 0 && args.size <= 0)
        targs = args.clone
        targs.size.upto(-1) do |i|
            targs[i] = @@cv_viz_mesh_mesh_defaults0[i]
        end
        begin
                return Rbind::cv_viz_mesh_mesh(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.nullObject

returns a null pointer to the object



77892
77893
77894
# File 'lib/ropencv/ropencv_types.rb', line 77892

def self.null
    new(MeshStruct.new)
end

Instance Method Details

#cloudCv::Mat Also known as: get_cloud

Note:

method wrapper for cv::Mat cloud

methods

Returns:



77996
77997
77998
77999
78000
78001
78002
78003
78004
# File 'lib/ropencv/ropencv_types.rb', line 77996

def cloud()
    __validate_pointer__
    result = Rbind::cv_viz_mesh_get_cloud( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#cloud=(value) ⇒ Void Also known as: set_cloud

Note:

method wrapper for cv::Mat cloud

Parameters:

Returns:

  • (Void)


78010
78011
78012
78013
# File 'lib/ropencv/ropencv_types.rb', line 78010

def cloud=(value)
    __validate_pointer__
    Rbind::cv_viz_mesh_set_cloud( self, value)
end

#colorsCv::Mat Also known as: get_colors

Note:

method wrapper for cv::Mat colors

Returns:



78018
78019
78020
78021
78022
78023
78024
78025
78026
# File 'lib/ropencv/ropencv_types.rb', line 78018

def colors()
    __validate_pointer__
    result = Rbind::cv_viz_mesh_get_colors( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#colors=(value) ⇒ Void Also known as: set_colors

Note:

method wrapper for cv::Mat colors

Parameters:

Returns:

  • (Void)


78032
78033
78034
78035
# File 'lib/ropencv/ropencv_types.rb', line 78032

def colors=(value)
    __validate_pointer__
    Rbind::cv_viz_mesh_set_colors( self, value)
end

#normalsCv::Mat Also known as: get_normals

Note:

method wrapper for cv::Mat normals

Returns:



78040
78041
78042
78043
78044
78045
78046
78047
78048
# File 'lib/ropencv/ropencv_types.rb', line 78040

def normals()
    __validate_pointer__
    result = Rbind::cv_viz_mesh_get_normals( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#normals=(value) ⇒ Void Also known as: set_normals

Note:

method wrapper for cv::Mat normals

Parameters:

Returns:

  • (Void)


78054
78055
78056
78057
# File 'lib/ropencv/ropencv_types.rb', line 78054

def normals=(value)
    __validate_pointer__
    Rbind::cv_viz_mesh_set_normals( self, value)
end

#polygonsCv::Mat Also known as: get_polygons

Note:

method wrapper for cv::Mat polygons

Returns:



78062
78063
78064
78065
78066
78067
78068
78069
78070
# File 'lib/ropencv/ropencv_types.rb', line 78062

def polygons()
    __validate_pointer__
    result = Rbind::cv_viz_mesh_get_polygons( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#polygons=(value) ⇒ Void Also known as: set_polygons

Note:

method wrapper for cv::Mat polygons

Parameters:

Returns:

  • (Void)


78076
78077
78078
78079
# File 'lib/ropencv/ropencv_types.rb', line 78076

def polygons=(value)
    __validate_pointer__
    Rbind::cv_viz_mesh_set_polygons( self, value)
end

#tcoordsCv::Mat Also known as: get_tcoords

Note:

method wrapper for cv::Mat tcoords

Returns:



78106
78107
78108
78109
78110
78111
78112
78113
78114
# File 'lib/ropencv/ropencv_types.rb', line 78106

def tcoords()
    __validate_pointer__
    result = Rbind::cv_viz_mesh_get_tcoords( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#tcoords=(value) ⇒ Void Also known as: set_tcoords

Note:

method wrapper for cv::Mat tcoords

Parameters:

Returns:

  • (Void)


78120
78121
78122
78123
# File 'lib/ropencv/ropencv_types.rb', line 78120

def tcoords=(value)
    __validate_pointer__
    Rbind::cv_viz_mesh_set_tcoords( self, value)
end

#textureCv::Mat Also known as: get_texture

Note:

method wrapper for cv::Mat texture

Returns:



78084
78085
78086
78087
78088
78089
78090
78091
78092
# File 'lib/ropencv/ropencv_types.rb', line 78084

def texture()
    __validate_pointer__
    result = Rbind::cv_viz_mesh_get_texture( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#texture=(value) ⇒ Void Also known as: set_texture

Note:

method wrapper for cv::Mat texture

Parameters:

Returns:

  • (Void)


78098
78099
78100
78101
# File 'lib/ropencv/ropencv_types.rb', line 78098

def texture=(value)
    __validate_pointer__
    Rbind::cv_viz_mesh_set_texture( self, value)
end

#to_sObject

converts Mesh into a string by crawling through all its attributes



77982
77983
77984
# File 'lib/ropencv/ropencv_types.rb', line 77982

def to_s
    "#<cv::viz::Mesh cloud=#{self.cloud} colors=#{self.colors} normals=#{self.normals} polygons=#{self.polygons} texture=#{self.texture} tcoords=#{self.tcoords}>"
end