A 3D Dynamic Geometry Software

Calques 3D C++



CObject3D Class Reference
[Calques 3D - Geometrical Objects]

Inheritance diagram for CObject3D:

Inheritance graph
Collaboration diagram for CObject3D:

Collaboration graph

List of all members.


Detailed Description

Implements a generic 3-dimensional geometrical objects.

This class is the central piece of Calques 3D, specifying the properties and procedures that define the behavior of any geometrical objects.

Methods of this class are divided in several categories:

  • Identification of the object by defining its name, its description, its designation, etc.

Management of the object in the dependence graph that underlies any geometrical construction.

  • Calculation and verification of the analytical representation of the object
  • Display of the object in the different views available in Calques 3D
  • Definition and modification of the attributes (shape, color, etc.) of the object

All geometrical objects (like points, lines, cubes, etc.) are specializations of this class.


Serialization Functions

These functions are used to store/retrieve the geometrical object.

virtual void Serialize (CArchive &ar)
 Store and load the object into and from an archive.
virtual CObject3DSerializeObj (CArchive &ar)
 Called to serialize a parent, in the dependence graph, of the object.

Identification Functions

These functions are used to create and/or modify the dependence graph associated with a geometrical figure.

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 CString GetObjectDef ()
 Get the definition of the object.
virtual CString GetObjectHelp ()
 Get the designation of the object.
virtual CString GetObjectName ()
 Get the name of the object.
virtual CString GetObjectNameRedux ()
 Get a simplified name of the object.
virtual BOOL MaskObject (DWORD mask)
 Test if this object is filtered by the given combination of identifiers.
virtual DWORD isA () const
 Get the identifier representing the type of the object.

Dependence Graph Functions

These functions are used to create and/or modify the dependence graph associated with a geometrical figure.

virtual int SetDepth ()
 Update the depth of this object in the dependence graph.
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 BOOL AddObjToDependList (CxObject3DSet *pList)
 Add this object into the list of ordered, non-duplicate object.
virtual void SetInGraph (BOOL bAdd=TRUE)
 Insert (or remove) this object into (or from) the dependence graph.
virtual BOOL GraftOn (CObject3D *pNew)
 Graft this object to the designated target.
virtual BOOL ChangeParent (CObject3D *pOld, CObject3D *pNew, BOOL bUpGraph=FALSE)
 Change one of the parents of the object.
virtual BOOL SetParents (CxObject3DSet *pSet)
 Set the parents of the object.
virtual CxObject3DSetGetParents ()
 Get all the parents of this object from the dependence graph.

Analytical Functions

These functions are used to access or modify the analytical definition of the geometrical object: coordinates of the points, equations of the lines, etc.

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 GetRange (CVector4 &min, CVector4 &max)
 Recompute the definition range (in terms of spatial coordinates) of the object.
virtual BOOL IsEqual (CObject3D &other)
 Verify if this object is analytically identical to another one.
virtual UINT IsParallelTo (CObject3D *pObj)
 Verify if this object is analytically parallel to another one.
virtual UINT IsPerpendicularTo (CObject3D *pObj)
 Verify if this object is analytically perpendicular to another one.
virtual UINT IsAlignedWith (CObject3D *pObj1, CObject3D *pObj2)
 Verify if this object is analytically align with two other ones.
virtual void PrepareMoveObject (BOOL bMove=TRUE)
 Called by the framework, before or after the object is dragged in, to prepare or conclude its deformation.
virtual BOOL MoveObject (CVisualParam *pVisual, UINT nModKey, CPoint pt, CVector4 &loc)
 Called by the framework to perform the deformation of the object.
virtual void TranslateBy (CVector4 ptVec)
 Translate the position of this object by the specified vector.
virtual void CopyPointPosition (CObject3D *pObj)
 Apply - if adequate - the coordinates of the given object to this object.
virtual void CopyPointPosition (CVector4 ptLoc)
 Apply - if adequate - the coordinates of the given object to this object.

