A 3D Dynamic Geometry Software

Calques 3D C++



CCompositeObj3D Class Reference
[Calques 3D - Geometrical Objects]

Inheritance diagram for CCompositeObj3D:

Inheritance graph
Collaboration diagram for CCompositeObj3D:

Collaboration graph

List of all members.


Detailed Description

This is the main class.

Public Member Functions

virtual CObject3DCopyObject ()
 Create a clone of this object.
virtual DWORD isA () const
 Get the identifier representing the type of the object.
virtual void Serialize (CArchive &ar)
 Store and load the object into and from an archive.
virtual UINT GetNameID () const
 Get the resource ID of the string containing the default name of the object.
virtual UINT GetHelpID () const
 Get the resource ID of the string containing the designation of the object.
virtual UINT GetDefID () const
 Get the resource ID of the string containing the definition of the object.
virtual int SetObjectID (int nID)
 Set the object (unique) identifier.
virtual void SetHistoryVisibility ()
 Determine whether the object - as a composite constituent - is visible in the history.
virtual void SetVisible (BOOL bVis)
 Set the visibility of the object.
virtual void SetInGraph (BOOL bAdd=TRUE)
 Insert (or remove) this object into (or from) the dependence graph.
virtual BOOL IsInActiveArea (CPoint pt)
 Verify if the cursor lies within the active region of this object.
virtual BOOL IsInCalque (int CalcNum)
 Determine if the object is extracted in a given tracing.
virtual BOOL AddInCalque (int CalcNum, BOOL bAdd=TRUE)
 Add (or remove) the object to (or from) the given tracing.
virtual BOOL IsVisible ()
 Determine if the object is visible or not.
virtual CRgn * InvalideRect ()
 Create a GDI region covering this object.
virtual void GetDependList (CxObject3DSet *, BOOL bAll=TRUE)
 Get the list of all or immediate dependents of this object.
virtual void GetPolygons (CxObject3DSet *)
 Get the polygons defined in the object.
virtual void TranslateBy (CVector4 ptVec)
 Translate the position of this object by the specified vector.
virtual CObject3DHitTest (CPoint pt, UINT mask=0, int nCalcNum=0, BOOL bSub=TRUE, CxObject3DSet *pSet=NULL)
 Verify if this object is under the cursor.
virtual UINT CalculConceptuel ()
 Recompute the analytical representation of the object.
virtual void CalculVisuel (CVisualParam *)
 Recompute the graphical representation of the object (in the universe or tracing view).
virtual void Draw (CDC *, CVisualParam *vp, BOOL bSM=FALSE)
 Method CObject3D::Draw.
virtual void DrawSelected (CDC *pDC, CVisualParam *vp)
 Method CObject3D::DrawSelected.
virtual void HandleObjectError (int, BOOL bShow=FALSE)
 
Parameters:
errNo The error code generated by previous function calls.

virtual void DrawDepGraph (CDC *pDC, CImageList *pImgList=NULL, int nTrace=GRAPH_NONE, BOOL bDrawNode=TRUE, BOOL bDrawLink=TRUE)
 Method CObject3D::DrawDepGraph.
virtual HTREEITEM DrawHistory (CTreeCtrl &mListCtrl, HTREEITEM pParent=TVI_ROOT)
 Method CObject3D::DrawHistory.
virtual void Draw3DRendering (int nVolMode)
 Method CObject3D::Draw3DRendering.
virtual int SetProperties (CxObject3DSet *pSet=NULL)
 Call the property dialog box and modify the object's attributes.

Member Function Documentation

CObject3D * CopyObject (  )  [virtual]

Create a clone of this object.

Returns:
A pointer to the clone of this object.

Reimplemented from CObject3D.

Reimplemented in CCube3D, CInterSphDr3D, CDivSegment3D, CInterCircDr3D, and CInterCircPlane3D.

virtual DWORD isA (  )  const [inline, virtual]

Get the identifier representing the type of the object.

See TObject3DClass and others identifiers

Reimplemented from CObject3D.

Reimplemented in CCube3D, CInterSphDr3D, CDivSegment3D, CInterCircDr3D, CInterCircPlane3D, and CMacro3D.

