CAD System Web Site - Computer Aided Design Software

i NET1000.COM
by Makoto Honda
Last Update: 2010-September-10                   Update Info     Site Index     Licensing     Copyright Notice     Privacy Policy     Contact Us  

 


 
System Architecture

 DLL Hierarchy
 Element Classes
 FM Programming
 Temp Elements
 Current Plane
 Rendering
 Undo/Redo
 OpenGL Display List


 
HOME  

                                   
Element Class Hierarchy

Computer-Aided Design Software
(CAD System)
 

Description

All the persistent elements that are supported in this system must be derived from CElemBase class.

 


Note:

CElemBase class is derived from MFC's CObject. 

CElemBase, CElemBase1D, CELemBase2D and CElemBase3D are all abstract classes (with pure virtual functions GenerateVertices & CreateGLcalls).

 

class CElemBase

// Persistent Data
ELEM_TYPE
m_elemType; // element type
ELEM_TYPE
m_elemType2; // element type
BOOL
m_selectable;

UINT
m_visible; // 0=invisible, 1=wire, 2=completely visible
UINT
m_layer;
BOOL m_group;
BOOL m_highlight;

UINT
m_lineWidth;
UINT
m_lineStyle;
UINT
m_fillPattern;

// Envelope Box
virtual void GetMinMaxForAbsoluteXYZ
// OpenGL Display mode
DISPLAY_MODE m_displayMode; // DM_SHADED, DM_WIREFRAME, DM_HLR
DISPLAY_MODE m_displayType; // DM_CULL, DM_NO_CULL

// OpenGL Material Properties
float m_R, m_G, m_B; // color values
GLfloat m_shininess;
GLfloat m_matAmbient [4];
GLfloat m_matSpecular [4];
GLfloat m_matEmitted [4];

// OpenGL Texture

// Pure virtual to force implementation
virtual int GenerateVertices () = 0;
virtual void CreateGLcalls () = 0;
virtual void GenerateVerticesAndCreateGLcalls
virtual bool GenerateCfdEdge
virtual bool ConvertToCfdEdges
virtual int GetPoints
virtual int GetEndPoints
virtual void DrawElemOneVpt

// Transformations
virtual void Translate
virtual void Scale
virtual void Rotate
virtual void Mirror
virtual void Jump
virtual void ApplyMatrixToModelMx

// Modify Element
void Show
void Wire
void Hide
UINT IsVisible
void ChangeColor
void ChangeLineStyle
void ChangeLineWidth
void ChangeFillPattern

// Member Access Functions
virtual void SetMxOrigin
virtual void SetMxAxisX
virtual void SetMxAxisY
virtual void SetMxAxisZ
virtual void SetMatrix
virtual CPoint3D GetMxAxisX
virtual CPoint3D GetMxAxisY
virtual CPoint3D GetMxAxisZ
virtual CPoint3D GetMxAxisNegZ
virtual CPoint3D GetMxOrigin
virtual CViewMatrix GetMatrix
virtual void MakeHomogeneousMatrix16
virtual void MakeHomogeneousMatrix16ColumnFirst

virtual CMat4x4 GetModelMxAs4x4
virtual CViewMatrix GetModelMxAs3x4

virtual void SetModelMx
virtual BOOL SetModelMx
virtual BOOL SetModelMx

ELEM_TYPE GetElemType
void Highlight
void Unhighlight
void SetGroup
bool GetGroup
virtual void HighlightVolumeColor ()
 

class CElemBase1D : public CELemBase

// Persistent Data
CPoint3D
m_mxOrigin; // Model matrix origin

// Transformations
virtual void Translate
virtual void Scale
virtual void Rotate
virtual void Mirror
virtual void Jump
virtual void ApplyMatrixToModelMx
virtual CViewMatrix GetModelMxAs3x4

virtual void GetMinMaxForAbsoluteXYZ

virtual void SetMxOrigin
virtual CPoint3D GetMxOrigin
virtual CMat4x4 GetModelMxAs4x4
virtual void SetModelMx
virtual void MakeHomogeneousMatrix16
virtual void MakeHomogeneousMatrix16ColumnFirst


class CElemBase2D : public CELemBase

// Persistent Data
CViewMatrix
m_matrix;

float m_width;
float m_height;
float m_radius;

int m_totalVertex;
CPoint2D* m_pVertex2D; // points to array containing vertex 2D[i]

// Envelope Box
CPoint3D m_envelopeBoxMax;
CPoint3D m_envelopeBoxMin;

virtual void GetMinMaxForAbsoluteXYZ

// Modify Element
void ModifyShape2d
virtual void Scale
virtual void Rotate
virtual void Mirror
virtual void Jump
virtual void ApplyMatrixToModelMx

void CalcNormal
void CreatePolygonWithNormal
CPoint3D GetMxTransformPoint
CPoint3D GetMxTransformVector
virtual void SetMxOrigin
virtual void SetMxAxisX
virtual void SetMxAxisY
virtual void SetMxAxisZ
virtual void SetMatrix
virtual CPoint3D GetMxOrigin
virtual CPoint3D GetMxAxisNegZ
virtual CViewMatrix GetMatrix
virtual void MakeHomogeneousMatrix16
virtual void MakeHomogeneousMatrix16ColumnFirst
virtual CMat4x4 GetModelMxAs4x4
virtual CViewMatrix GetModelMxAs3x4
virtual void SetModelMx

void SetWidth
void SetHeight
void SetRadius

float GetWidth
float GetHeight
float GetRadius

int GetTotalVertex2D
 

class CElemBase3D : public CELemBase2D

// Persistent Data
float
m_length;

// Re-generatable Data
CPoint3D* m_pVertex3D; // points to array containing vertex3D[i]
CPoint3D* m_pNormal3D; // points to array containing normal3D[i]

// Modify Element
void ModifyShape3D
void SetLength
float GetLength


 

CAD System Web Site - Computer Aided Design Software:  Copyright 2010-2013 Makoto Honda. All Rights Reserved.  

Copyright 2010-2013 Makoto Honda. All Rights Reserved.                                       www.iNET1000.com