Region Functions

These functions are used, mostly in the Universe/Tracing views, to handle the detection of objects by mouse-clicks.

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 BOOL IsInActiveArea (CPoint pt)
 Verify if the cursor lies within the active region of this object.
virtual CRgn * InvalideRect ()
 Create a GDI region covering this object.
static CRgn * DoSegRgn (CPoint p1, CPoint p2)
 Method CObject3D::DoSegRgn.

Attribute/Information Functions

These functions are used to access or to modify the attributes of the geometrical object: name, color, shape, tracing, etc.

virtual BOOL IsVisible ()
 Determine if the object is visible or not.
virtual void SetVisible (BOOL bVis)
 Set the visibility of the object.
virtual void SetValidate (UINT nCode)
 Set the validity flag of the object.
virtual BOOL IsSelected ()
 Determine if the object is selected by the user or not.
virtual void SetSelected (BOOL bSel=TRUE)
 Set the selection flag for the 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 void SetName (CString strName)
 Set the name of the object.
virtual int SetObjectID (int nID)
 Set the object (unique) identifier.
virtual void SetColor (COLORREF rColor)
 Set the color of the object.
virtual COLORREF GetDefaultColor ()
 Get the default color associated with the object.
virtual void SetStyle (int nStyle)
 Set the shape of the object.
virtual int SetProperties (CxObject3DSet *pSet=NULL)
 Call the property dialog box and modify the object's attributes.
virtual void SetAttributes (CObject3DAttr pAttr)
 Set all the visual attributes associated with the object.
virtual CObject3DAttr GetAttributes ()
 Get the visual attributes associated with the object.
virtual CxSchemeSetGetRedefineSchemes (CxSchemeSet *pSet)
 Retrieve the list of possible redefinition schemes of the object.

Display Functions

These functions are used to display the geometrical object according to the format of the various views: Universe, Tracing, History, etc.

virtual void Draw (CDC *pDC, CVisualParam *vp, BOOL bSm=0)
 Method CObject3D::Draw.
virtual void DrawRetro (CDC *pDC, CVisualParam *vp)
 Method CObject3D::DrawRetro.
virtual void DrawSelected (CDC *pDC, CVisualParam *vp)
 Method CObject3D::DrawSelected.
virtual void SetHistoryVisibility ()
 Determine whether the object - as a composite constituent - is visible in the history.
virtual HTREEITEM DrawHistory (CTreeCtrl &mListCtrl, HTREEITEM pParent=TVI_ROOT)
 Method CObject3D::DrawHistory.
virtual void ClearHistory ()
virtual CString ExportSymbolic (int nFormat)
 Method CObject3D::ExportSymbolic.
virtual void DrawMathPad (CDC *)
 Method CObject3D::DrawMathPad.
virtual void Draw3DRendering (int nVolMode)
 Method CObject3D::Draw3DRendering.
virtual void DrawDepGraph (CDC *pDC, CImageList *pImgList=NULL, int nTrace=GRAPH_NONE, BOOL bDrawNode=TRUE, BOOL bDrawLink=TRUE)
 Method CObject3D::DrawDepGraph.
virtual void DrawDepGraphLink (CDC *pDC, CObject3D *pSrc=NULL, CObject3D *pDest=NULL, int nTrace=GRAPH_NONE)
 Method CObject3D::DrawDepGraphLink.
virtual void DrawDepGraphNode (CDC *pDC, CImageList *pImgList=NULL, CObject3D *pSrc=NULL, int nTrace=GRAPH_NONE)
 Method CObject3D::DrawDepGraphNode.
void DrawGraphArrow (CDC *pDC, CPoint ptStart, CPoint ptEnd, int nArrowSize, int nArrowlength, CBrush *pbrush)
 Method CObject3D::DrawGraphArrow.

Error Functions

These functions are used to provide information about errors resulting from the object construction or specification

virtual void HandleObjectError (int, BOOL bShow=FALSE)
 
