2612 lines
68 KiB
C++
2612 lines
68 KiB
C++
/*
|
||
------------------------------------------------------------------------------------------
|
||
IMPLEMENTATION FILE FOR :
|
||
Definition of (way) editor object : circle arc curves.
|
||
------------------------------------------------------------------------------------------
|
||
File Name :
|
||
Edi_CiAr.c
|
||
------------------------------------------------------------------------------------------
|
||
Creation Date :
|
||
February 25,1997
|
||
Author :
|
||
Albert PAIS
|
||
------------------------------------------------------------------------------------------
|
||
Contents :
|
||
This file implements structures and functions for the circle arc curve used by
|
||
the (way) editor.
|
||
------------------------------------------------------------------------------------------
|
||
Remarks :
|
||
Code comes from old circway.c made by Yann Le Tensorer (January-February 1997)
|
||
------------------------------------------------------------------------------------------
|
||
See Also :
|
||
* Mth_CiAr.h/.c for mathematical circle arc curve definition and implementation.
|
||
------------------------------------------------------------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
------------------------------------------------------------------------------------------
|
||
*/
|
||
|
||
/*
|
||
------------------------------------------------------------------------------------------
|
||
INCLUDE FILES :
|
||
------------------------------------------------------------------------------------------
|
||
*/
|
||
|
||
/*
|
||
----------------------------------------
|
||
File Name :
|
||
acp_base.h
|
||
----------------------------------------
|
||
Required for :
|
||
Standard CPA definitions
|
||
----------------------------------------
|
||
*/
|
||
#include "acp_base.h"
|
||
|
||
/*
|
||
----------------------------------------
|
||
File Name :
|
||
gli.h
|
||
----------------------------------------
|
||
Required for :
|
||
Graphic Library Interface
|
||
----------------------------------------
|
||
*/
|
||
#include "geo.h"
|
||
#include "gli.h"
|
||
|
||
/*
|
||
----------------------------------------
|
||
File Name :
|
||
Edi_CiAr.h
|
||
----------------------------------------
|
||
Required for :
|
||
Definition of circle arc editor
|
||
structures and functions
|
||
----------------------------------------
|
||
*/
|
||
#define _EDWAY_CIRCLEARC_FRIEND_
|
||
#include "Edi_CiAr.h"
|
||
#undef _EDWAY_CIRCLEARC_FRIEND_
|
||
|
||
|
||
|
||
|
||
/*
|
||
----------------------------------------
|
||
File Name :
|
||
geoobj.h
|
||
----------------------------------------
|
||
Required for :
|
||
For geometric object
|
||
----------------------------------------
|
||
*/
|
||
#include "geo.h"
|
||
|
||
/*
|
||
----------------------------------------
|
||
File Name :
|
||
Mth_CiAr.h
|
||
----------------------------------------
|
||
Required for :
|
||
For MTH Circle Arc Curve definitions
|
||
----------------------------------------
|
||
*/
|
||
#include "Mth_CiAr.h"
|
||
|
||
/*
|
||
------------------------------------------------------------------------------------------
|
||
FUNCTIONS AND MACROS-FUNCTIONS DECLARATION:
|
||
------------------------------------------------------------------------------------------
|
||
*/
|
||
|
||
#define M_malloc(pointer,cast,size) (pointer=(cast)malloc(size))
|
||
#define M_free(pointer) (free(pointer))
|
||
|
||
|
||
int iJustToLinkCiArBidouille;
|
||
void JustToLinkCiAr (void) { iJustToLinkCiArBidouille=1; }
|
||
|
||
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Allocates a new editor circle arc
|
||
structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnh_CircleArcObject_CreateSturcture
|
||
---------------------------------------
|
||
Arguments :
|
||
* None
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
EDWAY_tdhCircleArcObject
|
||
* Possible Value :
|
||
* A valid handle (non-null)
|
||
The function succeded
|
||
* An invalid handle (null value)
|
||
Allocation failed.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26,1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
EDWAY_tdhCircleArcObject EDWAY_fnh_CircleArcObject_CreateSturcture(void)
|
||
{
|
||
EDWAY_tdhCircleArcObject hNewCircleArcObject;
|
||
M_malloc(hNewCircleArcObject,EDWAY_tdhCircleArcObject,EDWAY_M_uwCircleArcObjectSizeOf());
|
||
if(hNewCircleArcObject)
|
||
memset(hNewCircleArcObject,0,EDWAY_M_uwCircleArcObjectSizeOf());
|
||
return hNewCircleArcObject;
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Destroy the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_DestroyStructure
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hOldCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on an editor
|
||
circle arc object to destroy
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26,1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
----------------------------------------
|
||
Remarks :
|
||
* Allocation done inside the structure
|
||
is not freed in this function. A previous
|
||
call to EDWAY_fnv_CircleArcObject_Free
|
||
should be done.
|
||
----------------------------------------
|
||
See Also :
|
||
* EDWAY_fnv_CircleArcObject_Free
|
||
----------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_DestroyStructure
|
||
(EDWAY_tdhCircleArcObject _hOldCircleArcObject)
|
||
{
|
||
/* avoid crash */
|
||
if(_hOldCircleArcObject==0)
|
||
return;
|
||
M_free(_hOldCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Create CircleArc curve (in ram only)
|
||
between two points.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_Create
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _EDWAY_hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on an editor
|
||
cirlce arc object
|
||
* Name : _ucSamplingRate
|
||
Type : unsigned char
|
||
Meaning : The sampling rate of the
|
||
circle arc curve
|
||
* Name : _p_stStartPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : A valid pointer to the
|
||
starting point of the circle
|
||
arc curve to create.
|
||
* Name : _p_stEndPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : a valid pointer to the
|
||
starting point of the circle
|
||
arc curve to create.
|
||
* Name : _p_stCenterPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : a valid pointer to the
|
||
center of the circle
|
||
arc curve to create.
|
||
* Name : _ucObjectMode
|
||
Type : unsigned char
|
||
Meaning : The object mode (real or no object).
|
||
* Name : _p_stDynamParams
|
||
Type : ACP_tdstDynaParam*
|
||
Meaning : A pointer to the dynamic
|
||
parameters associated.
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 25,1997
|
||
* Author :
|
||
Albert Pais
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_Create
|
||
(
|
||
EDWAY_tdhCircleArcObject _EDWAY_hCircleArcObject,
|
||
unsigned char _ucSamplingRate,
|
||
MTH3D_tdstVector*_p_stStartPoint,
|
||
MTH3D_tdstVector*_p_stEndPoint,
|
||
MTH3D_tdstVector*_p_stCenterPoint,
|
||
unsigned char _ucObjectMode,
|
||
ACP_tdstDynaParam*_p_stDynamParams,
|
||
MTH3D_tdstVector** pdstListOfPoints
|
||
)
|
||
{
|
||
MTH3D_tdhCircleArcCurve hCircleArcCurve;
|
||
MTH3D_tdstMatrix stLocalMatrix,stInvLocalMatrix;
|
||
MTH3D_tdstVector stLocalStart,stLocalEnd;
|
||
GEO_tdstDoubledIndex xLineDoubleIndex;
|
||
long xCurVertex;
|
||
/* avoiding crash and errors :*/
|
||
if
|
||
(
|
||
(!_EDWAY_hCircleArcObject)
|
||
||(!_p_stStartPoint)
|
||
||(!_p_stEndPoint)
|
||
||(!_p_stCenterPoint)
|
||
)
|
||
return;
|
||
/* build a new circle arc curve object :*/
|
||
hCircleArcCurve = MTH3D_fnh_CircleArcCurve_Create();
|
||
if(!hCircleArcCurve)
|
||
return;
|
||
MTH3D_fnv_CircleArcCurve_Init
|
||
(
|
||
hCircleArcCurve,
|
||
_ucSamplingRate,
|
||
_p_stStartPoint,
|
||
_p_stEndPoint,
|
||
_p_stCenterPoint
|
||
);
|
||
/* compute local information :*/
|
||
MTH3D_fnv_CircleArcCurve_ComputeLocalInformation
|
||
(
|
||
hCircleArcCurve,
|
||
&stLocalMatrix,
|
||
&stLocalStart,
|
||
&stLocalEnd,
|
||
&stInvLocalMatrix
|
||
);
|
||
/* Process angle :*/
|
||
EDWAY_M_vCircleArcObjectSetMainAngle
|
||
(
|
||
_EDWAY_hCircleArcObject,
|
||
MTH3D_fnx_CircleArcCurve_ComputeMainAngle(hCircleArcCurve)
|
||
);
|
||
/* set other fields :*/
|
||
EDWAY_M_vCircleArcObjectSetCircleArcCurve(_EDWAY_hCircleArcObject,hCircleArcCurve);
|
||
EDWAY_M_vCircleArcObjectSetDynaParams(_EDWAY_hCircleArcObject,_p_stDynamParams);
|
||
EDWAY_M_vCircleArcObjectSetLocalRepere(_EDWAY_hCircleArcObject,&stLocalMatrix);
|
||
EDWAY_M_vCircleArcObjectSetInvLocalRepere(_EDWAY_hCircleArcObject,&stInvLocalMatrix);
|
||
EDWAY_M_vCircleArcObjectSetLocalStartPoint(_EDWAY_hCircleArcObject,&stLocalStart);
|
||
EDWAY_M_vCircleArcObjectSetLocalEndPoint(_EDWAY_hCircleArcObject,&stLocalEnd);
|
||
EDWAY_M_vCircleArcObjectSetObjectMode(_EDWAY_hCircleArcObject,_ucObjectMode);
|
||
_EDWAY_hCircleArcObject->m_pdstListOfPoints = pdstListOfPoints;
|
||
|
||
/* Depending on other fields :*/
|
||
if(_ucObjectMode==EDWAY_C_ucModeNoObject)
|
||
{/* mode is MODE_NO_OBJECT */
|
||
/* allocates ram only for points list and dynamic parameters */
|
||
M_malloc
|
||
(
|
||
// EDWAY_M_dstCircleArcObjectGetListOfPoints(_EDWAY_hCircleArcObject),
|
||
*_EDWAY_hCircleArcObject->m_pdstListOfPoints,
|
||
MTH3D_tdstVector*,
|
||
(_ucSamplingRate+1)*sizeof(MTH3D_tdstVector)
|
||
);
|
||
}
|
||
else
|
||
{/* else mode is MODE_REAL_OBJET */
|
||
/* creates the geometric object */
|
||
|
||
/* This list of points is not used */
|
||
// EDWAY_M_vCircleArcObjectSetListOfPoints(_EDWAY_hCircleArcObject,0);
|
||
*_EDWAY_hCircleArcObject->m_pdstListOfPoints = 0;
|
||
|
||
/* create object with 1 element (lines only), and ucSamplingRate+1 points) */
|
||
GEO_vCreateGeometricObject
|
||
(&EDWAY_M_hCircleArcObjectGetGeometricObject(_EDWAY_hCircleArcObject),_ucSamplingRate+1,1);
|
||
/* create line element*/
|
||
GEO_xCreateElementLines
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetGeometricObject(_EDWAY_hCircleArcObject),
|
||
&EDWAY_M_hCircleArcObjectGetLineElement(_EDWAY_hCircleArcObject),
|
||
_ucSamplingRate
|
||
);
|
||
/* create lines indexes */
|
||
for (xCurVertex=0;xCurVertex<_ucSamplingRate;xCurVertex++)
|
||
{
|
||
/* define start and end vertex of a line */
|
||
xLineDoubleIndex.a2_xIndex[0]=xCurVertex;
|
||
xLineDoubleIndex.a2_xIndex[1]=xCurVertex+1;
|
||
/* set line index */
|
||
GEO_xSetIndexOfElementLines
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetGeometricObject(_EDWAY_hCircleArcObject),
|
||
EDWAY_M_hCircleArcObjectGetLineElement(_EDWAY_hCircleArcObject),
|
||
xCurVertex,
|
||
&xLineDoubleIndex
|
||
);
|
||
}
|
||
}
|
||
EDWAY_fnv_CircleArcObject_Calculate(_EDWAY_hCircleArcObject);
|
||
}
|
||
|
||
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Create CircleArc curve (in ram only)
|
||
between two points.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_CreateFromCurve
|
||
---------------------------------------
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
April 10,1997
|
||
* Author :
|
||
Jacques Th<54>noz
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_CreateFromCurve
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdhCircleArcCurve _hCircleArcCurve,
|
||
unsigned char _ucObjectMode,
|
||
ACP_tdstDynaParam* _pstDynaParams,
|
||
MTH3D_tdstVector** pdstListOfPoints
|
||
)
|
||
{
|
||
unsigned char _ucSamplingRate = MTH3D_fnuc_CircleArcCurve_GetSamplingRate (_hCircleArcCurve);
|
||
MTH3D_tdstMatrix stLocalMatrix,stInvLocalMatrix;
|
||
MTH3D_tdstVector stLocalStart,stLocalEnd;
|
||
GEO_tdstDoubledIndex xLineDoubleIndex;
|
||
long xCurVertex;
|
||
|
||
/* compute local information :*/
|
||
MTH3D_fnv_CircleArcCurve_ComputeLocalInformation
|
||
(
|
||
_hCircleArcCurve,
|
||
&stLocalMatrix,
|
||
&stLocalStart,
|
||
&stLocalEnd,
|
||
&stInvLocalMatrix
|
||
);
|
||
/* Process angle :*/
|
||
EDWAY_M_vCircleArcObjectSetMainAngle
|
||
(
|
||
_hCircleArcObject,
|
||
MTH3D_fnx_CircleArcCurve_ComputeMainAngle(_hCircleArcCurve)
|
||
);
|
||
/* set other fields :*/
|
||
EDWAY_M_vCircleArcObjectSetCircleArcCurve(_hCircleArcObject,_hCircleArcCurve);
|
||
EDWAY_M_vCircleArcObjectSetDynaParams(_hCircleArcObject,_pstDynaParams);
|
||
EDWAY_M_vCircleArcObjectSetLocalRepere(_hCircleArcObject,&stLocalMatrix);
|
||
EDWAY_M_vCircleArcObjectSetInvLocalRepere(_hCircleArcObject,&stInvLocalMatrix);
|
||
EDWAY_M_vCircleArcObjectSetLocalStartPoint(_hCircleArcObject,&stLocalStart);
|
||
EDWAY_M_vCircleArcObjectSetLocalEndPoint(_hCircleArcObject,&stLocalEnd);
|
||
EDWAY_M_vCircleArcObjectSetObjectMode(_hCircleArcObject,_ucObjectMode);
|
||
_hCircleArcObject->m_pdstListOfPoints = pdstListOfPoints;
|
||
|
||
|
||
/* Depending on other fields :*/
|
||
if(_ucObjectMode==EDWAY_C_ucModeNoObject)
|
||
{/* mode is MODE_NO_OBJECT */
|
||
/* allocates ram only for points list and dynamic parameters */
|
||
M_malloc
|
||
(
|
||
// EDWAY_M_dstCircleArcObjectGetListOfPoints(_hCircleArcObject),
|
||
*_hCircleArcObject->m_pdstListOfPoints,
|
||
MTH3D_tdstVector*,
|
||
(_ucSamplingRate+1)*sizeof(MTH3D_tdstVector)
|
||
);
|
||
}
|
||
else
|
||
{/* else mode is MODE_REAL_OBJET */
|
||
/* creates the geometric object */
|
||
|
||
/* This list of points is not used */
|
||
// EDWAY_M_vCircleArcObjectSetListOfPoints(_hCircleArcObject,0);
|
||
*_hCircleArcObject->m_pdstListOfPoints = 0;
|
||
|
||
/* create object with 1 element (lines only), and ucSamplingRate+1 points) */
|
||
GEO_vCreateGeometricObject
|
||
(&EDWAY_M_hCircleArcObjectGetGeometricObject(_hCircleArcObject),_ucSamplingRate+1,1);
|
||
/* create line element*/
|
||
GEO_xCreateElementLines
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetGeometricObject(_hCircleArcObject),
|
||
&EDWAY_M_hCircleArcObjectGetLineElement(_hCircleArcObject),
|
||
_ucSamplingRate
|
||
);
|
||
/* create lines indexes */
|
||
for (xCurVertex=0;xCurVertex<_ucSamplingRate;xCurVertex++)
|
||
{
|
||
/* define start and end vertex of a line */
|
||
xLineDoubleIndex.a2_xIndex[0]=xCurVertex;
|
||
xLineDoubleIndex.a2_xIndex[1]=xCurVertex+1;
|
||
/* set line index */
|
||
GEO_xSetIndexOfElementLines
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetGeometricObject(_hCircleArcObject),
|
||
EDWAY_M_hCircleArcObjectGetLineElement(_hCircleArcObject),
|
||
xCurVertex,
|
||
&xLineDoubleIndex
|
||
);
|
||
}
|
||
}
|
||
EDWAY_fnv_CircleArcObject_Calculate(_hCircleArcObject);
|
||
}
|
||
|
||
|
||
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Frees memory allocated by the
|
||
editor circle arc object
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_Free
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hOldCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on an editor
|
||
cirlce arc object to free
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 25,1997
|
||
* Author :
|
||
Albert Pais
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_Free
|
||
(EDWAY_tdhCircleArcObject _hOldCircleArcObject)
|
||
{
|
||
if (_hOldCircleArcObject!=0)
|
||
{
|
||
// if (EDWAY_M_dstCircleArcObjectGetListOfPoints(_hOldCircleArcObject)!=0)
|
||
// {
|
||
// M_free(EDWAY_M_dstCircleArcObjectGetListOfPoints(_hOldCircleArcObject));
|
||
// EDWAY_M_vCircleArcObjectSetListOfPoints(_hOldCircleArcObject,0);
|
||
// }
|
||
|
||
/* if dynamic parameters are present, free memory too */
|
||
if (EDWAY_M_pstCircleArcObjectGetDynaParams(_hOldCircleArcObject)!=0)
|
||
{
|
||
//VL fn_vDynamicObject_Free
|
||
//VL (EDWAY_M_pstCircleArcObjectGetDynaParams(_hOldCircleArcObject));
|
||
EDWAY_M_vCircleArcObjectSetDynaParams(_hOldCircleArcObject,0);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Compute the list of points sampling
|
||
the circle arc curve according
|
||
to data inside the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_Calculate
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : A valid handle on a circle
|
||
arc object.
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26,1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_Calculate
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
MTH3D_tdstVector *d_stListOfPoints;
|
||
/* avoid crash :*/
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
if(EDWAY_M_ucCircleArcObjectGetObjectMode(_hCircleArcObject)==EDWAY_C_ucModeNoObject)
|
||
{
|
||
// d_stListOfPoints = EDWAY_M_dstCircleArcObjectGetListOfPoints(_hCircleArcObject);
|
||
d_stListOfPoints = *_hCircleArcObject->m_pdstListOfPoints;
|
||
}
|
||
else
|
||
{
|
||
d_stListOfPoints = EDWAY_M_hCircleArcObjectGetGeometricObject(_hCircleArcObject)
|
||
->d_stListOfPoints;
|
||
}
|
||
/* compute local information :*/
|
||
MTH3D_fnv_CircleArcCurve_CalculatePointWithLocalInformation
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject),
|
||
d_stListOfPoints,
|
||
EDWAY_M_pstCircleArcObjectGetLocalRepere(_hCircleArcObject),
|
||
EDWAY_M_xCircleArcObjectGetMainAngle(_hCircleArcObject)
|
||
);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the size of the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnuw_CircleArcObject_SizeOf
|
||
---------------------------------------
|
||
Arguments :
|
||
* None
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
unsigned short
|
||
* Possible Value :
|
||
* any possible unsigned short value
|
||
The size of the structure
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26,1997
|
||
* Author :
|
||
Albert Pais
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
unsigned short EDWAY_fnuw_CircleArcObject_SizeOf(void)
|
||
{
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_uwCircleArcObjectSizeOf();
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the handle of the circle arc
|
||
curve contained in the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnh_CircleArcObject_GetCircleArcCurve
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
MTH3D_tdhCircleArcCurve
|
||
* Possible Value :
|
||
* A valid handle (non-null)
|
||
The handle of the circle arc
|
||
curve contained inside the editor
|
||
cirle arc object
|
||
* MTH3D_C_h_CircleArcCurveInvalidHandle
|
||
The function failed
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
MTH3D_tdhCircleArcCurve EDWAY_fnh_CircleArcObject_GetCircleArcCurve
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return MTH3D_C_h_CircleArcCurveInvalidHandle;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the handle of geometric object
|
||
contained in the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnh_CircleArcObject_GetGeometricObject
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
ACP_tdxHandleOfObject
|
||
* Possible Value :
|
||
* A valid handle (non-null)
|
||
The handle of the geometric
|
||
object contained inside the editor
|
||
cirle arc object
|
||
* NULL
|
||
The function failed
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
ACP_tdxHandleOfObject EDWAY_fnh_CircleArcObject_GetGeometricObject
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return 0;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_hCircleArcObjectGetGeometricObject(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the handle on line element
|
||
contained in the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnh_CircleArcObject_GetLineElement
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
ACP_tdxHandleOfElement
|
||
* Possible Value :
|
||
* A valid handle (non-null)
|
||
The handle of the line element
|
||
contained inside the editor
|
||
cirle arc object
|
||
* NULL
|
||
The function failed
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
ACP_tdxHandleOfElement EDWAY_fnh_CircleArcObject_GetLineElement
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return 0;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_hCircleArcObjectGetLineElement(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the color contained in
|
||
the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnl_CircleArcObject_GetColor
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
long
|
||
* Possible Value :
|
||
* A non-null value
|
||
The color contained inside
|
||
the editor cirle arc object
|
||
* a zero-value
|
||
The function failed
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
long EDWAY_fnl_CircleArcObject_GetColor
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return 0;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_lCircleArcObjectGetColor(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the viewport attributes contained in
|
||
the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnpst_CircleArcObject_GetViewPortAttributes
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
GLD_tdstViewportAttributes*
|
||
* Possible Value :
|
||
* A non-null value
|
||
the viewport attributes contained inside
|
||
the editor cirle arc object
|
||
* a zero-value
|
||
The function failed
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
GLD_tdstViewportAttributes* EDWAY_fnpst_CircleArcObject_GetViewPortAttributes
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return 0;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_pstCircleArcObjectGetViewPortAttributes(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the list of points contained in
|
||
the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fndst_CircleArcObject_GetListOfPoints
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
MTH3D_tdstVector*
|
||
* Possible Value :
|
||
* A non-null value
|
||
the list of points contained inside
|
||
the editor cirle arc object
|
||
* a zero-value
|
||
The function failed
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
MTH3D_tdstVector* EDWAY_fndst_CircleArcObject_GetListOfPoints
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return 0;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
// return EDWAY_M_dstCircleArcObjectGetListOfPoints(_hCircleArcObject);
|
||
return *_hCircleArcObject->m_pdstListOfPoints;
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the dynamic parameters contained in
|
||
the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnpst_CircleArcObject_GetDynaParams
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
ACP_tdstDynaParam*
|
||
* Possible Value :
|
||
* A non-null value
|
||
The function succeeded
|
||
* a zero-value
|
||
The function failed
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
ACP_tdstDynaParam* EDWAY_fnpst_CircleArcObject_GetDynaParams
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return 0;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_pstCircleArcObjectGetDynaParams(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the local repere contained in
|
||
the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_GetLocalRepere
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
* Name : _pstLocalMatrix
|
||
Type : MTH3D_tdstMatrix*
|
||
Meaning : a pointer to a matrix structure
|
||
that receives the local matrix
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_GetLocalRepere
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstMatrix*_pstLocalMatrix
|
||
)
|
||
{
|
||
if((_hCircleArcObject == 0)||(_pstLocalMatrix==0))
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectGetLocalRepere(_hCircleArcObject,_pstLocalMatrix);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the inverse matrix of the
|
||
local repere contained in the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_GetInvLocalRepere
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
* Name : _pstInvLocalMatrix
|
||
Type : MTH3D_tdstMatrix*
|
||
Meaning : a pointer to a matrix structure
|
||
that receives the inverse of the
|
||
local matrix
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_GetInvLocalRepere
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstMatrix*_pstInvLocalMatrix
|
||
)
|
||
{
|
||
if((_hCircleArcObject == 0)||(_pstInvLocalMatrix==0))
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectGetInvLocalRepere(_hCircleArcObject,_pstInvLocalMatrix);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the local start point of the
|
||
contained in the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_GetLocalStartPoint
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
* Name : _pstLocalStartPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : a pointer to a vector structure
|
||
that receives the local start point
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_GetLocalStartPoint
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_pstLocalStartPoint
|
||
)
|
||
{
|
||
if((_hCircleArcObject == 0)||(_pstLocalStartPoint==0))
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectGetLocalStartPoint(_hCircleArcObject,_pstLocalStartPoint);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the local end point of the
|
||
contained in the structure.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_GetLocalEndPoint
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a handle on the circle arc
|
||
object to retrieve
|
||
* Name : _pstLocalEndPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : a pointer to a vector structure
|
||
that receives the local end point
|
||
---------------------------------------
|
||
Return value :
|
||
* None
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_GetLocalEndPoint
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_pstLocalEndPoint
|
||
)
|
||
{
|
||
if((_hCircleArcObject == 0)||(_pstLocalEndPoint==0))
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectGetLocalEndPoint(_hCircleArcObject,_pstLocalEndPoint);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the main angle of the circle
|
||
arc curve defined in the editor circle
|
||
arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnx_CircleArcObject_GetMainAngle
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : A valid handle on the circle
|
||
arc object.
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
MTH_tdxReal
|
||
* Possible Value :
|
||
* Any value different from MTH_C_InfinitPlus
|
||
The function succeeded
|
||
* MTH_C_InfinitPlus
|
||
The function failed
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
MTH_tdxReal EDWAY_fnx_CircleArcObject_GetMainAngle
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return MTH_C_InfinitPlus;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_xCircleArcObjectGetMainAngle(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Returns the object mode defined in the
|
||
editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnuc_CircleArcObject_GetObjectMode
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : A valid handle on the circle
|
||
arc object.
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
unsigned char
|
||
* Possible Value :
|
||
* EDWAY_C_ucModeNoObject
|
||
Mode no object
|
||
* EDWAY_C_ucModeRealObject
|
||
Mode real object
|
||
* (unsigned char)-1
|
||
The function failed.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
unsigned char EDWAY_fnuc_CircleArcObject_GetObjectMode
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return (unsigned char)-1;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
return EDWAY_M_ucCircleArcObjectGetObjectMode(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the circle arc curve field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetCircleArcCurve
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _hNewCircleArcCurve
|
||
Type : MTH3D_tdhCircleArcCurve
|
||
Meaning : The new circle arc curve
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetCircleArcCurve
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdhCircleArcCurve _hNewCircleArcCurve
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetCircleArcCurve(_hCircleArcObject,_hNewCircleArcCurve);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the geometric object field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetGeometricObject
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _hNewGeometricObject
|
||
Type : ACP_tdxHandleOfObject
|
||
Meaning : The new geometric object
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetGeometricObject
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
ACP_tdxHandleOfObject _hNewGeometricObject
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetGeometricObject(_hCircleArcObject,_hNewGeometricObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the line element field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetLineElement
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _hNewLineElement
|
||
Type : ACP_tdxHandleOfElement
|
||
Meaning : The new line element.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetLineElement
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
ACP_tdxHandleOfElement _hNewLineElement
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetLineElement(_hCircleArcObject,_hNewLineElement);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the color field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetColor
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _lNewColor
|
||
Type : long
|
||
Meaning : The new color.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetColor
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
long _lNewColor
|
||
)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetColor(_hCircleArcObject,_lNewColor);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the viewport attributes field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetViewPortAttributes
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstNewViewportAttributes
|
||
Type : GLD_tdstViewportAttributes*
|
||
Meaning : The new viewport attributes.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetViewPortAttributes
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
GLD_tdstViewportAttributes*_pstNewViewportAttributes
|
||
)
|
||
{
|
||
if(_hCircleArcObject == 0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetViewPortAttributes(_hCircleArcObject,_pstNewViewportAttributes);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the list of points field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetListOfPoints
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _dstNewListOfPoints
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The new list of points.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetListOfPoints
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_dstNewListOfPoints
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
// EDWAY_M_vCircleArcObjectSetListOfPoints(_hCircleArcObject,_dstNewListOfPoints);
|
||
*_hCircleArcObject->m_pdstListOfPoints = _dstNewListOfPoints;
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the dynamic params pointer field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetDynaParams
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstNewDynaParam
|
||
Type : ACP_tdstDynaParam*
|
||
Meaning : The new dyna params pointer.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetDynaParams
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
ACP_tdstDynaParam *_pstNewDynaParam
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetDynaParams(_hCircleArcObject,_pstNewDynaParam);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the local repere field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetLocalRepere
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstNewLocalRepere
|
||
Type : MTH3D_tdstMatrix*
|
||
Meaning : The new local repere.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetLocalRepere
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstMatrix* _pstNewLocalRepere
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetLocalRepere(_hCircleArcObject,_pstNewLocalRepere);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the inverse local repere field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetInvLocalRepere
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstNewInvLocalRepere
|
||
Type : MTH3D_tdstMatrix*
|
||
Meaning : The new inverse local repere.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetInvLocalRepere
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstMatrix*_pstNewInvLocalRepere
|
||
)
|
||
{
|
||
if(_hCircleArcObject)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetInvLocalRepere(_hCircleArcObject,_pstNewInvLocalRepere);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the local start point field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetLocalStartPoint
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstNewLocalStartPoint
|
||
Type : MTH3D_tdstVertex*
|
||
Meaning : The new local start point.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetLocalStartPoint
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_pstNewLocalStartPoint
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetLocalStartPoint(_hCircleArcObject,_pstNewLocalStartPoint);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the local end point field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetLocalEndPoint
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstNewLocalEndPoint
|
||
Type : MTH3D_tdstVertex*
|
||
Meaning : The new local end point.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetLocalEndPoint
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_pstNewLocalEndPoint
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetLocalEndPoint(_hCircleArcObject,_pstNewLocalEndPoint);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the main angle field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetMainAngle
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _xNewMainAngle
|
||
Type : MTH_tdxReal
|
||
Meaning : The new main angle.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetMainAngle
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH_tdxReal _xNewMainAngle
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetMainAngle(_hCircleArcObject,_xNewMainAngle);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the object mode field
|
||
of the editor circle arc object.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_SetObjectMode
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _ucNewObjectMode
|
||
Type : unsigned char
|
||
Meaning : The new object mode.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_SetObjectMode
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
unsigned char _ucNewObjectMode
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
/*
|
||
Using the macro makes it compulsory to define the function
|
||
with the _EDWAY_CIRCLEARC_FRIEND_ compilation directive, in order to
|
||
be sure that the structure is known at this level.
|
||
*/
|
||
EDWAY_M_vCircleArcObjectSetObjectMode(_hCircleArcObject,_ucNewObjectMode);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes the sampling rate field
|
||
and compute the new list of sampling point.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnb_CircleArcObject_ChangeSamplingRate
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _ucNewSamplingRate
|
||
Type : unsigned char
|
||
Meaning : The new sampling rate.
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
ACP_tdxBool
|
||
* Possible values :
|
||
* TRUE :
|
||
The function succeeded.
|
||
* FALSE :
|
||
The function failed.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 26, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
Remarks :
|
||
* The sampling rate can only be modified
|
||
for objects that have been created using
|
||
C_ucModeNoObject at their creation.
|
||
---------------------------------------
|
||
*/
|
||
ACP_tdxBool EDWAY_fnb_CircleArcObject_ChangeSamplingRate
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
unsigned char _ucNewSamplingRate
|
||
)
|
||
{
|
||
if (_hCircleArcObject==0) return FALSE;
|
||
|
||
if (EDWAY_M_ucCircleArcObjectGetObjectMode(_hCircleArcObject)==EDWAY_C_ucModeNoObject)
|
||
{
|
||
/* copies new sampling rate value into objects parameters */
|
||
if(_ucNewSamplingRate<2)
|
||
_ucNewSamplingRate = 2;
|
||
MTH3D_M_vCircleArcCurveSetSamplingRate
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject),
|
||
_ucNewSamplingRate
|
||
);
|
||
|
||
/* free old list of points and allocates new one */
|
||
// if (EDWAY_M_dstCircleArcObjectGetListOfPoints(_hCircleArcObject)!=0)
|
||
// M_free(EDWAY_M_dstCircleArcObjectGetListOfPoints(_hCircleArcObject));
|
||
|
||
if (*_hCircleArcObject->m_pdstListOfPoints!=0)
|
||
M_free(*_hCircleArcObject->m_pdstListOfPoints);
|
||
|
||
|
||
M_malloc ( *_hCircleArcObject->m_pdstListOfPoints,
|
||
MTH3D_tdstVector*,
|
||
(_ucNewSamplingRate+1)*sizeof(MTH3D_tdstVector)
|
||
);
|
||
|
||
/* calculate points of CircleArc curve */
|
||
EDWAY_fnv_CircleArcObject_Calculate(_hCircleArcObject);
|
||
|
||
/* checks if dynamic parameters are attached to the object
|
||
if yes, changes them to match the new sampling rate */
|
||
/*VL fn_vDynamicObject_ChangeSamplingRate
|
||
(
|
||
EDWAY_M_pstCircleArcObjectGetDynaParams(_hCircleArcObject),
|
||
_ucNewSamplingRate
|
||
);
|
||
*/
|
||
return TRUE;
|
||
}
|
||
else
|
||
return FALSE;
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Changes starting, ending and center
|
||
points and reprocess the local information
|
||
and list of sampled points
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_ChangeParams
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstNewStartPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The new starting point.
|
||
* Name : _pstNewEndPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The new ending point.
|
||
* Name : _pstNewCenterPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The new center point.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 27, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
Remark :
|
||
If one of the pointers to the points
|
||
has a null value, it is simply not
|
||
changed.
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_ChangeParams
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_pstNewStartPoint,
|
||
MTH3D_tdstVector*_pstNewEndPoint,
|
||
MTH3D_tdstVector*_pstNewCenterPoint
|
||
)
|
||
{
|
||
MTH3D_tdstMatrix stLocalMatrix,stInvLocalMatrix;
|
||
MTH3D_tdstVector stLocalStartPoint,stLocalEndPoint;
|
||
|
||
if(_hCircleArcObject==0)return;
|
||
|
||
MTH3D_fnv_CircleArcCurve_SetParams
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject),
|
||
_pstNewStartPoint,
|
||
_pstNewEndPoint,
|
||
_pstNewCenterPoint
|
||
);
|
||
/* Compute new local information : */
|
||
MTH3D_fnv_CircleArcCurve_ComputeLocalInformation
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject),
|
||
&stLocalMatrix,
|
||
&stLocalStartPoint,
|
||
&stLocalEndPoint,
|
||
&stInvLocalMatrix
|
||
);
|
||
/* Change params of the circle arc object :*/
|
||
EDWAY_M_vCircleArcObjectSetLocalRepere(_hCircleArcObject,&stLocalMatrix);
|
||
EDWAY_M_vCircleArcObjectSetLocalStartPoint(_hCircleArcObject,&stLocalStartPoint);
|
||
EDWAY_M_vCircleArcObjectSetLocalEndPoint(_hCircleArcObject,&stLocalEndPoint);
|
||
EDWAY_M_vCircleArcObjectSetInvLocalRepere(_hCircleArcObject,&stInvLocalMatrix);
|
||
/* change the main angle :*/
|
||
EDWAY_M_vCircleArcObjectSetMainAngle
|
||
(
|
||
_hCircleArcObject,
|
||
MTH3D_fnx_CircleArcCurve_ComputeMainAngle(EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject))
|
||
);
|
||
/* compute the new list of sampled point :*/
|
||
EDWAY_fnv_CircleArcObject_Calculate(_hCircleArcObject);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Retrieves starting, ending and center
|
||
points.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_GetParams
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstStartPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The starting point.
|
||
* Name : _pstEndPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The ending point.
|
||
* Name : _pstCenterPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The center point.
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 27, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
Remark :
|
||
If one of the pointers to the points
|
||
has a null value, it is simply not
|
||
retrieved.
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_GetParams
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_pstStartPoint,
|
||
MTH3D_tdstVector*_pstEndPoint,
|
||
MTH3D_tdstVector*_pstCenterPoint
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return;
|
||
MTH3D_fnv_CircleArcCurve_GetParams
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject),
|
||
_pstStartPoint,
|
||
_pstEndPoint,
|
||
_pstCenterPoint
|
||
);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Retrieves a specific sampled speed.
|
||
---------------------------------------
|
||
Function Name :
|
||
fn_xCircleArcObject_GetSpeed
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _ucSampledIndex
|
||
Type : unsigned char
|
||
Meaning : The index of the sampled speed
|
||
---------------------------------------
|
||
Return value :
|
||
* Type :
|
||
MTH_tdxReal.
|
||
* Possible values :
|
||
* any MTH_tdxReal possible value excepted MTH_C_InfinitPlus :
|
||
The function succeeded
|
||
* MTH_C_InfinitPlus :
|
||
The function failed.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 27, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
MTH_tdxReal fn_xCircleArcObject_GetSpeed
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
unsigned char _ucSampledIndex
|
||
)
|
||
{
|
||
if(_hCircleArcObject==0)
|
||
return MTH_C_InfinitPlus;
|
||
|
||
//VL return fn_xDynamicObject_GetSpeed
|
||
//(
|
||
//EDWAY_M_pstCircleArcObjectGetDynaParams(_hCircleArcObject),
|
||
//_ucSampledIndex
|
||
//);
|
||
return 0;
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Retrieves a specific sampled point.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_GetPoint
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _ucSampledIndex
|
||
Type : unsigned char
|
||
Meaning : The index of the sampled speed
|
||
* Name : _pstSampledPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The sampled point
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 27, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_GetPoint
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
unsigned char _ucSampledIndex,
|
||
MTH3D_tdstVector*_pstSampledPoint
|
||
)
|
||
{
|
||
MTH3D_tdstVector *dstListOfPoints;
|
||
if((_hCircleArcObject==0)||(_pstSampledPoint==0)) return;
|
||
|
||
if(EDWAY_M_ucCircleArcObjectGetObjectMode(_hCircleArcObject)==
|
||
EDWAY_C_ucModeNoObject)
|
||
{
|
||
// dstListOfPoints = EDWAY_M_dstCircleArcObjectGetListOfPoints(_hCircleArcObject);
|
||
dstListOfPoints = *_hCircleArcObject->m_pdstListOfPoints;
|
||
}
|
||
else
|
||
{
|
||
dstListOfPoints = EDWAY_M_hCircleArcObjectGetGeometricObject(_hCircleArcObject)->d_stListOfPoints;
|
||
}
|
||
*_pstSampledPoint = dstListOfPoints[_ucSampledIndex];
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Draws the circle arc curve.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_Draw
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 27, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_Draw
|
||
(EDWAY_tdhCircleArcObject _hCircleArcObject)
|
||
{
|
||
POS_tdstCompletePosition stMatrix;
|
||
GEO_tdstColor ColBidon;
|
||
MTH3D_tdstVector *p_stPointList;
|
||
MTH3D_tdstVector *p_stPointListEnd;
|
||
unsigned char ucSamplingRate;
|
||
|
||
POS_fn_vSetIdentityMatrix(&stMatrix);
|
||
if (_hCircleArcObject==0) return; /* avoid crash */
|
||
|
||
/* unsigned long color; */
|
||
|
||
ColBidon.xR=(float)0.5;
|
||
ColBidon.xG=(float)0.5;
|
||
ColBidon.xB=(float)0.5;
|
||
ColBidon.xA=(float)0.5;
|
||
|
||
if (EDWAY_M_ucCircleArcObjectGetObjectMode(_hCircleArcObject)
|
||
==EDWAY_C_ucModeRealObject)
|
||
{
|
||
p_stPointList= EDWAY_M_hCircleArcObjectGetGeometricObject(_hCircleArcObject) -> d_stListOfPoints;
|
||
}
|
||
else
|
||
{
|
||
// p_stPointList=EDWAY_M_dstCircleArcObjectGetListOfPoints(_hCircleArcObject);
|
||
p_stPointList = *_hCircleArcObject->m_pdstListOfPoints;
|
||
}
|
||
|
||
if (p_stPointList==0) return;
|
||
|
||
GLI_xGetCameraMatrix(
|
||
((GLI_tdstSpecificAttributesFor3D*)
|
||
((EDWAY_M_pstCircleArcObjectGetViewPortAttributes(_hCircleArcObject))->p_vSpecificToXD))
|
||
->p_stCam,&stMatrix);
|
||
|
||
ucSamplingRate = MTH3D_M_ucCircleArcCurveGetSamplingRate
|
||
(EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject));
|
||
GLI_xLoadMatrix(&stMatrix);
|
||
GLI_vSetFog(100,100,200,&ColBidon);
|
||
p_stPointListEnd=p_stPointList+ucSamplingRate;
|
||
|
||
|
||
for (;p_stPointList<p_stPointListEnd;p_stPointList++)
|
||
{
|
||
GLI_xDraw3DLine16
|
||
(
|
||
(struct GLD_tdstViewportAttributes_*)(EDWAY_M_pstCircleArcObjectGetViewPortAttributes(_hCircleArcObject)),
|
||
p_stPointList,
|
||
p_stPointList+1,
|
||
EDWAY_M_lCircleArcObjectGetColor(_hCircleArcObject)
|
||
);
|
||
}
|
||
GLI_xPopMatrix();
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Converts a point from the global repere
|
||
to the local repere of the circle arc
|
||
curve.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_GlobalToLocal
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstDestPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The destination point
|
||
* Name : _pstSrcPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The source point
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 27, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/
|
||
void EDWAY_fnv_CircleArcObject_GlobalToLocal
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_pstDestPoint,
|
||
MTH3D_tdstVector*_pstSrcPoint
|
||
)
|
||
{
|
||
MTH3D_tdstMatrix stInvLocalRepere;
|
||
if((_hCircleArcObject==0)||(_pstDestPoint==0)||(_pstSrcPoint==0))
|
||
return;
|
||
EDWAY_M_vCircleArcObjectGetInvLocalRepere(_hCircleArcObject,&stInvLocalRepere);
|
||
MTH3D_fnv_CircleArcCurve_ComputeVectorFromGlobalToLocalRepere
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject),
|
||
_pstDestPoint,
|
||
_pstSrcPoint,
|
||
&stInvLocalRepere
|
||
);
|
||
}
|
||
|
||
/*
|
||
---------------------------------------
|
||
Contents :
|
||
Converts a point from the local repere
|
||
of the circle arc curve to the global
|
||
repere.
|
||
---------------------------------------
|
||
Function Name :
|
||
EDWAY_fnv_CircleArcObject_LocalToGlobal
|
||
---------------------------------------
|
||
Arguments :
|
||
* Name : _hCircleArcObject
|
||
Type : EDWAY_tdhCircleArcObject
|
||
Meaning : a valid handle on a circle arc
|
||
object
|
||
* Name : _pstDestPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The destination point
|
||
* Name : _pstSrcPoint
|
||
Type : MTH3D_tdstVector*
|
||
Meaning : The source point
|
||
---------------------------------------
|
||
Return value :
|
||
* None.
|
||
---------------------------------------
|
||
Error Raised :
|
||
* None
|
||
---------------------------------------
|
||
Creation :
|
||
* Date :
|
||
February 27, 1997
|
||
* Author :
|
||
Albert PAIS
|
||
---------------------------------------
|
||
Modification :
|
||
* Date :
|
||
* Author :
|
||
* Modify :
|
||
---------------------------------------
|
||
*/void EDWAY_fnv_CircleArcObject_LocalToGlobal
|
||
(
|
||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||
MTH3D_tdstVector*_pstDestPoint,
|
||
MTH3D_tdstVector*_pstSrcPoint
|
||
)
|
||
{
|
||
MTH3D_tdstMatrix stLocalRepere;
|
||
if((_hCircleArcObject==0)||(_pstDestPoint==0)||(_pstSrcPoint==0))
|
||
return;
|
||
EDWAY_M_vCircleArcObjectGetLocalRepere(_hCircleArcObject,&stLocalRepere);
|
||
MTH3D_fnv_CircleArcCurve_ComputeVectorFromLocalToGlobalRepere
|
||
(
|
||
EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCircleArcObject),
|
||
_pstDestPoint,
|
||
_pstSrcPoint,
|
||
&stLocalRepere
|
||
);
|
||
}
|