void Serialize ( CArchive &  ar  )  [virtual]

Store and load the object into and from an archive.

Parameters:
ar A CArchive object to serialize to or from.

Reimplemented from CObject3D.

Reimplemented in CCube3D, CInterSphDr3D, CDivSegment3D, CInterCircDr3D, CInterCircPlane3D, and CMacro3D.

virtual UINT GetNameID (  )  const [inline, virtual]

Get the resource ID of the string containing the default name of the object.

Reimplemented from CObject3D.

Reimplemented in CCube3D.

virtual UINT GetHelpID (  )  const [inline, virtual]

Get the resource ID of the string containing the designation of the object.

Reimplemented from CObject3D.

Reimplemented in CCube3D.

virtual UINT GetDefID (  )  const [inline, virtual]

Get the resource ID of the string containing the definition of the object.

Reimplemented from CObject3D.

Reimplemented in CCube3D, CInterSphDr3D, CDivSegment3D, CInterCircDr3D, and CInterCircPlane3D.

int SetObjectID ( int  nID  )  [virtual]

Set the object (unique) identifier.

Parameters:
nID The new identifier for the object.
Returns:
The last identifier used by this object or one of its constituents (if any).

Reimplemented from CObject3D.

void SetHistoryVisibility (  )  [virtual]

Determine whether the object - as a composite constituent - is visible in the history.

Reimplemented from CObject3D.

void SetVisible ( BOOL  bVis  )  [virtual]

Set the visibility of the object.

Parameters:
bVis TRUE if the object is visible, FALSE otherwise

Reimplemented from CObject3D.

void SetInGraph ( BOOL  bAdd = TRUE  )  [virtual]

Insert (or remove) this object into (or from) the dependence graph.

The method maintains this object in the dependence graph resulting from its introduction in a construction. This method checks for the parents (if any) of this object and add it in their dependents list (or remove it from).

Parameters:
bAdd TRUE for adding the object, FALSE for removing it.

Reimplemented from CObject3D.

BOOL IsInActiveArea ( CPoint  pt  )  [virtual]

Verify if the cursor lies within the active region of this object.

Parameters:
pt The location - in view's coordinates - of the cursor.
Returns:
TRUE if the cursor is hovering the object, FALSE otherwise.

Reimplemented from CObject3D.

BOOL IsInCalque ( int  CalcNum  )  [virtual]

Determine if the object is extracted in a given tracing.

Parameters:
CalcNum The index of the tracing to check (0 <= CalcNum <= 3).
Returns:
TRUE if the object is in tracing CalcNum, FALSE otherwise.

Reimplemented from CObject3D.

BOOL AddInCalque ( int  CalcNum,
BOOL  bAdd = TRUE 
) [virtual]

Add (or remove) the object to (or from) the given tracing.

Parameters:
CalcNum The index of the tracing to check (0 <= CalcNum <= 3).
bAdd TRUE if the object is to be added, FALSE if the object is to be removed.
Returns:
TRUE if the object was properly added/removed, FALSE otherwise.

Reimplemented from CObject3D.

BOOL IsVisible (  )  [virtual]

Determine if the object is visible or not.

Returns:
TRUE if the object is visible, FALSE otherwise

Reimplemented from CObject3D.

CRgn * InvalideRect (  )  [virtual]

Create a GDI region covering this object.

Returns:
A new instance of an encompassing region.

Reimplemented from CObject3D.

void GetDependList ( CxObject3DSet pList,
BOOL  bAll = TRUE 
) [virtual]

Get the list of all or immediate dependents of this object.

Note that the list contains no duplicate object and is sorted by the object's depth (see AddObjToDependList).

Parameters:
pList A pointer to the object list to fill in.
bAll TRUE if exploring the complete graph, FALSE to explore only the direct children.

Reimplemented from CObject3D.

void GetPolygons ( CxObject3DSet pList  )  [virtual]

Get the polygons defined in the object.

This virtual method is for ensuring the detection of polygons embedded in composite object.

Parameters:
pList A pointer to the object list to fill in.

Reimplemented from CObject3D.

void TranslateBy ( CVector4  ptVec  )  [virtual]