Parameters:
errNo The error code generated by previous function calls.

virtual void TestAcces ()
 Notify the user-selection of this object.

Public Types

enum  TGraphType {
  GRAPH_NONE = 0, GRAPH_PARENT, GRAPH_CHILDREN, GRAPH_FULL,
  GRAPH_BASE
}
 Used to identify the type of graph highlighted with the object. More...
enum  TRenderType { RENDER_SILHOUETTE = 0, RENDER_FILL, RENDER_STIPPLE }
 Used to identify the rendering mode for volumes in the OpenGL view. More...
enum  TAttributeType {
  ATTRIB_NONE = 0, ATTRIB_NAME, ATTRIB_COLOR, ATTRIB_SHAPE,
  ATTRIB_MARK, ATTRIB_VISIBLE, ATTRIB_LOCUS
}
 Used to identify modification of the object's attribute(s). More...
enum  TExportType { EXPORT_MATHEMATICA = 0, EXPORT_MAPLE, EXPORT_DOT }
 Used to identify the format for the symbolic export of construction. More...

Public Member Functions

 CObject3D ()
 Default constructor.
 CObject3D (const CObject3D &)
 Copy constructor: build an object by duplicating the attributes of the target object.
virtual ~CObject3D ()
 Destructor.
virtual CObject3DCopyObject ()
 Create a clone of this object.

Public Attributes

BOOL bValidate
 TRUE if the object is analytically valid, FALSE otherwise.
BOOL bVisible
 TRUE if the object is visible, FALSE if it is hidden.
BOOL bMarked
 TRUE if the object has its visual marks activated, FALSE otherwise.
BOOL bDrawInGraph
 TRUE if the object can be displayed in the Graph, FALSE otherwise.
BOOL bNotInHisto
 TRUE if the object cannot be displayed in the History, FALSE otherwise.
BOOL bShowTrace
 TRUE if the visual marks of the object are displayed, FALSE otherwise.
unsigned nObjectId
 Unique ID of the object (usually index in the document list).
CString strObjectName
 Name of the object.
CString strObjectHelp
 Designation.
CString strObjectDef
 Definition.
CShape pObjectShape
 Shape and color of the object.
int nSortKind
 Sort order for object (0 Z-order, 1 depth).
int nDepth
 Depth of the object in the dependency graph.
int nCalque
 The object is extracted in Tracing X (bit X).
CObject3DpComposite
 Pointer to the composite this object belongs to, NULL if not.
HTREEITEM pHistItem
 Item in the History View.
CRect rGraphRect
 Location of the object in the Graph Window.
CxObject3DSet cDependList
 List of dependents.
CxVectorSet cTracePosition
 List of the object's coordinates, used for the trace.

Protected Attributes

BOOL bIsSelected
 TRUE if the object is selected, FALSE otherwise.

Member Enumeration Documentation

enum TGraphType

Used to identify the type of graph highlighted with the object.

See also:
CObject3D::DrawDepGraph()
Enumerator:
GRAPH_NONE  No particular highlighting.
GRAPH_PARENT  Highlight the parents of the object.
GRAPH_CHILDREN  Highlight the (direct) children of the object.
GRAPH_FULL  Highlight all the dependents of the object.
GRAPH_BASE  Highlight the base points connected to the object.

Used to identify the rendering mode for volumes in the OpenGL view.

See also:
CObject3D::Draw3DRendering()
Enumerator:
RENDER_SILHOUETTE  Volumes are rendered as wireframe.
RENDER_FILL  Volumes are rendered as plain solids.
RENDER_STIPPLE  Volumes are rendered as translucent shapes.

Used to identify modification of the object's attribute(s).

Enumerator:
ATTRIB_NONE  No attribute modified.
ATTRIB_NAME  The name of the object is modified.
ATTRIB_COLOR  The color of the object is modified.
ATTRIB_SHAPE  The shape of the object is modified.
ATTRIB_MARK  The visual mark(s) of the object is modified.
ATTRIB_VISIBLE  The visibility state of the object is modified.
ATTRIB_LOCUS  The size of the locus is modified.

