PCoordinate< T > Class Template Reference

#include <Vector.h>

List of all members.

Public Member Functions

 PCoordinate (void)
 PCoordinate (int n)
virtual ~PCoordinate (void)
void init (int n)
void set (int m, T x, T y=0, T z=0, double n=0.0)
void clear (void)
void free (void)

Public Attributes

int dim
Vector< T > ** point

Detailed Description

template<typename T = int>
class jbxl::PCoordinate< T >

template <typename t="int"> class DllExport PCoordinate

多角形の座標の値を格納するクラス

Definition at line 357 of file Vector.h.


Constructor & Destructor Documentation

PCoordinate ( void   )  [inline]

Definition at line 365 of file Vector.h.

00365 { dim = 0; point = NULL;}

PCoordinate ( int  n  )  [inline]

Definition at line 366 of file Vector.h.

00366 { init(n);}

virtual ~PCoordinate ( void   )  [inline, virtual]

Definition at line 368 of file Vector.h.

00368 {}


Member Function Documentation

void clear ( void   )  [inline]

Definition at line 388 of file Vector.h.

00388                       {
00389         if (point!=NULL) {
00390             for (int i=0; i<dim; i++) point[i]->set((T)0);
00391         }
00392     }

void free ( void   )  [inline]

Definition at line 394 of file Vector.h.

00394                      {
00395         if (point!=NULL) {
00396             for (int i=0; i<dim; i++) delete(point[i]);
00397             ::free(point);
00398             point = NULL;
00399         }
00400         dim = 0;
00401     }

void init ( int  n  )  [inline]

Definition at line 371 of file Vector.h.

00371                       {
00372         dim   = 0;
00373         point = NULL;
00374 
00375         if (n>0) {
00376             point = (Vector<T>**)malloc(sizeof(Vector<T>*)*n);
00377             if (point!=NULL) {
00378                 dim = n;
00379                 for (int i=0; i<dim; i++) point[i] = new Vector<T>();
00380             }
00381         }
00382     }

void set ( int  m,
x,
y = 0,
z = 0,
double  n = 0.0 
) [inline]

Definition at line 384 of file Vector.h.

00384                                                       {
00385         if (m>=0 && m<dim && point!=NULL) point[m]->set(x, y, z, n); 
00386     }       


Member Data Documentation

int dim

Definition at line 360 of file Vector.h.

Vector<T>** point

Definition at line 361 of file Vector.h.


The documentation for this class was generated from the following file:

Generated on 15 Nov 2023 for JunkBox_Lib++ (for Windows) by  doxygen 1.6.1