Class and Object 

| HOME |

General Matrix Image / GIS Photogram Vector Point Vector of

point / line

Surveying
DOUBLE 
MATRIX 
IMAGE 
PHOTO 
VECTOR 
INDX    
VECINDX
ELLIPSOID
FLOAT
MATRIX_FLT
IMAGE_FLT
CAMERA
VECINT
IDINDX
VECIDINDX
PROJECTION
INT
MATRIX_INT
IMAGE_INT
MODEL
VECSTR
IDPT1D
VECIDPT1D
SUN
SHORT
MATRIX_SHT
IMAGE_SHT
SPOT   PT2D
VECPT2D
DATE
UCHAR
MATRIX_UCH
IMAGE_UCH
AT_2D
  IDPT2D
VECIDPT2D
 
BOOL
MATRIX_BLN
IMAGE_BLN
AT_3D

PT3D
VECPT3D
 
COMPLEX
MATRIX_CMP
IMAGE_RGB
AT_BD

IDPT3D
VECIDPT3D
 
STRING MATRIX_STR         VECRCPLINE
 
            VECXYPLINE
 






VEC3DPLINE

| HOME |

There are currently 54 classes in Noobeed.  A class is actually a sort of predefined data structure, consisting of member data, with a pre-defined set of its own function, called class function.  We can think about class as a kind of data type.  The first 6 data types, or classes, are somewhat standard and are the simplest ones.  They are double, float, int, short, uchar and bool.  They do not have class function.   More complicate classes such as "Image" can have a number of data member such as  coordinates of the lower left and upper right point, type of map projection , type of ellipsoid, etc.  It also has a set of class functions, which are to be called by Image "object", for example rectify, overlay, histo, etc.

A variable that has a particular data type, or class, is an "object" of that class.  For example

->a = Matrix()

The variable "a" is a Matrix object, and it is able to call all class functions of class Matrix.  For example

->b = a.inv()

Here "a" calls its class function "inv", to make an inverse matrix from itself.  This function returns a result, which is of type Matrix, and it is assigned to a variable "b".  Thus "b" is another object of Matrix type.

It should be notice that all class names are actually "global function".  These functions are sometimes called "construction function".  Construction functions always have default arguments.  Thus it is always possible to create an object using its class-name as a function and followed by an empty parenthesis.  Almost all classes have a function "init", where you can use to alter information in an object.  Another way to change information of an object is to use L-functions.  See the following examples.

Example:

 

-> E = Ellipsoid()

 

E is an ellipsoid (it has a defualt a, semi-major axis, and a default f, flattening)

 

->E.init(6377276.345, 1/300.8014)

 

reset parameters a and f of the ellipsoid "E"
 

->E.f() = 1/299.456

 

assign a new value of flattening, "f" to the ellipsoid "E"

Click on each class above to see more details.


| HOME |