Used to identify the format for the symbolic export of construction.

See also:
CObject3D::ExportSymbolic()
Enumerator:
EXPORT_MATHEMATICA  Mathematica export - used for property discovery.
EXPORT_MAPLE  Maple export - used for property discovery.
EXPORT_DOT  DOT export - used for graph visualization.


Constructor & Destructor Documentation

CObject3D (  ) 

Default constructor.

CObject3D ( const CObject3D mObj  ) 

Copy constructor: build an object by duplicating the attributes of the target object.

Parameters:
mObj A reference to the object to copy

~CObject3D (  )  [virtual]

Destructor.


Member Function Documentation

CObject3D * SerializeObj ( CArchive &  ar  )  [virtual]

Called to serialize a parent, in the dependence graph, of the object.

Storing a parent is simply done by serializing its index in the dependence graph. Loading the parent consist in retrieving the object by its index from the global storage (GLOBALObjectSet) build step-by-step when the construction is loaded. See CCalques3DDoc::Serialize for more information about this procedure,

Parameters:
ar A CArchive object to serialize to or from.
Returns:
A pointer to the stored/retrieved parent.

UINT GetNameID (  )  const [virtual]

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

Reimplemented in CCercle3D, CCompositeObj3D, CCube3D, CCone3D, CCylinder3D, CDroite3D, CSegment3D, CLocus3D, CPlan3D, CPoint3D, CSphere3D, CText3D, and CVector3D.

UINT GetHelpID (  )  const [virtual]

CString GetObjectDef (  )  [virtual]

Get the definition of the object.

The definition of an object is a string containing a complete description of the object, including references to the objects to which it depends for its construction. Names of the objects and its parents are automatically updated. For example, a segment will be defined by "S is a segment line going through A and B". This definition is mainly used to populate the History view (see CViewHisto) and the status bar when an object is designated (see CViewUniv::OnUpdateObjTooltip).

Reimplemented in CCercle3D, CArcCercle3D, CEllipse3D, CCercleInterSS3D, CCercleInterPS3D, CCube3D, CInterSphDr3D, CDivSegment3D, CInterCircDr3D, CInterCircPlane3D, CCone3D, CCylinder3D, CDroite3D, CDroiteInterPP3D, CDroitePerpDD3D, CDroitePerp3D, CLocus3D, CMacro3D, CPlan3D, CPlanPerp3D, CPolygon3D, CPointMilieu3D, CPointSurD3D, CPointSurC3D, CPointSurP3D, CPointSurS3D, CPointSurCyl3D, CPointInterDD3D, CPointInterDP3D, CPointCenter3D, CPointSymetric3D, CPointTranslat3D, CSphere3D, and CVector3D.

CString GetObjectHelp (  )  [virtual]

Get the designation of the object.

The designation of an object is a short string containing its name and its type. For example, a segment will be designated by "The segment S". The designation is mainly used in the tooltips appearing in the views when the user designates the object (see CViewUniv::OnUpdateObjTooltip).

Reimplemented in CMacro3D.

CString GetObjectName (  )  [virtual]

Get the name of the object.

The method returns a string containing either the name as edited by the user (and stored in strObjectName) or, if empty, the default name as retrieved by GetNameID,

Reimplemented in CMacro3D.

CString GetObjectNameRedux (  )  [virtual]

Get a simplified name of the object.

The method returns a string containing a simplified version of the name.

BOOL MaskObject ( DWORD  mask  )  [virtual]

Test if this object is filtered by the given combination of identifiers.

This methods, coupled with the bitwise definition of the object identifiers (see isA), allows a fast selection of particular object types in a list.

All identifiers have a common form : MAKELONG(X,Y), where

  • X (low-order) is the category of the object (i.e. point, line, sphere, etc.)
  • Y (high-order) is the particular type of the object (i.e. point on a line, etc.)
  • Y=1 if the identifier related to the generic type (ie all points)
  • X=1 and Y=1 for the generic object (TObject3DClass)