Translate the position of this object by the specified vector.

Parameters:
ptVec A reference to the translation vector.

Reimplemented from CObject3D.

CObject3D * HitTest ( CPoint  pt,
UINT  mask = 0,
int  nCalcNum = 0,
BOOL  bSub = TRUE,
CxObject3DSet pSet = NULL 
) [virtual]

Verify if this object is under the cursor.

Parameters:
pt The location - in view's coordinates - of the cursor.
mask The mask used for object selection.
nCalcNum The identifier of the tracing associated with the view.
bSub TRUE if constituents of composites should be tested and retrieved, FALSE if only the composite itself is to be retrieved.
pSet A pointer to the list to be populated with all successfully tested objects.
Returns:
A pointer to the first object verifying the hit test.

Reimplemented from CObject3D.

UINT CalculConceptuel (  )  [virtual]

Recompute the analytical representation of the object.

Returns:
0 if the computation is correct, an error code otherwise.
See also:
Description of all Error Codes

Reimplemented from CObject3D.

Reimplemented in CCube3D, CInterSphDr3D, CDivSegment3D, CInterCircDr3D, and CInterCircPlane3D.

void CalculVisuel ( CVisualParam pVisParam  )  [virtual]

Recompute the graphical representation of the object (in the universe or tracing view).

Parameters:
pVisParam The visual parameters associated with the view.

Reimplemented from CObject3D.

Reimplemented in CCube3D, CInterSphDr3D, and CDivSegment3D.

void Draw ( CDC *  pDC,
CVisualParam vp,
BOOL  bSm = FALSE 
) [virtual]

Method CObject3D::Draw.

Parameters:
pDC A pointer to the device-context associated with the drawing view
vp A pointer to the visual parameters of the view
bSm TRUE if the object is displayed in a reduced form, FALSE otherwise

Reimplemented from CObject3D.

Reimplemented in CCube3D, CInterSphDr3D, CDivSegment3D, and CMacro3D.

void DrawSelected ( CDC *  pDC,
CVisualParam vp 
) [virtual]

Method CObject3D::DrawSelected.

Parameters:
pDC A pointer to the device-context associated with the drawing view
vp A pointer to the visual parameters of the view

Reimplemented from CObject3D.

void HandleObjectError ( int  errNo,
BOOL  bShow = FALSE 
) [virtual]

Parameters:
errNo The error code generated by previous function calls.

Parameters:
bShow TRUE if the error message is to be displayed, FALSE otherwise
See also:
Description of all Error Codes

Reimplemented from CObject3D.

void DrawDepGraph ( CDC *  pDC,
CImageList *  pImgList = NULL,
int  nTrace = GRAPH_NONE,
BOOL  bDrawNode = TRUE,
BOOL  bDrawLink = TRUE 
) [virtual]

Method CObject3D::DrawDepGraph.

Parameters:
pDC A pointer to the device-context associated with the drawing view
pImgList A pointer to the list of image containing the object's icons
nTrace The nature of the dependence graph to highlight (see TGraphType)
bDrawNode TRUE if this node is to be drawn, FALSE otherwise
bDrawLink TRUE if the link(s) associated with this node are drawn, FALSE otherwise

Reimplemented from CObject3D.

HTREEITEM DrawHistory ( CTreeCtrl &  mListCtrl,
HTREEITEM  pParent = TVI_ROOT 
) [virtual]

Method CObject3D::DrawHistory.

Parameters:
mListCtrl A reference to the Tree List Control
pParent A handler to the parent tree item for this object
Returns:
A handler to the tree item associated with this object.

Reimplemented from CObject3D.

void Draw3DRendering ( int  nVolMode  )  [virtual]

Method CObject3D::Draw3DRendering.

Todo:
Add the OpenGL representation for all objects

Reimplemented from CObject3D.

int SetProperties ( CxObject3DSet pSet = NULL  )  [virtual]

Call the property dialog box and modify the object's attributes.

Parameters:
pSet A pointer to the list of all objects in the construction.
Returns:
TRUE if attributes have been modified, FALSE otherwise

Reimplemented from CObject3D.

Reimplemented in CCube3D, and CMacro3D.