The mask is a combination of object identifiers describing all the possible objects that could be recognized. For easier definition, some of the generic combinations have been hard-coded in the identifiers (see TAllPointClass for retrieving all points, TAllDroiteClass for all lines, etc.). This method combine bitwise both the mask and the object identifier in order to verify if this object is recognized by the mask.

Parameters:
mask A bitwise combination of object identifiers
Returns:
TRUE if this object fits the mask, FALSE otherwise.

int SetDepth (  )  [virtual]

Update the depth of this object in the dependence graph.

Basically, the depth of an object is either 0 if it has no parents or the maximum of its parents' depth +1.

Returns:
The current depth of this object

Reimplemented in CCercle3D, CEllipse3D, CCercleInterSS3D, CCercleInterPS3D, CCube3D, CInterSphDr3D, CDivSegment3D, CInterCircDr3D, CInterCircPlane3D, CCone3D, CCylinder3D, CDroite3D, CDroiteInterPP3D, CDroitePerpDD3D, CDroitePerp3D, CLocus3D, CMacro3D, CPlan3D, CPlanPerp3D, CPolygon3D, CPoint3D, CPointCalc3D, CPointMilieu3D, CPointSurD3D, CPointSurC3D, CPointSurP3D, CPointSurS3D, CPointSurCyl3D, CPointInterDD3D, CPointInterDP3D, CPointCenter3D, CPointSymetric3D, CPointTranslat3D, CSphere3D, and CVector3D.

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 in CCompositeObj3D.

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 in CCompositeObj3D, and CPolygon3D.

BOOL AddObjToDependList ( CxObject3DSet pList  )  [virtual]

Add this object into the list of ordered, non-duplicate object.

The object is added to the list only if not yet included and at a position sorted by increasing depth.

Parameters:
pList A pointer to the object list to fill in.
Returns:
TRUE if the object has been added, FALSE otherwise

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 in CCompositeObj3D.

BOOL GraftOn ( CObject3D pNew  )  [virtual]

Graft this object to the designated target.

Reimplemented in CPoint3D.

BOOL ChangeParent ( CObject3D pOld,
CObject3D pNew,
BOOL  bUpGraph = FALSE 
) [virtual]

Change one of the parents of the object.

Parameters:
pOld A pointer to the parent object to change.
pNew A pointer to the object to replace the current parent with.
bUpGraph TRUE if the dependence graph needs to be updated, FALSE otherwise
Returns:
TRUE is the parent has been properly changed, FALSE otherwise

Reimplemented in CCercle3D, CCube3D, CCylinder3D, CDroite3D, CLocus3D, CMacro3D, CPlan3D, CPolygon3D, CPointMilieu3D, CPointInterDP3D, CPointSymetric3D, CPointTranslat3D, CSphere3D, CLabel3D, CEquation3D, CDistance3D, and CAngle3D.

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 in CCercle3D, CCompositeObj3D, CCube3D, CInterSphDr3D, CDivSegment3D, CCone3D, CCylinder3D, CDroite3D, CDroiteInterPP3D, CLocus3D, CPlan3D, CPolygon3D, CPoint3D, CSphere3D, CText3D, CLabel3D, CEquation3D, CDistance3D, CAngle3D, CComment3D, and CVector3D.

void GetRange ( CVector4 min,
CVector4 max 
) [virtual]

Recompute the definition range (in terms of spatial coordinates) of the object.

Parameters:
min The minimum coordinates of the objects in the X, Y and Z axis.
max The maximum coordinates of the objects in the X, Y and Z axis.

Reimplemented in CCube3D, CInterSphDr3D, CDivSegment3D, CPlan3D, CPolygon3D, CPoint3D, and CSphere3D.

BOOL IsEqual ( CObject3D other  )  [virtual]

Verify if this object is analytically identical to another one.

Parameters:
other A reference to the object to compare with this one.
Returns:
TRUE if both object are analytically the same, FALSE otherwise

Reimplemented in CCercle3D, CArcCercle3D, CEllipse3D, CCercleInterSS3D, CCercleInterPS3D, CCube3D, CInterSphDr3D, CDivSegment3D, CInterCircDr3D, CCylinder3D, CDroite3D, CLocus3D, CPlan3D, CPoint3D, CSphere3D, and CVector3D.

UINT IsParallelTo ( CObject3D pObj  )  [virtual]

Verify if this object is analytically parallel to another one.

Parameters:
pObj A pointer to the object to compare with this one.
Returns:
The code for the property verification
See also:
Relation Verification Codes

Reimplemented in CDroite3D, and CPlan3D.

UINT IsPerpendicularTo ( CObject3D pObj  )  [virtual]

Verify if this object is analytically perpendicular to another one.

Parameters:
pObj A pointer to the object to compare with this one.
Returns:
The code for the property verification
See also:
Relation Verification Codes

Reimplemented in CDroite3D, and CPlan3D.

UINT IsAlignedWith ( CObject3D pObj1,
CObject3D pObj2 
) [virtual]

Verify if this object is analytically align with two other ones.

Parameters:
pObj1 A pointer to the first object to compare with this one.
pObj2 A pointer to the second object to compare with this one.
Returns:
The code for the property verification
See also:
Relation Verification Codes

Reimplemented in CPoint3D.

void PrepareMoveObject ( BOOL  bMove = TRUE  )  [virtual]

Called by the framework, before or after the object is dragged in, to prepare or conclude its deformation.

Parameters:
bMove TRUE if the object is being dragged in, FALSE if it is being released.

Reimplemented in CCube3D.

BOOL MoveObject ( CVisualParam pVisual,
UINT  nModKey,
CPoint  pt,
CVector4 loc 
) [virtual]

Called by the framework to perform the deformation of the object.

Parameters:
pVisual A pointer to the visual parameters of the view the deformation is taking place in.
nModKey Indicates whether various virtual keys are down.
pt The location - in view coordinates - of the cursor during deformation
loc A reference to the 3D coordinate corresponding to the new object's location.
Returns:
TRUE if the deformation took place, FALSE otherwise

Reimplemented in CPoint3D, CPointSurD3D, CPointSurC3D, CPointSurP3D, CPointSurS3D, and CPointSurCyl3D.

void TranslateBy ( CVector4  ptVec  )  [virtual]

Translate the position of this object by the specified vector.

Parameters:
ptVec A reference to the translation vector.

Reimplemented in CCompositeObj3D, and CPoint3D.

void CopyPointPosition ( CObject3D pObj  )  [virtual]

Apply - if adequate - the coordinates of the given object to this object.

Parameters:
pObj A pointer to the object whose coordinates will be duplicated.

Reimplemented in CPoint3D, CPointSurD3D, CPointSurC3D, CPointSurP3D, CPointSurS3D, and CPointSurCyl3D.

void CopyPointPosition ( CVector4  ptLoc  )  [virtual]

Apply - if adequate - the coordinates of the given object to this object.

Parameters:
ptLoc The 3D coordinates to apply to this object.

Reimplemented in CPoint3D, CPointSurD3D, CPointSurC3D, CPointSurP3D, CPointSurS3D, and CPointSurCyl3D.

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 in CCompositeObj3D.

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 in CCercle3D, CCompositeObj3D, CCone3D, CCylinder3D, CDroite3D, CDemiDroite3D, CLocus3D, CPlan3D, CPolygon3D, CPoint3D, CSphere3D, CText3D, and CVector3D.

CRgn * InvalideRect (  )  [virtual]

Create a GDI region covering this object.

Returns:
A new instance of an encompassing region.

Reimplemented in CCercle3D, CCompositeObj3D, CDroite3D, CSegment3D, CLocus3D, CPlan3D, CPoint3D, CSphere3D, CText3D, and CVector3D.

CRgn * DoSegRgn ( CPoint  p1,
CPoint  p2 
) [static]

Method CObject3D::DoSegRgn.

Parameters:
p1 The location of the first end of the segment
p2 The location of the second end of the segment
Returns:
A pointer to the region defined by the two points

BOOL IsVisible (  )  [virtual]

Determine if the object is visible or not.

Returns:
TRUE if the object is visible, FALSE otherwise

Reimplemented in CCompositeObj3D.

void SetVisible ( BOOL  bVis  )  [virtual]

Set the visibility of the object.

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

Reimplemented in CCompositeObj3D.

void SetValidate ( UINT  nCode  )  [virtual]

Set the validity flag of the object.

Parameters:
nCode The error code generated by the CalculConceptuel() method, 0 if no error.

BOOL IsSelected (  )  [virtual]

Determine if the object is selected by the user or not.

Returns:
TRUE if the object is selected, FALSE otherwise

void SetSelected ( BOOL  bSel = TRUE  )  [virtual]

Set the selection flag for the object.

Parameters:
bSel TRUE if the object is selected, FALSE otherwise

Reimplemented in CEquation3D, CDistance3D, and CAngle3D.

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 in CCompositeObj3D.

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 in CCompositeObj3D.

void SetName ( CString  strName  )  [virtual]

Set the name of the object.

Parameters:
strName The new name for the object.
Todo:
Need to do some duplication check.

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 in CCompositeObj3D.

void SetColor ( COLORREF  rColor  )  [virtual]

Set the color of the object.

Parameters:
rColor The new color for the object.

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

COLORREF GetDefaultColor (  )  [virtual]

Get the default color associated with the object.

Returns:
The default color (RGB)

Reimplemented in CCercle3D, CDroite3D, and CPoint3D.

void SetStyle ( int  nStyle  )  [virtual]

Set the shape of the object.

Parameters:
nStyle The new shape for the object.

Reimplemented in CCube3D, CInterSphDr3D, CDivSegment3D, and CInterCircDr3D.

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 in CCompositeObj3D, CCube3D, CCone3D, CCylinder3D, CMacro3D, CText3D, CEquation3D, CComment3D, and CMathOp3D.

void SetAttributes ( CObject3DAttr  pAttr  )  [virtual]

Set all the visual attributes associated with the object.

Parameters:
pAttr An instance of the attribute class containing the objet's new description

CObject3DAttr GetAttributes (  )  [virtual]

Get the visual attributes associated with the object.

Returns:
An instance of the attribute class containing the objet's description

CxSchemeSet * GetRedefineSchemes ( CxSchemeSet pSet  )  [virtual]

Retrieve the list of possible redefinition schemes of the object.

Parameters:
pSet A pointer to the current list of schemes to be populated.
Returns:
A pointer to the populated list of schemes.

Reimplemented in CPoint3D, CPointCalc3D, CPointMilieu3D, CPointSur3D, CPointSurD3D, CPointSurP3D, CPointInterDD3D, CPointInterDP3D, CPointCenter3D, CPointSymetric3D, and CPointTranslat3D.

void Draw ( CDC *  pDC,
CVisualParam vp,
BOOL  bSm = 0 
) [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 in CCercle3D, CCompositeObj3D, CCube3D, CInterSphDr3D, CDivSegment3D, CCone3D, CCylinder3D, CDroite3D, CDroitePerp3D, CLocus3D, CMacro3D, CPlan3D, CPlanPerp3D, CPolygon3D, CPoint3D, CSphere3D, CText3D, CLabel3D, CEquation3D, CDistance3D, CAngle3D, CVolume3D, CArea3D, CComment3D, CMathOp3D, and CVector3D.

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

Method CObject3D::DrawRetro.

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

Reimplemented in CCone3D, CCylinder3D, CPlan3D, CPolygon3D, CPoint3D, CPointSurC3D, CPointSurP3D, CPointSurS3D, CPointSurCyl3D, and CSphere3D.

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 in CCompositeObj3D, and CPoint3D.

void SetHistoryVisibility (  )  [virtual]

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

Reimplemented in CCompositeObj3D.

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 in CCompositeObj3D, CText3D, and CEquation3D.

CString ExportSymbolic ( int  nFormat  )  [virtual]

void DrawMathPad ( CDC *   )  [virtual]

Method CObject3D::DrawMathPad.

Parameters:
pDC A pointer to the device-context associated with the drawing view

Reimplemented in CEquation3D, CDistance3D, CAngle3D, CVolume3D, CArea3D, CComment3D, and CMathOp3D.

void Draw3DRendering ( int  nVolMode  )  [virtual]

Method CObject3D::Draw3DRendering.

Todo:
Add the OpenGL representation for all objects

Reimplemented in CCercle3D, CEllipse3D, CCompositeObj3D, CCone3D, CCylinder3D, CDroite3D, CLocus3D, CPlan3D, CPolygon3D, CPoint3D, and CSphere3D.

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 in CCompositeObj3D, and CText3D.

void DrawDepGraphLink ( CDC *  pDC,
CObject3D pSrc = NULL,
CObject3D pDest = NULL,
int  nTrace = GRAPH_NONE 
) [virtual]

Method CObject3D::DrawDepGraphLink.

Parameters:
pDC A pointer to the device-context associated with the drawing view
pSrc A pointer to the initial object in the link
pDest A pointer to the destination object in the link
nTrace The nature of the dependence graph to highlight (see TGraphType)

void DrawDepGraphNode ( CDC *  pDC,
CImageList *  pImgList = NULL,
CObject3D pSrc = NULL,
int  nTrace = GRAPH_NONE 
) [virtual]

Method CObject3D::DrawDepGraphNode.

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
pSrc A pointer to the source object
nTrace The nature of the dependence graph to highlight (see TGraphType)
Deprecated:
Not in use anymore, see DrawDepGraph).

void DrawGraphArrow ( CDC *  pDC,
CPoint  ptStart,
CPoint  ptEnd,
int  nArrowSize,
int  nArrowlength,
CBrush *  pbrush 
)

Method CObject3D::DrawGraphArrow.

Parameters:
pDC A pointer to the device-context associated with the drawing view
ptStart The starting point for the arrow
ptEnd The end point for the arrow
nArrowSize The size of the arrow
nArrowlength The length of the arrow
pbrush A pointer to the burhs to use of drawing the arrow

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 in CCompositeObj3D, CPlan3D, and CPointCalc3D.

void TestAcces (  )  [virtual]

Notify the user-selection of this object.

Deprecated:
Not in use anymore.


Member Data Documentation

BOOL bValidate

TRUE if the object is analytically valid, FALSE otherwise.

BOOL bVisible

TRUE if the object is visible, FALSE if it is hidden.

BOOL bMarked

TRUE if the object has its visual marks activated, FALSE otherwise.

TRUE if the object can be displayed in the Graph, FALSE otherwise.

TRUE if the object cannot be displayed in the History, FALSE otherwise.

BOOL bShowTrace

TRUE if the visual marks of the object are displayed, FALSE otherwise.

unsigned nObjectId

Unique ID of the object (usually index in the document list).

CString strObjectName

Name of the object.

CString strObjectHelp

Designation.

CString strObjectDef

Definition.

Shape and color of the object.

int nSortKind

Sort order for object (0 Z-order, 1 depth).

Deprecated:
Not used anymore

int nDepth

Depth of the object in the dependency graph.

int nCalque

The object is extracted in Tracing X (bit X).

Pointer to the composite this object belongs to, NULL if not.

HTREEITEM pHistItem

Item in the History View.

CRect rGraphRect

Location of the object in the Graph Window.

List of dependents.

List of the object's coordinates, used for the trace.

BOOL bIsSelected [protected]

TRUE if the object is selected, FALSE otherwise.