Add rayman2 source files
This commit is contained in:
245
Rayman_X/cpa/tempgrp/Owp/inc/Bezier.h
Normal file
245
Rayman_X/cpa/tempgrp/Owp/inc/Bezier.h
Normal file
@@ -0,0 +1,245 @@
|
||||
/*==========================================================
|
||||
File: Bezier.h
|
||||
Prupose: Handle a Bezier curve
|
||||
Author: Yann Le Tensorer
|
||||
Creation Date: 23 january 1997
|
||||
Version: 1.0
|
||||
Revision: YLT - 1.1 - 3 february 1997
|
||||
===========================================================*/
|
||||
|
||||
#ifndef __BEZIER_H__
|
||||
#define __BEZIER_H__
|
||||
|
||||
#ifdef _AI_LIB_
|
||||
// #include "AIUseCPA.h"
|
||||
#include "dynamic.h"
|
||||
#else /* _AI_LIB_ */
|
||||
#include "mth3d.h"
|
||||
#include "acp_base.h"
|
||||
#include "gld.h"
|
||||
#include "dynamic.h"
|
||||
#endif /* _AI_LIB_ */
|
||||
|
||||
/* Object creation modes */
|
||||
#define C_ucModeNoObject 0 /* no geometric object created */
|
||||
#define C_ucModeRealObject 1 /* a geometric object is created */
|
||||
|
||||
|
||||
/* Main bezier structure */
|
||||
typedef struct _BezierObject
|
||||
{
|
||||
unsigned char ucSamplingRate; /* sampling rate of curve */
|
||||
MTH3D_tdstVector stStartPoint; /* first point of curve */
|
||||
MTH3D_tdstVector stEndPoint; /* last point of curve */
|
||||
MTH3D_tdstVector stStartVector; /* first tangent vector*/
|
||||
MTH3D_tdstVector stEndVector; /* last tangent vector*/
|
||||
ACP_tdxHandleOfObject hObject; /* handle of g<>om<6F>tric object*/
|
||||
ACP_tdxHandleOfElement hElement; /* handle of "line" element*/
|
||||
long color; /* color of the curve (24 bits)*/
|
||||
GLD_tdstViewportAttributes *p_ViewPortAttributes; /* pointeur sur les attributs du viewport*/
|
||||
unsigned char ucObjectMode; /* object mode C_ucModeNoObject or C_ucModeRealObject*/
|
||||
MTH3D_tdstVector *d_stListOfPoints; /* List of bezier Points, in case mode=C_ucModeNoObject*/
|
||||
ACP_tdstDynaParam *p_stDynaParams; /* Pointer to dynamic parameters of curve */
|
||||
|
||||
} tdstBezierObject;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vBezierObject_Calculate
|
||||
Description: Calculates the points of the b<>zier curve according to the
|
||||
parameters specified when creating the object.
|
||||
Input: p_BezierObject: Pointer to a pre-created bezier object
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 23 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_Calculate(tdstBezierObject *p_BezierObject);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vBezierObject_Create
|
||||
Description: Create Bezier curve (in ram only) between two points
|
||||
Input: p_BezierObject: pointer to a preallocated tdstBezierObject
|
||||
ucSamplingRate: number of segment to define the curve)
|
||||
stStartPoint: First vertex of the curve
|
||||
stEndPoint: Last vertex of the curve
|
||||
stStartVector: Tangent vector at the first point
|
||||
stEndVector: Tangent vector at the last point
|
||||
ucObjectMode: Creation mode (C_ucModeNoObject ou C_ucModeRealObject)
|
||||
C_ucModeNoObject does not create a geometric object
|
||||
whereas C_ucModeRealObject does.
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 23 january 1997
|
||||
Revision: YLT - 03 february 1997
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_Create( tdstBezierObject *p_BezierObject,
|
||||
unsigned char ucSamplingRate,
|
||||
MTH3D_tdstVector* p_stStartPoint,
|
||||
MTH3D_tdstVector* p_stEndPoint,
|
||||
MTH3D_tdstVector* p_stStartVector,
|
||||
MTH3D_tdstVector* p_stEndVector,
|
||||
unsigned char ucObjectMode,
|
||||
ACP_tdstDynaParam* p_stDynaParams);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vBezierObject_SetColor
|
||||
Description: Set the color of a bezier object.
|
||||
Input: p_BezierObject: pointer to a pre-created tdstBezierObject
|
||||
color: 24 bit color of object. (0->7=B; 8->15=G; 16->23=R ; 24->32=Unused)
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 24 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_SetColor(tdstBezierObject *p_BezierObject,long color);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vBezierObject_SetViewPortAttributes
|
||||
Description: Set the viewportattributes for drawing.
|
||||
Input: p_BezierObject: pointer to a pre-created tdstBezierObject
|
||||
p_ViewPortAttributes: pointer to pre-defined viewport attributes
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 24 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_SetViewPortAttributes(tdstBezierObject *p_BezierObject,GLD_tdstViewportAttributes *p_ViewPortAttributes);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vBezierObject_Draw
|
||||
Description: Draw Bezier object on screen
|
||||
Input: p_BezierObject: pointer to a pre-created tdstBezierObject
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 24 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_Draw(tdstBezierObject *p_BezierObject);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vBezierObject_Free
|
||||
Description: Free memory allocated by the bezier objet
|
||||
Input: p_BezierObject: pointer to a tdstBezierObject
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 29 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_Free(tdstBezierObject *p_BezierObject);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vBezierObject_ChangeParams
|
||||
Description: Changes the parameters of a bezier objet and recalculates the coordinates
|
||||
of the points.
|
||||
Input: p_BezierObject: Pointer to a pre-created bezier object
|
||||
p_stStartPoint: Pointer to the start point
|
||||
p_stEndPoint: Pointer to the end Point
|
||||
p_stStartVector:Pointer to the start vector
|
||||
p_stEndVector: Pointer to the end vector
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 28 january 1997
|
||||
Revision:
|
||||
|
||||
Notes: If an input parameter is 0, this parameter is simply not
|
||||
affected. This enables to change easily only one parameter
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_ChangeParams(tdstBezierObject *p_BezierObject,
|
||||
MTH3D_tdstVector* p_stStartPoint,
|
||||
MTH3D_tdstVector* p_stEndPoint,
|
||||
MTH3D_tdstVector* p_stStartVector,
|
||||
MTH3D_tdstVector* p_stEndVector);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vBezierObject_GetParams
|
||||
Description: Gets the parameters of a bezier objet
|
||||
Input: p_BezierObject: Pointer to a pre-created bezier object
|
||||
p_stStartPoint: Pointer to the start point
|
||||
p_stEndPoint: Pointer to the end Point
|
||||
p_stStartVector:Pointer to the start vector
|
||||
p_stEndVector: Pointer to the end vector
|
||||
Output: *p_stStartPoint:start point
|
||||
*p_stEndPoint: end Point
|
||||
*p_stStartVectorstart vector
|
||||
*p_stEndVector: end vector
|
||||
|
||||
Author: Yann Le Tensorer
|
||||
Date: 4 february 1997
|
||||
Revision:
|
||||
|
||||
Notes: If an input parameter is 0, this parameter is simply not
|
||||
affected.
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_GetParams(tdstBezierObject *p_BezierObject,
|
||||
MTH3D_tdstVector* p_stStartPoint,
|
||||
MTH3D_tdstVector* p_stEndPoint,
|
||||
MTH3D_tdstVector* p_stStartVector,
|
||||
MTH3D_tdstVector* p_stEndVector);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_xBezierObject_GetSpeed
|
||||
Description: returns the speed at a given sample (n<> of the point) of a bezier object
|
||||
Input: p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
ucSampleNo: n<> of the point to get the speed from.
|
||||
Output: return value is the speed.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 03 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
MTH_tdxReal fn_xBezierObject_GetSpeed(tdstBezierObject *p_BezierObject,unsigned char ucSampleNo);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_xBezierObject_GetPoint
|
||||
Description: returns the coordinates in the global rep<65>re of the point at a
|
||||
given sample (n<> of the point) of a bezier object.
|
||||
Input: p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
ucSampleNo: n<> of the point to get the coordinates from.
|
||||
p_ReturnVector: pointer to a vector to be returned.
|
||||
Output: *p_ReturnVector is a vector countaining the.coordinates of the point.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 03 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vBezierObject_GetPoint(tdstBezierObject *p_BezierObject,unsigned char ucSampleNo,MTH3D_tdstVector* p_ReturnVector);
|
||||
|
||||
/*===============================================================================
|
||||
Function name: fn_bBezierObject_SetSamplingRate
|
||||
Description: Modifies the sampling rate of a bezier object, and changes all
|
||||
the depending parameters (including dynamic sampling rate)
|
||||
Input: p_BezierObject: pointer to a preallocated tdstBezierObject
|
||||
ucSamplingRate: New sampling rate
|
||||
Output: return value is true if sampling rate could be modified,
|
||||
false if not.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 5 february 1997
|
||||
Revision:
|
||||
Note: The sampling rate can only be modified for objects that have been
|
||||
created using C_ucModeNoObject at their creation.
|
||||
================================================================================*/
|
||||
|
||||
ACP_tdxBool fn_bBezierObject_SetSamplingRate(tdstBezierObject *p_BezierObject,
|
||||
unsigned char ucSamplingRate);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_ucBezierObject_GetSamplingRate
|
||||
Description: Gets the sampling rate of a BezierObject objet
|
||||
Input: p_BezierObject: Pointer to a pre-created Bezier object
|
||||
Output: return value is the sampling rate of the circle arc object
|
||||
Author: Yann Le Tensorer
|
||||
Date: 5 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
unsigned char fn_ucBezierObject_GetSamplingRate(tdstBezierObject *p_BezierObject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
276
Rayman_X/cpa/tempgrp/Owp/inc/Circlway.h
Normal file
276
Rayman_X/cpa/tempgrp/Owp/inc/Circlway.h
Normal file
@@ -0,0 +1,276 @@
|
||||
/*=========================================================================================
|
||||
File: CirclWay.c
|
||||
Prupose: Handle a CircleArc curve
|
||||
Author: Yann Le Tensorer
|
||||
Creation Date: 3 february 1997
|
||||
Version: 1.1
|
||||
Revision:
|
||||
===========================================================================================
|
||||
Revisions: Version Date Author
|
||||
----------------------------------------------------------------
|
||||
1.1 6 february 1997 Yann Le Tensorer
|
||||
Added function "fn_vCircle_FindCenter"
|
||||
=========================================================================================*/
|
||||
|
||||
#ifndef __CircleArc_H__
|
||||
#define __CircleArc_H__
|
||||
|
||||
|
||||
#ifdef _AI_LIB_
|
||||
#include "AIUseCPA.h"
|
||||
#include "dynamic.h"
|
||||
#else /* _AI_LIB_ */
|
||||
#include "mth3d.h"
|
||||
#include "acp_base.h"
|
||||
#include "gld.h"
|
||||
#include "dynamic.h"
|
||||
#endif /* _AI_LIB_ */
|
||||
|
||||
/* Object creation modes */
|
||||
#define C_ucModeNoObject 0 /* no geometric object created */
|
||||
#define C_ucModeRealObject 1 /* a geometric object is created */
|
||||
|
||||
|
||||
/* Main CircleArc structure */
|
||||
typedef struct _CircleArcObject
|
||||
{
|
||||
unsigned char ucSamplingRate; /* sampling rate of curve */
|
||||
MTH3D_tdstVector stStartPoint; /* first point of curve */
|
||||
MTH3D_tdstVector stEndPoint; /* last point of curve */
|
||||
MTH3D_tdstVector stCenter; /* center of the circle */
|
||||
MTH3D_tdstMatrix stLocalRepere; /* local rep<65>re of plan in which is the circle */
|
||||
ACP_tdxHandleOfObject hObject; /* handle of g<>om<6F>tric object*/
|
||||
ACP_tdxHandleOfElement hElement; /* handle of "line" element*/
|
||||
long color; /* color of the curve (24 bits)*/
|
||||
GLD_tdstViewportAttributes *p_ViewPortAttributes; /* pointeur sur les attributs du viewport*/
|
||||
unsigned char ucObjectMode; /* object mode C_ucModeNoObject or C_ucModeRealObject*/
|
||||
MTH3D_tdstVector *d_stListOfPoints; /* List of CircleArc Points, in case mode=C_ucModeNoObject*/
|
||||
ACP_tdstDynaParam *p_stDynaParams; /* Pointer to dynamic parameters of curve */
|
||||
MTH3D_tdstVector stLocalStartPoint; /* first point of curve in local repere*/
|
||||
MTH3D_tdstVector stLocalEndPoint; /* last point of curve in local repere*/
|
||||
MTH3D_tdstMatrix stInvLocalRepere; /* Inverse matrix of local rep<65>re of plan in which is the circle */
|
||||
MTH_tdxReal xMainAngle;
|
||||
MTH3D_tdstVector stTmpVector0; /* internal use */
|
||||
MTH3D_tdstVector stTmpVector1; /* internal use */
|
||||
|
||||
} tdstCircleArcObject;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_Calculate
|
||||
Description: Calculates the points of the b<>zier curve according to the
|
||||
parameters specified when creating the object.
|
||||
Input: p_CircleArcObject: Pointer to a pre-created CircleArc object
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 23 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_Calculate(tdstCircleArcObject *p_CircleArcObject);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_Create
|
||||
Description: Create CircleArc curve (in ram only) between two points
|
||||
Input: p_CircleArcObject: pointer to a preallocated tdstCircleArcObject
|
||||
ucSamplingRate: number of segment to define the curve)
|
||||
stStartPoint: First vertex of the curve
|
||||
stEndPoint: Last vertex of the curve
|
||||
stCenter: center of the circle
|
||||
ucObjectMode: Creation mode (C_ucModeNoObject ou C_ucModeRealObject)
|
||||
C_ucModeNoObject does not create a geometric object
|
||||
whereas C_ucModeRealObject does.
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 23 january 1997
|
||||
Revision: YLT - 03 february 1997
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_Create(tdstCircleArcObject *p_CircleArcObject,
|
||||
unsigned char ucSamplingRate,
|
||||
MTH3D_tdstVector* p_stStartPoint,
|
||||
MTH3D_tdstVector* p_stEndPoint,
|
||||
MTH3D_tdstVector* p_stCenter,
|
||||
unsigned char ucObjectMode,
|
||||
ACP_tdstDynaParam* p_stDynaParams);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_SetColor
|
||||
Description: Set the color of a CircleArc object.
|
||||
Input: p_CircleArcObject: pointer to a pre-created tdstCircleArcObject
|
||||
color: 24 bit color of object. (0->7=B; 8->15=G; 16->23=R ; 24->32=Unused)
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 24 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_SetColor(tdstCircleArcObject *p_CircleArcObject,long color);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_SetViewPortAttributes
|
||||
Description: Set the viewportattributes for drawing.
|
||||
Input: p_CircleArcObject: pointer to a pre-created tdstCircleArcObject
|
||||
p_ViewPortAttributes: pointer to pre-defined viewport attributes
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 24 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_SetViewPortAttributes(tdstCircleArcObject *p_CircleArcObject,GLD_tdstViewportAttributes *p_ViewPortAttributes);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_Draw
|
||||
Description: Draw CircleArc object on screen
|
||||
Input: p_CircleArcObject: pointer to a pre-created tdstCircleArcObject
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 24 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_Draw(tdstCircleArcObject *p_CircleArcObject);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_Free
|
||||
Description: Free memory allocated by the CircleArc objet
|
||||
Input: p_CircleArcObject: pointer to a tdstCircleArcObject
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 29 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_Free(tdstCircleArcObject *p_CircleArcObject);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_ChangeParams
|
||||
Description: Changes the parameters of a CircleArc objet and recalculates the coordinates
|
||||
of the points.
|
||||
Input: p_CircleArcObject: Pointer to a pre-created CircleArc object
|
||||
p_stStartPoint: Pointer to the start point
|
||||
p_stEndPoint: Pointer to the end Point
|
||||
p_stCenter: Pointer to the center of the circle
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 6 february 1997
|
||||
Revision:
|
||||
|
||||
Notes: If an input parameter is 0, this parameter is simply not
|
||||
affected. This enables to change easily only one parameter
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_ChangeParams(tdstCircleArcObject *p_CircleArcObject,
|
||||
MTH3D_tdstVector *p_stStartPoint,
|
||||
MTH3D_tdstVector *p_stEndPoint,
|
||||
MTH3D_tdstVector *p_stCenter);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_xCircleArcObject_GetSpeed
|
||||
Description: returns the speed at a given sample (n<> of the point) of a CircleArc object
|
||||
Input: p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
ucSampleNo: n<> of the point to get the speed from.
|
||||
Output: return value is the speed.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 03 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
MTH_tdxReal fn_xCircleArcObject_GetSpeed(tdstCircleArcObject *p_CircleArcObject,unsigned char ucSampleNo);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_xCircleArcObject_GetPoint
|
||||
Description: returns the coordinates in the global rep<65>re of the point at a
|
||||
given sample (n<> of the point) of a CircleArc object.
|
||||
Input: p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
ucSampleNo: n<> of the point to get the coordinates from.
|
||||
p_ReturnVector: pointer to a vector to be returned.
|
||||
Output: *p_ReturnVector is a vector countaining the.coordinates of the point.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 03 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_GetPoint(tdstCircleArcObject *p_CircleArcObject,unsigned char ucSampleNo,MTH3D_tdstVector* p_ReturnVector);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_GlobalToLocal
|
||||
Description: Changes coordinates of a point from global coordinates to local.
|
||||
Input: p_CircleArcObject: pointer to the circle arc object
|
||||
p_stDestVector: pointer to the destination vector
|
||||
p_stSourceVector: pointer to the source vector
|
||||
Output: *p_stDestVector is a vector countaining the.coordinates in the local
|
||||
repere of the plan.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 4 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_GlobalToLocal( tdstCircleArcObject *p_CircleArcObject,
|
||||
MTH3D_tdstVector *p_stDestVector,
|
||||
MTH3D_tdstVector *p_stSourceVector);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vCircleArcObject_LocalToGlobal
|
||||
Description: Changes coordinates of a point from local coordinates to global
|
||||
Input: p_CircleArcObject: pointer to the circle arc object
|
||||
p_stDestVector: pointer to the destination vector
|
||||
p_stSourceVector: pointer to the source vector
|
||||
Output: *p_stDestVector is a vector countaining the.coordinates in the global
|
||||
repere of the plan.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 4 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircleArcObject_LocalToGlobal( tdstCircleArcObject *p_CircleArcObject,
|
||||
MTH3D_tdstVector *p_stDestVector,
|
||||
MTH3D_tdstVector *p_stSourceVector);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_ucCircleArcObject_GetSamplingRate
|
||||
Description: Gets the sampling rate of a CircleArcObject objet
|
||||
Input: p_CircleArcObject: Pointer to a pre-created CircleArc object
|
||||
Output: return value is the sampling rate of the circle arc object
|
||||
Author: Yann Le Tensorer
|
||||
Date: 5 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
unsigned char fn_ucCircleArcObject_GetSamplingRate(tdstCircleArcObject *p_CircleArcObject);
|
||||
|
||||
/*===============================================================================
|
||||
Function name: fn_bCircleArcObject_SetSamplingRate
|
||||
Description: Modifies the sampling rate of a CircleArc object, and changes all
|
||||
the depending parameters (including dynamic sampling rate)
|
||||
Input: p_CircleArcObject: pointer to a preallocated tdstCircleArcObject
|
||||
ucSamplingRate: New sampling rate
|
||||
Output: return value is true if sampling rate could be modified,
|
||||
false if not.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 5 february 1997
|
||||
Revision:
|
||||
Note: The sampling rate can only be modified for objects that have been
|
||||
created using C_ucModeNoObject at their creation.
|
||||
================================================================================*/
|
||||
ACP_tdxBool fn_bCircleArcObject_SetSamplingRate(tdstCircleArcObject *p_CircleArcObject,
|
||||
unsigned char ucSamplingRate);
|
||||
/*==========================================================
|
||||
Function name: fn_vCircle_FindCenter
|
||||
Description: Finds the 3D coordinate of the center of the circle on which are 3 points.
|
||||
Input: p_FirstPoint: pointer to the first point
|
||||
p_SecondPoint: pointer to the second point
|
||||
p_ThirdPoint: pointer to the third point
|
||||
p_ReturnCenter: pointer to a point to be returned.
|
||||
Output: *p_ReturnCenter is a vector countaining the.coordinates of the center.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 6 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vCircle_FindCenter( MTH3D_tdstVector *p_FirstPoint,
|
||||
MTH3D_tdstVector *p_SecondPoint,
|
||||
MTH3D_tdstVector *p_ThirdPoint,
|
||||
MTH3D_tdstVector *p_ReturnCenter);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
94
Rayman_X/cpa/tempgrp/Owp/inc/CurObj.hpp
Normal file
94
Rayman_X/cpa/tempgrp/Owp/inc/CurObj.hpp
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : CurObj.hpp
|
||||
//
|
||||
// Definition of the cursor object
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : CPA_Object
|
||||
// CPA_EdMot<ACP_tdxHandleOfLink>
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 29 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __CursorOBJECT_HPP__
|
||||
#define __CursorOBJECT_HPP__
|
||||
|
||||
class Waypoint_Interface;
|
||||
class LinkBez;
|
||||
|
||||
//----------- engine structure
|
||||
typedef struct {} tdstCursor;
|
||||
typedef tdstCursor* ACP_tdxHandleOfCursor;
|
||||
//-----------
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eCursorNoLimit,
|
||||
eCursorCircularLimit
|
||||
}
|
||||
eCursorMouseMoveLimit;
|
||||
|
||||
class Cursor : public CPA_BaseObject
|
||||
{
|
||||
protected:
|
||||
static long ms_lNbCursor; // cursor counter
|
||||
static Waypoint_Interface* ms_poInterface; // interface
|
||||
|
||||
CPA_SuperObject* m_poSuperObject;
|
||||
MTH3D_tdstVector m_stVertex; // local Vertex of the cursor in the m_poParent axis
|
||||
GLI_tdxValue m_xDim; // dim of the cursor
|
||||
CPA_SuperObject* m_poParent; // parent object = physical parent : just for axis to store vertex
|
||||
BOOL m_bCursorMove; // cursor moves
|
||||
eCursorMouseMoveLimit m_eMouseMoveLimit;
|
||||
|
||||
public:
|
||||
// static
|
||||
static void fn_vInitObject (Waypoint_Interface* poInterface);
|
||||
static Waypoint_Interface* GetInterface (void);
|
||||
|
||||
Cursor ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *poOwner, eCursorMouseMoveLimit elimit = eCursorNoLimit );
|
||||
void *GetEngineStruct (void) { return NULL; }
|
||||
|
||||
// data
|
||||
long GetDataType (void);
|
||||
void* GetData (void);
|
||||
|
||||
// super object
|
||||
void SetSuperObject ( CPA_SuperObject* poSuperObject) { m_poSuperObject=poSuperObject; }
|
||||
CPA_SuperObject* GetSuperObject (void) { return m_poSuperObject; }
|
||||
|
||||
//set
|
||||
void fn_vSetAbsoluteVertex ( MTH3D_tdstVector* pAbsoluteVertex );
|
||||
void fn_vSetLocalVertex ( MTH3D_tdstVector* pLocalVertex ) { m_stVertex = *pLocalVertex; }
|
||||
|
||||
//get
|
||||
void fn_vGetAbsoluteVertex ( MTH3D_tdstVector* pAbsoluteVertex );
|
||||
void fn_vGetLocalVertex ( MTH3D_tdstVector* pLocalVertex ) { *pLocalVertex = m_stVertex; }
|
||||
|
||||
// moves
|
||||
void fn_vStartMove ( MTH3D_tdstVector* pstStartVertex );
|
||||
void fn_vMove ( MTH3D_tdstVector* pstTranslation );
|
||||
void fn_vEndMove (void);
|
||||
|
||||
// draw
|
||||
void fn_vDraw (void);
|
||||
|
||||
// move
|
||||
BOOL fn_bCursorMove (void);
|
||||
|
||||
protected :
|
||||
BOOL fn_bCanMove ( MTH3D_tdstVector* pstVertex );
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //__OBJECT_HPP__
|
254
Rayman_X/cpa/tempgrp/Owp/inc/Dynamic.h
Normal file
254
Rayman_X/cpa/tempgrp/Owp/inc/Dynamic.h
Normal file
@@ -0,0 +1,254 @@
|
||||
/*==========================================================
|
||||
File: Dynamic.h
|
||||
Prupose: Dynamic parameters of a connection
|
||||
Author: Yann Le Tensorer
|
||||
Creation Date: 29 january 1997
|
||||
Revision : Yann Le Tensorer
|
||||
04 february 1997
|
||||
Added function fn_vDynamicObject_GetParams
|
||||
Version 1.01
|
||||
===========================================================*/
|
||||
|
||||
#include "acp_base.h"
|
||||
#include "mth_real.h"
|
||||
|
||||
#ifndef __DYNA_H__
|
||||
#define __DYNA_H__
|
||||
|
||||
#define C_ucNone 0
|
||||
#define C_ucConst 1
|
||||
#define C_ucLinear 2
|
||||
#define C_ucSinus 3
|
||||
|
||||
typedef struct _ACP_tdstDynaParam
|
||||
{
|
||||
unsigned char ucDynamicType;
|
||||
unsigned char ucSamplingRate;
|
||||
MTH_tdxReal xSpeed;
|
||||
MTH_tdxReal xStartSpeed;
|
||||
MTH_tdxReal xStartAngle;
|
||||
MTH_tdxReal xEndAngle;
|
||||
MTH_tdxReal xEndSpeed;
|
||||
MTH_tdxReal xMaxSpeed;
|
||||
MTH_tdxReal* d_stListOfSpeeds;
|
||||
|
||||
} ACP_tdstDynaParam;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vDynamicObject_Calculate
|
||||
Description: Caculates the speeds at sampled points, according to dynamic parameters
|
||||
Input: p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 30 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vDynamicObject_Calculate(ACP_tdstDynaParam* p_stDynaParam);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vDynamicObject_Create
|
||||
Description: Creates a dynamic parameters object
|
||||
Input: p_stDynaParam: pointer to a preallocated tdstDynaParam structure
|
||||
ucSamplingRate: sampling rate
|
||||
ucDynamicType: dynamic type (C_NONE,C_CONST,C_LINEAR,C_SINUS)
|
||||
xFirst,xSecond,xThird: See table below
|
||||
|
||||
Type: | C_NONE | C_CONST | C_LINEAR | C_SINUS
|
||||
===========================================================
|
||||
xFirst | - | speed | start speed | start angle
|
||||
| | | |
|
||||
xSecond | - | - | end speed | end angle
|
||||
| | | |
|
||||
xThird | - | - | - | max speed
|
||||
|
||||
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 30 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
|
||||
void fn_vDynamicObject_Create( ACP_tdstDynaParam* p_stDynaParam,
|
||||
unsigned char ucSamplingRate,
|
||||
unsigned char ucDynamicType,
|
||||
MTH_tdxReal xFirst,
|
||||
MTH_tdxReal xSecond,
|
||||
MTH_tdxReal xThird);
|
||||
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vDynaParams_Free
|
||||
Description: removes the allocated ram for DynaParams
|
||||
Input: p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 30 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vDynamicObject_Free(ACP_tdstDynaParam* p_stDynaParam);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vDynamicObject_ChangeParams
|
||||
Description: changes the dynamic parameters (except sampling rate)
|
||||
Input: p_stDynaParam: pointer to a preallocated tdstDynaParam structure
|
||||
ucDynamicType: dynamic type (C_ucNone,C_ucConst,C_ucLinear,C_ucSinus)
|
||||
xFirst,xSecond,xThird: See table below
|
||||
|
||||
Type: | C_ucNone | C_ucConst | C_ucLinear | C_ucSinus
|
||||
===========================================================
|
||||
xFirst | - | speed | start speed | start angle
|
||||
| | | |
|
||||
xSecond | - | - | end speed | end angle
|
||||
| | | |
|
||||
xThird | - | - | - | max speed
|
||||
|
||||
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 30 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
|
||||
void fn_vDynamicObject_ChangeParams( ACP_tdstDynaParam* p_stDynaParam,
|
||||
unsigned char ucDynamicType,
|
||||
MTH_tdxReal xFirst,
|
||||
MTH_tdxReal xSecond,
|
||||
MTH_tdxReal xThird);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vDynamicObject_GetParams
|
||||
Description: Gets the dynamic parameters (including sampling rate)
|
||||
Input: p_stDynaParam: pointer to a preallocated tdstDynaParam structure
|
||||
p_ucDynamicType:pointer to get dynamic type (C_ucNone,C_ucConst,C_ucLinear,C_ucSinus)
|
||||
p_SamplingRate: pointer to get sampling rate
|
||||
p_xFirst,p_xSecond,p_xThird:pointers to parameters to get See table below
|
||||
|
||||
Type: | C_ucNone | C_ucConst | C_ucLinear | C_ucSinus
|
||||
===========================================================
|
||||
xFirst | - | speed | start speed | start angle
|
||||
| | | |
|
||||
xSecond | - | - | end speed | end angle
|
||||
| | | |
|
||||
xThird | - | - | - | max speed
|
||||
|
||||
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 04 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
|
||||
void fn_vDynamicObject_GetParams( ACP_tdstDynaParam* p_stDynaParam,
|
||||
unsigned char* p_ucDynamicType,
|
||||
unsigned char* p_ucSamplingRate,
|
||||
MTH_tdxReal* p_xFirst,
|
||||
MTH_tdxReal* p_xSecond,
|
||||
MTH_tdxReal* p_xThird);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_xDynamicObject_GetSpeed
|
||||
Description: returns the speed at a given sample (n<> of the point)
|
||||
Input: p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
ucSampleNo: n<> of the point to get the speed from.
|
||||
Output: return value is the speed.
|
||||
Author: Yann Le Tensorer
|
||||
Date: 31 january 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
MTH_tdxReal fn_xDynamicObject_GetSpeed(ACP_tdstDynaParam* p_stDynaParams,unsigned char ucSampleNo);
|
||||
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vDynamicObject_ChangeSamplingRate
|
||||
Description: Changes the sampling rate of a dynamic object
|
||||
Input: p_stDynaParam: pointer to a preallocated tdstDynaParam structure
|
||||
ucSamplingRate: sampling rate
|
||||
Output: none
|
||||
Author: Yann Le Tensorer
|
||||
Date: 5 february 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
|
||||
void fn_vDynamicObject_ChangeSamplingRate( ACP_tdstDynaParam* p_stDynaParam,
|
||||
unsigned char ucSamplingRate);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vDynamicObject_CreateNotSampled
|
||||
Description: Creates a dynamic parameters object for not sampled type
|
||||
Input: p_stDynaParam: pointer to a preallocated tdstDynaParam structure
|
||||
ucDynamicType: dynamic type (C_NONE,C_CONST,C_LINEAR,C_SINUS)
|
||||
xFirst,xSecond,xThird: See table below
|
||||
|
||||
Type: | C_NONE | C_CONST | C_LINEAR | C_SINUS
|
||||
===========================================================
|
||||
xFirst | - | speed | start speed | start angle
|
||||
| | | |
|
||||
xSecond| - | - | end speed | end angle
|
||||
| | | |
|
||||
xThird | - | - | - | max speed
|
||||
|
||||
|
||||
Output: none
|
||||
Author: Albert Pais
|
||||
Date: February 04, 1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vDynamicObject_CreateNotSampled
|
||||
(
|
||||
ACP_tdstDynaParam* /*p_stDynaParam*/,
|
||||
unsigned char /*ucDynamicType*/,
|
||||
MTH_tdxReal /*xFirst*/,
|
||||
MTH_tdxReal /*xSecond*/,
|
||||
MTH_tdxReal /*xThird*/
|
||||
);
|
||||
|
||||
/*==========================================================
|
||||
Function name: fn_vDynamicObject_CalculateNotSampled
|
||||
Description: Caculates specific coef when speed is not sampled
|
||||
Input:
|
||||
p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
the initial dist beetween the initial point and the final point
|
||||
Output: none
|
||||
Remark :
|
||||
The xSpeed field of the structure is used to store some
|
||||
parameters used at execution
|
||||
Author: Albert Pais
|
||||
Date: Frebruary 4,1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
void fn_vDynamicObject_CalculateNotSampled
|
||||
(
|
||||
ACP_tdstDynaParam* /*_p_stDynaParam*/,
|
||||
MTH_tdxReal /*_xInitialDist*/
|
||||
);
|
||||
/*==========================================================
|
||||
Function name: fn_xDynamicObject_GetSpeedNotSampled
|
||||
Description: returns the speed at a given position when it is not sampled
|
||||
Input:
|
||||
p_stDynaParam: pointer to a pre-created tdstDynaParam structure
|
||||
_xDist : the dist beetween the position where speed is required and the point to reach
|
||||
Output: return value is the speed.
|
||||
Author: Albert Pais
|
||||
Date: February 4,1997
|
||||
Revision:
|
||||
==========================================================*/
|
||||
MTH_tdxReal fn_xDynamicObject_GetSpeedNotSampled
|
||||
(
|
||||
ACP_tdstDynaParam* /*_p_stDynaParams*/,
|
||||
MTH_tdxReal /*_xDist*/
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
349
Rayman_X/cpa/tempgrp/Owp/inc/Edi_Bez.h
Normal file
349
Rayman_X/cpa/tempgrp/Owp/inc/Edi_Bez.h
Normal file
@@ -0,0 +1,349 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
HEADER FILE FOR :
|
||||
Definition of (way) editor object : bezier curves.
|
||||
------------------------------------------------------------------------------------------
|
||||
File Name :
|
||||
Ed_Bez.h
|
||||
------------------------------------------------------------------------------------------
|
||||
Creation :
|
||||
* Date :
|
||||
February 20, 1997
|
||||
* Author :
|
||||
Albert PAIS
|
||||
------------------------------------------------------------------------------------------
|
||||
Contents :
|
||||
This file defines structures and functions for the bezier curve used by
|
||||
the (way) editor
|
||||
------------------------------------------------------------------------------------------
|
||||
Remarks :
|
||||
Code comes from old bezier.h made by Yann Le Tensorer (January-February 1997)
|
||||
------------------------------------------------------------------------------------------
|
||||
See Also :
|
||||
Mth_Bezier.h/.c for mathematical bezier curve definition and implementation.
|
||||
------------------------------------------------------------------------------------------
|
||||
Modification :
|
||||
* Date :
|
||||
* Author :
|
||||
* Modify :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(__EDIBEZ_TYPES__)
|
||||
#define __EDIBEZ_TYPES__
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define EDIBEZ_UNDEF
|
||||
#define ONLY_TYPES
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
INCLUDE FILES :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
mth3d.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Definition of standard 3d mathematic
|
||||
objects
|
||||
----------------------------------------
|
||||
*/
|
||||
#include "mth.h"
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
acp_base.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Definition of standard CPA objects
|
||||
----------------------------------------
|
||||
*/
|
||||
#include "acp_base.h"
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
gld.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Graphic Library for Display
|
||||
----------------------------------------
|
||||
*/
|
||||
#include "gld.h"
|
||||
|
||||
#if defined(EDIBEZ_UNDEF)
|
||||
#undef ONLY_TYPES
|
||||
#undef EDIBEZ_UNDEF
|
||||
#endif /* !EDIBEZ_UNDEF */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
TYPE AND STRUCTURE DEFINITION :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
void fn_vJustToLinkBez (void);
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
Type definition :
|
||||
The bezier object for (way) editor
|
||||
----------------------------------------
|
||||
* Structure Name :
|
||||
EDWAY_tdstBezierObject_
|
||||
* Type def :
|
||||
EDWAY_tdstBezierObject
|
||||
* Handles :
|
||||
EDWAY_tdhBezierObject
|
||||
----------------------------------------
|
||||
Creation Date :
|
||||
February 20,1997
|
||||
Author :
|
||||
Albert PAIS
|
||||
----------------------------------------
|
||||
Members :
|
||||
* Type : MTH3D_tdhBezierCurve
|
||||
Name : m_hBezierCurve
|
||||
Meaning : A handle on the mathematical
|
||||
bezier curve associated
|
||||
* Type : ACP_tdxHandleOfObject
|
||||
Name : m_hGeometricObject
|
||||
Meaning : A handle on a geometric
|
||||
object
|
||||
* Type : ACP_tdxHandleOfElement
|
||||
Name : m_hLineElement
|
||||
Meaning : A handle on a line element
|
||||
object
|
||||
* Type : long
|
||||
Name : m_lColor
|
||||
Meaning : Color of the curve (24bit)
|
||||
* Type : GLD_tdstViewportAttributes
|
||||
Name : m_pstViewPortAttributes
|
||||
Meaning : pointer on the view port
|
||||
attributes
|
||||
* Type : MTH3D_tdstVector
|
||||
Name : m_dstListOfPoints
|
||||
Meaning : Dynamic array on the
|
||||
points of the bezier curve
|
||||
in case mode=C_ucModeNoObject
|
||||
* Type : ACP_tdstDynaParam
|
||||
Name : m_pstDynaParams
|
||||
Meaning : A pointer on the dynamic
|
||||
params associated
|
||||
* Type : unsigned char
|
||||
Name : m_ucObjectMode
|
||||
Meaning : the object mode :
|
||||
C_ucModeNoObject or C_ucModeRealObject
|
||||
---------------------------------------
|
||||
*/
|
||||
#ifdef _EDWAY_BEZ_FRIEND_
|
||||
typedef struct EDWAY_tdstBezierObject_
|
||||
{
|
||||
MTH3D_tdhBezierCurve m_hBezierCurve;
|
||||
ACP_tdxHandleOfObject m_hGeometricObject;
|
||||
ACP_tdxHandleOfElement m_hLineElement;
|
||||
long m_lColor;
|
||||
GLD_tdstViewportAttributes *m_pstViewPortAttributes;
|
||||
MTH3D_tdstVector **m_pdstListOfPoints;
|
||||
ACP_tdstDynaParam *m_pstDynaParams;
|
||||
unsigned char m_ucObjectMode;
|
||||
} EDWAY_tdstBezierObject;
|
||||
#endif /* _EDWAY_BEZ_FRIEND_ */
|
||||
typedef struct EDWAY_tdstBezierObject_* EDWAY_tdhBezierObject;
|
||||
|
||||
#endif /* !__EDIBEZ_TYPES__ */
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
|
||||
#if !defined(__EDIBEZ_VARS__)
|
||||
#define __EDIBEZ_VARS__
|
||||
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#if !defined(GLOBALS)
|
||||
#define EXTERN extern
|
||||
#else /* !GLOBALS */
|
||||
#define EXTERN
|
||||
#endif /* !GLOBALS */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
VARIABLE DECLARATION :
|
||||
<type> <variable name>
|
||||
#if defined(GLOBALS)
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-CONSTANT DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* Invalid handle :*/
|
||||
#define EDWAY_C_hInvalidBezierObject ((EDWAY_tdhBezierObject)NULL)
|
||||
/* no geometric object created : */
|
||||
#define EDWAY_C_ucModeNoObject 0
|
||||
/* a geometric object is created */
|
||||
#define EDWAY_C_ucModeRealObject 1
|
||||
|
||||
#undef extern
|
||||
#endif /* !__EDIBEZ_VARS__ */
|
||||
|
||||
#if !defined (__EDIBEZ_PROTOS__)
|
||||
#define __EDIBEZ_PROTOS__
|
||||
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef _EDWAY_BEZ_FRIEND_
|
||||
#define EDWAY_M_vBezierObjectGetPointerParam(_hBezObj,_pxPointer,_SlotName)\
|
||||
(*(_pxPointer) = (_hBezObj)->m_st##_SlotName##)
|
||||
#define EDWAY_M_xBezierObjectGetScalarParam(_hBezObj,_Prefix,_SlotName)\
|
||||
((_hBezObj)->m_##_Prefix## ##_SlotName##)
|
||||
#define EDWAY_M_vBezierObjectSetPointerParam(_hBezObj,_pxPointer,_SlotName)\
|
||||
((_hBezObj)->m_st##_SlotName## = *(_pxPointer))
|
||||
#define EDWAY_M_vBezierObjectSetScalarParam(_hBezObj,_xScalar,_Prefix,_SlotName)\
|
||||
((_hBezObj)->m_##_Prefix## ##_SlotName## = (_xScalar))
|
||||
|
||||
#define EDWAY_M_uwBezierObjectSizeOf()\
|
||||
((unsigned short)(sizeof(struct EDWAY_tdstBezierObject_)))
|
||||
|
||||
#else /* _EDWAY_BEZ_FRIEND_ */
|
||||
|
||||
#define EDWAY_M_vBezierObjectGetPointerParam(_hBezObj,_pxPointer,_SlotName)\
|
||||
(EDWAY_fnv_BezierObject_Get##_SlotName##(_hBezObj,_pxPointer))
|
||||
#define EDWAY_M_xBezierObjectGetScalarParam(_hBezObj,_Prefix,_SlotName)\
|
||||
(EDWAY_fn##_Prefix##_BezierObject_Get##_SlotName##(_hBezObj))
|
||||
#define EDWAY_M_vBezierObjectSetPointerParam(_hBezObj,_pxPointer,_SlotName)\
|
||||
(EDWAY_fnv_BezierObject_Set##_SlotName##(_hBezObj,_pxPointer))
|
||||
#define EDWAY_M_vBezierObjectSetScalarParam(_hBezObj,_xScalar,_Prefix,_SlotName)\
|
||||
(EDWAY_fnv_BezierObject_Set##_SlotName##(_hBezObj,_xScalar))
|
||||
|
||||
#define EDWAY_M_uwBezierObjectSizeOf()\
|
||||
EDWAY_fnuw_BezierObject_SizeOf()
|
||||
|
||||
#endif /* _EDWAY_BEZ_FRIEND_ */
|
||||
|
||||
#define EDWAY_M_hBezierObjectGetBezierCurve(_hBezObjCon)\
|
||||
EDWAY_M_xBezierObjectGetScalarParam(_hBezObjCon,h,BezierCurve)
|
||||
#define EDWAY_M_hBezierObjectGetGeometricObject(_hBezObjCon)\
|
||||
EDWAY_M_xBezierObjectGetScalarParam(_hBezObjCon,h,GeometricObject)
|
||||
#define EDWAY_M_hBezierObjectGetLineElement(_hBezObjCon)\
|
||||
EDWAY_M_xBezierObjectGetScalarParam(_hBezObjCon,h,LineElement)
|
||||
#define EDWAY_M_lBezierObjectGetColor(_hBezObjCon)\
|
||||
EDWAY_M_xBezierObjectGetScalarParam(_hBezObjCon,l,Color)
|
||||
#define EDWAY_M_pstBezierObjectGetViewPortAttributes(_hBezObjCon)\
|
||||
EDWAY_M_xBezierObjectGetScalarParam(_hBezObjCon,pst,ViewPortAttributes)
|
||||
#define EDWAY_M_dstBezierObjectGetListOfPoints(_hBezObjCon)\
|
||||
EDWAY_M_xBezierObjectGetScalarParam(_hBezObjCon,dst,ListOfPoints)
|
||||
#define EDWAY_M_pstBezierObjectGetDynaParams(_hBezObjCon)\
|
||||
EDWAY_M_xBezierObjectGetScalarParam(_hBezObjCon,pst,DynaParams)
|
||||
#define EDWAY_M_ucBezierObjectGetObjectMode(_hBezObjCon)\
|
||||
EDWAY_M_xBezierObjectGetScalarParam(_hBezObjCon,uc,ObjectMode)
|
||||
|
||||
#define EDWAY_M_vBezierObjectSetBezierCurve(_hBezObjCon,_hBezCur)\
|
||||
EDWAY_M_vBezierObjectSetScalarParam(_hBezObjCon,_hBezCur,h,BezierCurve)
|
||||
#define EDWAY_M_vBezierObjectSetGeometricObject(_hBezObjCon,_hGeoObj)\
|
||||
EDWAY_M_vBezierObjectSetScalarParam(_hBezObjCon,_hGeoObj,h,GeometricObject)
|
||||
#define EDWAY_M_vBezierObjectSetLineElement(_hBezObjCon,_LinEle)\
|
||||
EDWAY_M_vBezierObjectSetScalarParam(_hBezObjCon,_LinEle,h,LineElement)
|
||||
#define EDWAY_M_vBezierObjectSetColor(_hBezObjCon,_lCol)\
|
||||
EDWAY_M_vBezierObjectSetScalarParam(_hBezObjCon,_lCol,l,Color)
|
||||
#define EDWAY_M_vBezierObjectSetViewPortAttributes(_hBezObjCon,_pstViePorAtt)\
|
||||
EDWAY_M_vBezierObjectSetScalarParam(_hBezObjCon,_pstViePorAtt,pst,ViewPortAttributes)
|
||||
#define EDWAY_M_vBezierObjectSetListOfPoints(_hBezObjCon,_dstLisOfPts)\
|
||||
EDWAY_M_vBezierObjectSetScalarParam(_hBezObjCon,_dstLisOfPts,dst,ListOfPoints)
|
||||
#define EDWAY_M_vBezierObjectSetDynaParams(_hBezObjCon,_pstDynPar)\
|
||||
EDWAY_M_vBezierObjectSetScalarParam(_hBezObjCon,_pstDynPar,pst,DynaParams)
|
||||
#define EDWAY_M_vBezierObjectSetObjectMode(_hBezObjCon,_ucObjMod)\
|
||||
EDWAY_M_vBezierObjectSetScalarParam(_hBezObjCon,_ucObjMod,uc,ObjectMode)
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
EDWAY_tdhBezierObject EDWAY_fnh_BezierObject_CreateStructure(void);
|
||||
void EDWAY_fnv_BezierObject_DestroyStructure(EDWAY_tdhBezierObject);
|
||||
/* Creation :*/
|
||||
void EDWAY_fnv_BezierObject_Create
|
||||
(EDWAY_tdhBezierObject,unsigned char,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*,unsigned char,ACP_tdstDynaParam*, MTH3D_tdstVector** pdstListOfPoints);
|
||||
|
||||
void EDWAY_fnv_BezierObject_CreateWithCurve
|
||||
(
|
||||
EDWAY_tdhBezierObject _hBezierObject,
|
||||
MTH3D_tdhBezierCurve _hBezierCurve,
|
||||
unsigned char _ucObjectMode,
|
||||
ACP_tdstDynaParam* _pstDynaParams,
|
||||
MTH3D_tdstVector** pdstListOfPoints
|
||||
);
|
||||
|
||||
void EDWAY_fnv_BezierObject_Free(EDWAY_tdhBezierObject);
|
||||
|
||||
unsigned short EDWAY_fnuw_BezierObject_SizeOf(void);
|
||||
|
||||
/* computing points :*/
|
||||
void EDWAY_fnv_BezierObject_Calculate
|
||||
(EDWAY_tdhBezierObject);
|
||||
|
||||
/* Getting fields values :*/
|
||||
MTH3D_tdhBezierCurve EDWAY_fnh_BezierObject_GetBezierCurve(EDWAY_tdhBezierObject);
|
||||
ACP_tdxHandleOfObject EDWAY_fnh_BezierObject_GetGeometricObject(EDWAY_tdhBezierObject);
|
||||
ACP_tdxHandleOfElement EDWAY_fnh_BezierObject_GetLineElement(EDWAY_tdhBezierObject);
|
||||
long EDWAY_fnl_BezierObject_GetColor(EDWAY_tdhBezierObject);
|
||||
GLD_tdstViewportAttributes* EDWAY_fnpst_BezierObject_GetViewPortAttributes(EDWAY_tdhBezierObject);
|
||||
MTH3D_tdstVector* EDWAY_fndst_BezierObject_GetListOfPoints(EDWAY_tdhBezierObject);
|
||||
ACP_tdstDynaParam* EDWAY_fnpst_BezierObject_GetDynaParams(EDWAY_tdhBezierObject);
|
||||
unsigned char EDWAY_fnuc_BezierObject_GetObjectMode(EDWAY_tdhBezierObject);
|
||||
|
||||
/* changing (and only changing) fields value */
|
||||
void EDWAY_fnv_BezierObject_SetBezierCurve(EDWAY_tdhBezierObject,MTH3D_tdhBezierCurve);
|
||||
void EDWAY_fnv_BezierObject_SetGeometricObject(EDWAY_tdhBezierObject,ACP_tdxHandleOfObject);
|
||||
void EDWAY_fnv_BezierObject_SetLineElement(EDWAY_tdhBezierObject,ACP_tdxHandleOfElement);
|
||||
void EDWAY_fnv_BezierObject_SetColor(EDWAY_tdhBezierObject,long);
|
||||
void EDWAY_fnv_BezierObject_SetViewPortAttributes(EDWAY_tdhBezierObject,GLD_tdstViewportAttributes*);
|
||||
void EDWAY_fnv_BezierObject_SetListOfPoints(EDWAY_tdhBezierObject,MTH3D_tdstVector*);
|
||||
void EDWAY_fnv_BezierObject_SetDynaParams(EDWAY_tdhBezierObject,ACP_tdstDynaParam *);
|
||||
void EDWAY_fnv_BezierObject_SetObjectMode(EDWAY_tdhBezierObject,unsigned char);
|
||||
|
||||
/* Changing fields value and reflect back consequences : */
|
||||
ACP_tdxBool EDWAY_fnb_BezierObject_ChangeSamplingRate(EDWAY_tdhBezierObject,unsigned char);
|
||||
|
||||
void EDWAY_fnv_BezierObject_ChangeParams
|
||||
(EDWAY_tdhBezierObject ,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*);
|
||||
|
||||
void EDWAY_fnv_BezierObject_GetParams
|
||||
(EDWAY_tdhBezierObject ,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*);
|
||||
|
||||
/* retrieving speed :*/
|
||||
MTH_tdxReal fn_xBezierObject_GetSpeed
|
||||
(EDWAY_tdhBezierObject,unsigned char);
|
||||
|
||||
/* retrieving point */
|
||||
void EDWAY_fnv_BezierObject_GetPoint
|
||||
(EDWAY_tdhBezierObject,unsigned char,MTH3D_tdstVector*);
|
||||
|
||||
/* drawing the bezier object */
|
||||
void EDWAY_fnv_BezierObject_Draw(EDWAY_tdhBezierObject);
|
||||
|
||||
|
||||
#endif /* !__EDIBEZ_PROTOS__ */
|
||||
|
||||
#endif /* !ONLY_TYPES */
|
420
Rayman_X/cpa/tempgrp/Owp/inc/Edi_CiAr.h
Normal file
420
Rayman_X/cpa/tempgrp/Owp/inc/Edi_CiAr.h
Normal file
@@ -0,0 +1,420 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
HEADER FILE FOR :
|
||||
Definition of (way) editor object : circle arc curves.
|
||||
------------------------------------------------------------------------------------------
|
||||
File Name :
|
||||
Edi_CiAr.h
|
||||
------------------------------------------------------------------------------------------
|
||||
Creation :
|
||||
* Date :
|
||||
February 25, 1997
|
||||
* Author :
|
||||
Albert PAIS
|
||||
------------------------------------------------------------------------------------------
|
||||
Contents :
|
||||
This file defines structures and functions for the circle arc curve used by
|
||||
the (way) editor
|
||||
------------------------------------------------------------------------------------------
|
||||
Remarks :
|
||||
Code comes from old circlway.h 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 :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#if !defined(__EDICIAR_TYPES__)
|
||||
#define __EDICIAR_TYPES__
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define EDICIAR_UNDEF
|
||||
#define ONLY_TYPES
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
INCLUDE FILES :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
mth3d.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Definition of standard 3d mathematic
|
||||
objects
|
||||
----------------------------------------
|
||||
*/
|
||||
#include "mth.h"
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
acp_base.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Definition of standard CPA objects
|
||||
----------------------------------------
|
||||
*/
|
||||
#include "acp_base.h"
|
||||
/*
|
||||
----------------------------------------
|
||||
File Name :
|
||||
gld.h
|
||||
----------------------------------------
|
||||
Required for :
|
||||
Graphic Library for Display
|
||||
----------------------------------------
|
||||
*/
|
||||
#include "gld.h"
|
||||
|
||||
#if defined(EDICIAR_UNDEF)
|
||||
#undef ONLY_TYPES
|
||||
#undef EDICIAR_UNDEF
|
||||
#endif /* !EDICIAR_UNDEF */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
TYPE AND STRUCTURE DEFINITION :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void JustToLinkCiAr (void);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
Type definition :
|
||||
The circle arc object for (way) editor
|
||||
----------------------------------------
|
||||
* Structure Name :
|
||||
EDWAY_tdstCircleArcObject_
|
||||
* Type def :
|
||||
EDWAY_tdstCircleArcObject
|
||||
* Handles :
|
||||
EDWAY_tdhCircleArcObject
|
||||
----------------------------------------
|
||||
Creation Date :
|
||||
February 25,1997
|
||||
Author :
|
||||
Albert PAIS
|
||||
----------------------------------------
|
||||
Members :
|
||||
* Type : MTH3D_tdhCircleArcCurve
|
||||
Name : m_hCircleArcCurve
|
||||
Meaning : A handle on the mathematical
|
||||
circle arc curve associated
|
||||
* Type : ACP_tdxHandleOfObject
|
||||
Name : m_hGeometricObject
|
||||
Meaning : A handle on a geometric
|
||||
object
|
||||
* Type : ACP_tdxHandleOfElement
|
||||
Name : m_hLineElement
|
||||
Meaning : A handle on a line element
|
||||
object
|
||||
* Type : long
|
||||
Name : m_lColor
|
||||
Meaning : Color of the curve (24bit)
|
||||
* Type : GLD_tdstViewportAttributes
|
||||
Name : m_pstViewPortAttributes
|
||||
Meaning : pointer on the view port
|
||||
attributes
|
||||
* Type : MTH3D_tdstVector
|
||||
Name : m_dstListOfPoints
|
||||
Meaning : Dynamic array on the
|
||||
points of the circle arc curve
|
||||
in case mode=C_ucModeNoObject
|
||||
* Type : ACP_tdstDynaParam
|
||||
Name : m_pstDynaParams
|
||||
Meaning : A pointer on the dynamic
|
||||
params associated
|
||||
* Type : MTH3D_tdstMatrix
|
||||
Name : m_stLocalRepere
|
||||
Meaning : The local repere
|
||||
* Type : MTH3D_tdstMatrix
|
||||
Name : m_stInvLocalRepere
|
||||
Meaning : The inverse matrix of the
|
||||
local repere
|
||||
* Type : MTH3D_tdstVector
|
||||
Name : m_stLocalStartPoint
|
||||
Meaning : The starting point
|
||||
in the local repere
|
||||
* Type : MTH3D_tdstVector
|
||||
Name : m_stLocalEndPoint
|
||||
Meaning : The ending point
|
||||
in the local repere
|
||||
* Type : MTH_tdxReal
|
||||
Name : m_xMainAngle
|
||||
Meaning : The angle between OA,OB,
|
||||
O stands for the center
|
||||
A stands for the starting point
|
||||
B stands for the ending point
|
||||
* Type : unsigned char
|
||||
Name : m_ucObjectMode
|
||||
Meaning : the object mode :
|
||||
C_ucModeNoObject or C_ucModeRealObject
|
||||
---------------------------------------
|
||||
*/
|
||||
#ifdef _EDWAY_CIRCLEARC_FRIEND_
|
||||
typedef struct EDWAY_tdstCircleArcObject_
|
||||
{
|
||||
MTH3D_tdhCircleArcCurve m_hCircleArcCurve;
|
||||
|
||||
ACP_tdxHandleOfObject m_hGeometricObject;
|
||||
ACP_tdxHandleOfElement m_hLineElement;
|
||||
long m_lColor;
|
||||
GLD_tdstViewportAttributes *m_pstViewPortAttributes;
|
||||
// MTH3D_tdstVector *m_dstListOfPoints;
|
||||
MTH3D_tdstVector** m_pdstListOfPoints;
|
||||
|
||||
ACP_tdstDynaParam *m_pstDynaParams;
|
||||
|
||||
MTH3D_tdstMatrix m_stLocalRepere;
|
||||
MTH3D_tdstMatrix m_stInvLocalRepere;
|
||||
MTH3D_tdstVector m_stLocalStartPoint;
|
||||
MTH3D_tdstVector m_stLocalEndPoint;
|
||||
MTH_tdxReal m_xMainAngle;
|
||||
|
||||
unsigned char m_ucObjectMode;
|
||||
} EDWAY_tdstCircleArcObject;
|
||||
#endif /* _EDWAY_CIRCLEARC_FRIEND_ */
|
||||
typedef struct EDWAY_tdstCircleArcObject_* EDWAY_tdhCircleArcObject;
|
||||
|
||||
#endif /* !__EDICIAR_TYPES__ */
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
|
||||
#if !defined(__EDICIAR_VARS__)
|
||||
#define __EDICIAR_VARS__
|
||||
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#if !defined(GLOBALS)
|
||||
#define EXTERN extern
|
||||
#else /* !GLOBALS */
|
||||
#define EXTERN
|
||||
#endif /* !GLOBALS */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
VARIABLE DECLARATION :
|
||||
<type> <variable name>
|
||||
#if defined(GLOBALS)
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-CONSTANT DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* Invalid handle :*/
|
||||
#define EDWAY_C_hInvalidCircleArcObject ((EDWAY_tdhCircleArcObject)0)
|
||||
/* no geometric object created : */
|
||||
#define EDWAY_C_ucModeNoObject ((unsigned char)0)
|
||||
/* a geometric object is created */
|
||||
#define EDWAY_C_ucModeRealObject ((unsigned char)1)
|
||||
|
||||
#undef extern
|
||||
#endif /* !__EDICIAR_VARS__ */
|
||||
|
||||
#if !defined (__EDICIAR_PROTOS__)
|
||||
#define __EDICIAR_PROTOS__
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef _EDWAY_CIRCLEARC_FRIEND_
|
||||
#define EDWAY_M_vCircleArcObjectGetPointerParam(_hCirArcObj,_pxPointer,_SlotName)\
|
||||
(*(_pxPointer) = (_hCirArcObj)->m_st##_SlotName##)
|
||||
#define EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcObj,_Prefix,_SlotName)\
|
||||
((_hCirArcObj)->m_##_Prefix## ##_SlotName##)
|
||||
#define EDWAY_M_vCircleArcObjectSetPointerParam(_hCirArcObj,_pxPointer,_SlotName)\
|
||||
((_hCirArcObj)->m_st##_SlotName## = *(_pxPointer))
|
||||
#define EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcObj,_xScalar,_Prefix,_SlotName)\
|
||||
((_hCirArcObj)->m_##_Prefix## ##_SlotName## = (_xScalar))
|
||||
|
||||
#define EDWAY_M_uwCircleArcObjectSizeOf()\
|
||||
((unsigned short)(sizeof(struct EDWAY_tdstCircleArcObject_)))
|
||||
|
||||
/* Only defined for friend!!!!! */
|
||||
/* not very clean, but efficient :*/
|
||||
#define EDWAY_M_pstCircleArcObjectGetLocalRepere(_hCirArcObj)\
|
||||
(&(EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcObj,st,LocalRepere)))
|
||||
#define EDWAY_M_pstCircleArcObjectGetInvLocalRepere(_hCirArcObj)\
|
||||
(&(EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcObj,st,InvLocalRepere)))
|
||||
#define EDWAY_M_pstCircleArcObjectGetLocalStartPoint(_hCirArcObj)\
|
||||
(&(EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcObj,st,LocalStartPoint)))
|
||||
#define EDWAY_M_pstCircleArcObjectGetLocalEndPoint(_hCirArcObj)\
|
||||
(&(EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcObj,st,LocalEndPoint)))
|
||||
|
||||
#else /* _EDWAY_CIRCLEARC_FRIEND_ */
|
||||
#define EDWAY_M_vCircleArcObjectGetPointerParam(_hCirArcObj,_pxPointer,_SlotName)\
|
||||
(EDWAY_fnv_CircleArcObject_Get##_SlotName##(_hCirArcObj,_pxPointer))
|
||||
#define EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcObj,_Prefix,_SlotName)\
|
||||
(EDWAY_fn##_Prefix##_CircleArcObject_Get##_SlotName##(_hCirArcObj))
|
||||
#define EDWAY_M_vCircleArcObjectSetPointerParam(_hCirArcObj,_pxPointer,_SlotName)\
|
||||
(EDWAY_fnv_CircleArcObject_Set##_SlotName##(_hCirArcObj,_pxPointer))
|
||||
#define EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcObj,_xScalar,_Prefix,_SlotName)\
|
||||
(EDWAY_fnv_CircleArcObject_Set##_SlotName##(_hCirArcObj,_xScalar))
|
||||
|
||||
#define EDWAY_M_uwCircleArcObjectSizeOf()\
|
||||
EDWAY_fnuw_CircleArcObject_SizeOf()
|
||||
|
||||
#endif /* _EDWAY_CIRCLEARC_FRIEND_ */
|
||||
|
||||
#define EDWAY_M_hCircleArcObjectGetCircleArcCurve(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,h,CircleArcCurve)
|
||||
#define EDWAY_M_hCircleArcObjectGetGeometricObject(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,h,GeometricObject)
|
||||
#define EDWAY_M_hCircleArcObjectGetLineElement(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,h,LineElement)
|
||||
#define EDWAY_M_lCircleArcObjectGetColor(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,l,Color)
|
||||
#define EDWAY_M_pstCircleArcObjectGetViewPortAttributes(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,pst,ViewPortAttributes)
|
||||
#define EDWAY_M_dstCircleArcObjectGetListOfPoints(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,dst,ListOfPoints)
|
||||
#define EDWAY_M_pstCircleArcObjectGetDynaParams(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,pst,DynaParams)
|
||||
#define EDWAY_M_vCircleArcObjectGetLocalRepere(_hCirArcCon,_pstLocRep)\
|
||||
EDWAY_M_vCircleArcObjectGetPointerParam(_hCirArcCon,_pstLocRep,LocalRepere)
|
||||
#define EDWAY_M_vCircleArcObjectGetInvLocalRepere(_hCirArcCon,_pstInvLocRep)\
|
||||
EDWAY_M_vCircleArcObjectGetPointerParam(_hCirArcCon,_pstInvLocRep,InvLocalRepere)
|
||||
#define EDWAY_M_vCircleArcObjectGetLocalStartPoint(_hCirArcCon,_pstLocStaPoi)\
|
||||
EDWAY_M_vCircleArcObjectGetPointerParam(_hCirArcCon,_pstLocStaPoi,LocalStartPoint)
|
||||
#define EDWAY_M_vCircleArcObjectGetLocalEndPoint(_hCirArcCon,_pstLocEndPoi)\
|
||||
EDWAY_M_vCircleArcObjectGetPointerParam(_hCirArcCon,_pstLocEndPoi,LocalEndPoint)
|
||||
#define EDWAY_M_xCircleArcObjectGetMainAngle(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,x,MainAngle)
|
||||
#define EDWAY_M_ucCircleArcObjectGetObjectMode(_hCirArcCon)\
|
||||
EDWAY_M_xCircleArcObjectGetScalarParam(_hCirArcCon,uc,ObjectMode)
|
||||
|
||||
#define EDWAY_M_vCircleArcObjectSetCircleArcCurve(_hCirArcCon,_hCirArcCur)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_hCirArcCur,h,CircleArcCurve)
|
||||
#define EDWAY_M_vCircleArcObjectSetGeometricObject(_hCirArcCon,_hGeoObj)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_hGeoObj,h,GeometricObject)
|
||||
#define EDWAY_M_vCircleArcObjectSetLineElement(_hCirArcCon,_LinEle)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_LinEle,h,LineElement)
|
||||
#define EDWAY_M_vCircleArcObjectSetColor(_hCirArcCon,_lCol)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_lCol,l,Color)
|
||||
#define EDWAY_M_vCircleArcObjectSetViewPortAttributes(_hCirArcCon,_pstViePorAtt)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_pstViePorAtt,pst,ViewPortAttributes)
|
||||
#define EDWAY_M_vCircleArcObjectSetListOfPoints(_hCirArcCon,_dstLisOfPts)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_dstLisOfPts,dst,ListOfPoints)
|
||||
#define EDWAY_M_vCircleArcObjectSetDynaParams(_hCirArcCon,_pstDynPar)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_pstDynPar,pst,DynaParams)
|
||||
#define EDWAY_M_vCircleArcObjectSetLocalRepere(_hCirArcCon,_pstLocRep)\
|
||||
EDWAY_M_vCircleArcObjectSetPointerParam(_hCirArcCon,_pstLocRep,LocalRepere)
|
||||
#define EDWAY_M_vCircleArcObjectSetInvLocalRepere(_hCirArcCon,_pstInvLocRep)\
|
||||
EDWAY_M_vCircleArcObjectSetPointerParam(_hCirArcCon,_pstInvLocRep,InvLocalRepere)
|
||||
#define EDWAY_M_vCircleArcObjectSetLocalStartPoint(_hCirArcCon,_pstLocStaPoi)\
|
||||
EDWAY_M_vCircleArcObjectSetPointerParam(_hCirArcCon,_pstLocStaPoi,LocalStartPoint)
|
||||
#define EDWAY_M_vCircleArcObjectSetLocalEndPoint(_hCirArcCon,_pstLocEndPoi)\
|
||||
EDWAY_M_vCircleArcObjectSetPointerParam(_hCirArcCon,_pstLocEndPoi,LocalEndPoint)
|
||||
#define EDWAY_M_vCircleArcObjectSetMainAngle(_hCirArcCon,_xNewMainAng)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_xNewMainAng,x,MainAngle)
|
||||
#define EDWAY_M_vCircleArcObjectSetObjectMode(_hCirArcCon,_ucObjMod)\
|
||||
EDWAY_M_vCircleArcObjectSetScalarParam(_hCirArcCon,_ucObjMod,uc,ObjectMode)
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* creation and destruction of the structure */
|
||||
EDWAY_tdhCircleArcObject EDWAY_fnh_CircleArcObject_CreateSturcture(void);
|
||||
void EDWAY_fnv_CircleArcObject_DestroyStructure(EDWAY_tdhCircleArcObject);
|
||||
|
||||
/* Creation :*/
|
||||
void EDWAY_fnv_CircleArcObject_Create
|
||||
(EDWAY_tdhCircleArcObject,unsigned char,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*,unsigned char,ACP_tdstDynaParam*,MTH3D_tdstVector** pdstListOfPoints);
|
||||
|
||||
void EDWAY_fnv_CircleArcObject_CreateFromCurve
|
||||
(
|
||||
EDWAY_tdhCircleArcObject _hCircleArcObject,
|
||||
MTH3D_tdhCircleArcCurve _hCircleArcCurve,
|
||||
unsigned char _ucObjectMode,
|
||||
ACP_tdstDynaParam* _pstDynaParams,
|
||||
MTH3D_tdstVector** pdstListOfPoints
|
||||
);
|
||||
|
||||
void EDWAY_fnv_CircleArcObject_Free(EDWAY_tdhCircleArcObject);
|
||||
|
||||
/* computing points :*/
|
||||
void EDWAY_fnv_CircleArcObject_Calculate
|
||||
(EDWAY_tdhCircleArcObject);
|
||||
|
||||
/* getting the size of the structure :*/
|
||||
unsigned short EDWAY_fnuw_CircleArcObject_SizeOf(void);
|
||||
|
||||
/* Getting fields values :*/
|
||||
MTH3D_tdhCircleArcCurve EDWAY_fnh_CircleArcObject_GetCircleArcCurve(EDWAY_tdhCircleArcObject);
|
||||
ACP_tdxHandleOfObject EDWAY_fnh_CircleArcObject_GetGeometricObject(EDWAY_tdhCircleArcObject);
|
||||
ACP_tdxHandleOfElement EDWAY_fnh_CircleArcObject_GetLineElement(EDWAY_tdhCircleArcObject);
|
||||
long EDWAY_fnl_CircleArcObject_GetColor(EDWAY_tdhCircleArcObject);
|
||||
GLD_tdstViewportAttributes* EDWAY_fnpst_CircleArcObject_GetViewPortAttributes(EDWAY_tdhCircleArcObject);
|
||||
MTH3D_tdstVector* EDWAY_fndst_CircleArcObject_GetListOfPoints(EDWAY_tdhCircleArcObject);
|
||||
ACP_tdstDynaParam* EDWAY_fnpst_CircleArcObject_GetDynaParams(EDWAY_tdhCircleArcObject);
|
||||
void EDWAY_fnv_CircleArcObject_GetLocalRepere(EDWAY_tdhCircleArcObject,MTH3D_tdstMatrix*);
|
||||
void EDWAY_fnv_CircleArcObject_GetInvLocalRepere(EDWAY_tdhCircleArcObject,MTH3D_tdstMatrix*);
|
||||
void EDWAY_fnv_CircleArcObject_GetLocalStartPoint(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*);
|
||||
void EDWAY_fnv_CircleArcObject_GetLocalEndPoint(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*);
|
||||
MTH_tdxReal EDWAY_fnx_CircleArcObject_GetMainAngle(EDWAY_tdhCircleArcObject);
|
||||
unsigned char EDWAY_fnuc_CircleArcObject_GetObjectMode(EDWAY_tdhCircleArcObject);
|
||||
|
||||
/* changing (and only changing) fields value */
|
||||
void EDWAY_fnv_CircleArcObject_SetCircleArcCurve(EDWAY_tdhCircleArcObject,MTH3D_tdhCircleArcCurve);
|
||||
void EDWAY_fnv_CircleArcObject_SetGeometricObject(EDWAY_tdhCircleArcObject,ACP_tdxHandleOfObject);
|
||||
void EDWAY_fnv_CircleArcObject_SetLineElement(EDWAY_tdhCircleArcObject,ACP_tdxHandleOfElement);
|
||||
void EDWAY_fnv_CircleArcObject_SetColor(EDWAY_tdhCircleArcObject,long);
|
||||
void EDWAY_fnv_CircleArcObject_SetViewPortAttributes(EDWAY_tdhCircleArcObject,GLD_tdstViewportAttributes*);
|
||||
void EDWAY_fnv_CircleArcObject_SetListOfPoints(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*);
|
||||
void EDWAY_fnv_CircleArcObject_SetDynaParams(EDWAY_tdhCircleArcObject,ACP_tdstDynaParam *);
|
||||
void EDWAY_fnv_CircleArcObject_SetLocalRepere(EDWAY_tdhCircleArcObject,MTH3D_tdstMatrix*);
|
||||
void EDWAY_fnv_CircleArcObject_SetInvLocalRepere(EDWAY_tdhCircleArcObject,MTH3D_tdstMatrix*);
|
||||
void EDWAY_fnv_CircleArcObject_SetLocalStartPoint(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*);
|
||||
void EDWAY_fnv_CircleArcObject_SetLocalEndPoint(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*);
|
||||
void EDWAY_fnv_CircleArcObject_SetMainAngle(EDWAY_tdhCircleArcObject,MTH_tdxReal);
|
||||
void EDWAY_fnv_CircleArcObject_SetObjectMode(EDWAY_tdhCircleArcObject,unsigned char);
|
||||
|
||||
/* Changing fields value and reflect back consequences : */
|
||||
ACP_tdxBool EDWAY_fnb_CircleArcObject_ChangeSamplingRate(EDWAY_tdhCircleArcObject,unsigned char);
|
||||
|
||||
void EDWAY_fnv_CircleArcObject_ChangeParams
|
||||
(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*);
|
||||
|
||||
void EDWAY_fnv_CircleArcObject_GetParams
|
||||
(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*,MTH3D_tdstVector*,MTH3D_tdstVector*);
|
||||
|
||||
/* retrieving speed :*/
|
||||
MTH_tdxReal fn_xCircleArcObject_GetSpeed
|
||||
(EDWAY_tdhCircleArcObject,unsigned char);
|
||||
|
||||
/* retrieving point */
|
||||
void EDWAY_fnv_CircleArcObject_GetPoint
|
||||
(EDWAY_tdhCircleArcObject,unsigned char,MTH3D_tdstVector*);
|
||||
|
||||
/* drawing the circle arc object */
|
||||
void EDWAY_fnv_CircleArcObject_Draw(EDWAY_tdhCircleArcObject);
|
||||
|
||||
void EDWAY_fnv_CircleArcObject_GlobalToLocal(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*,MTH3D_tdstVector*);
|
||||
void EDWAY_fnv_CircleArcObject_LocalToGlobal(EDWAY_tdhCircleArcObject,MTH3D_tdstVector*,MTH3D_tdstVector*);
|
||||
|
||||
#endif /* !__EDICIAR_PROTOS__ */
|
||||
|
||||
#endif /* !ONLY_TYPES */
|
676
Rayman_X/cpa/tempgrp/Owp/inc/Inter.hpp
Normal file
676
Rayman_X/cpa/tempgrp/Owp/inc/Inter.hpp
Normal file
@@ -0,0 +1,676 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : Inter.hpp
|
||||
//
|
||||
// Interface DLL class.
|
||||
// This class is implement the DLL class.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from CPA_ObjectDLLBase
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
#ifndef __WPINTERF_HPP__
|
||||
#define __WPINTERF_HPP__
|
||||
|
||||
|
||||
class WayPoint;
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
class Way;
|
||||
class Link2D;
|
||||
class Link;
|
||||
class DiaWP;
|
||||
class DiaWay;
|
||||
class DiaLink;
|
||||
class Tangent;
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 25/02/98)
|
||||
class NtwDia;
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
||||
class Cursor;
|
||||
class Way_Interface;
|
||||
class CPA_tdoNameList;
|
||||
class Geometry3D;
|
||||
class EdtList;
|
||||
// Shaitan Correction {
|
||||
class Graph;
|
||||
// End Shaitan Correction }
|
||||
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Definition of the types objects
|
||||
//-----------------------------------------------------------
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
#define C_ucWay 1968
|
||||
#define C_ucLink 1997
|
||||
#define C_ucTangent 1945
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
#define C_ucCursor 1918
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 25/02/98)
|
||||
#define C_ucGraph 1969
|
||||
#define C_ucConnection 1970
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
||||
|
||||
// Shaitan Correction {
|
||||
typedef enum tdeLinkDisplayMode_
|
||||
{
|
||||
E_dm_ShowAllLinks,
|
||||
E_dm_ShowOutLinks,
|
||||
E_dm_ShowInLinks,
|
||||
E_dm_ShowNothing
|
||||
}
|
||||
tdeLinkDisplayMode;
|
||||
|
||||
typedef enum tdeWpSelectMode_
|
||||
{
|
||||
E_sm_AddOrRemoveWP,
|
||||
E_sm_PrevWP_Popup,
|
||||
E_sm_NextWP_Popup,
|
||||
E_sm_NextWP_Key,
|
||||
E_sm_PrevWP_Key,
|
||||
E_sm_NextWP_Continue,
|
||||
E_sm_PrevWP_Continue,
|
||||
E_sm_Normal
|
||||
}
|
||||
tdeWpSelectMode;
|
||||
// End Shaitan Correction }
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Object DLL interface class
|
||||
//----------------------------------------------------------
|
||||
class Waypoint_Interface : public CPA_ObjectDLLBase
|
||||
{
|
||||
private:
|
||||
//---- Flags
|
||||
BOOL m_bModifInsertOk; // Force the acception of the AcceptModifInsert message
|
||||
BOOL m_bModifDeleteOk; // Force the acception of the AcceptModifDelete message
|
||||
BOOL m_bRunEngine; // we are runnin the game
|
||||
BOOL m_bStopDraw; // Stop the effect of fn_vAddObjectsToDraw
|
||||
BOOL m_bCreateMode; // we are creating a way
|
||||
BOOL m_bMainDll; // this DLL is the main one ( for popup menu )
|
||||
BOOL m_bRefreshWay;
|
||||
BOOL m_bListAlreadyCreated; // The list is already created by the DLL
|
||||
BOOL m_bAddLink; // The next waypoint is inserted on a link
|
||||
BOOL m_bExistWaypointSaveFile; // The waypoint save file exists when we change the map
|
||||
BOOL m_bExistWaySaveFile; // The way save file exists when we change the map
|
||||
BOOL m_bComputeEngineWaypoint; // No modif insert actions
|
||||
BOOL m_bNextInstanceInWay; // The next instance is created in a way
|
||||
BOOL m_bStopSelect; // selection is lock
|
||||
BOOL m_bFirstBeforeEditor; // never enter Before Editor function
|
||||
BOOL m_bFirstActivateEditor; // never enter OnActivateEditor function
|
||||
BOOL m_bSkipOnModifDelete; // skip OnModifDelete
|
||||
BOOL m_bSkipOnModifInsert; // skip OnModifInsert
|
||||
BOOL m_bCommandWP;
|
||||
BOOL m_bCommandLink;
|
||||
BOOL m_bDialogOnScreen; // is the dialog way/WP display on the screen ?
|
||||
BOOL m_bModifRadius; // Are we in modify radius mode ?
|
||||
BOOL m_bOrientTangent; // mouse tangent orientation
|
||||
|
||||
//---- general
|
||||
CPA_EditorBase* m_poGeomDll; // Geom Dll
|
||||
CPA_DialogList* m_p_oDialogList ; // dialog list
|
||||
CSplitFrame* m_p_oSplitFrameWP; // split frame
|
||||
|
||||
//----CPA_List
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
// CPA_List<Way> m_ListMovingWay; // List of the Way to redraw by the OnMouving function
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
CPA_List<WayPoint> m_ListMovingWP; // List of the WP to recompute by the OnMouving function
|
||||
CPA_List<CPA_SuperObject> m_oLoadListOfWay; // list of the loaded way
|
||||
|
||||
//---- CPA_BaseObjectList
|
||||
CPA_BaseObjectList m_oSortedListOfWay;
|
||||
CPA_BaseObjectList m_oSortedListOfObjectList;
|
||||
CPA_BaseObjectList m_oSortedListOfNameList;
|
||||
CPA_BaseObjectList m_oSortedListOfFamilly;
|
||||
CPA_BaseObjectList m_oSortedListOfActorModel;
|
||||
CPA_BaseObjectList m_oSortedListOfActorInstance;
|
||||
|
||||
//---- Icon list
|
||||
CImageList m_oIconWayList; // list of icons for way list
|
||||
|
||||
//---- waypoint management
|
||||
MTH3D_tdstVector m_stdCenterWP; // center in real coordinate of the WP that is beeing moved
|
||||
MTH3D_tdstVector m_stdMouseVertex; // vertex of the mouse at the beginning of the draging action
|
||||
WayPoint* m_o_ModifRadiusWP; // We modify the radius of this WP
|
||||
//CPA2 Gabriela Dumitrascu 98-05-07
|
||||
// Shaitan Correction {
|
||||
// BOOL m_bGraphMove;
|
||||
//End Shaitan Correction }
|
||||
//End CPA2 Gabriela Dumitrascu 98-05-07
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
//---- way management
|
||||
Way* m_pModifInsertWay; // ref to the edit way
|
||||
WayPoint* m_poAddWP; // this is the WP we add to the way in the dialog
|
||||
Way* m_pElasticWay; // this the way we create
|
||||
CPA_SuperObject* m_p_oGraphicModelLine; // model of graphic line
|
||||
|
||||
//---- link management
|
||||
Link2D* m_poRButtonLink; // R button on this link
|
||||
Link* m_poSelectLink; // we try to move this link
|
||||
Tangent* m_poTangentMove; // Tangent we edit
|
||||
Link2D* m_poPlaneMove; // Plane we rotate
|
||||
Cursor* m_poCursorMove; // Cursor we translate
|
||||
|
||||
//---- RButton capture
|
||||
Tangent* m_poRButtonDownTangent; // we make a Rbutton Down on this tangent
|
||||
BOOL m_bRButtonDownTangent; // m_poRButtonDownTangent is valid
|
||||
|
||||
Way* m_poRButtonDownWay; // we make a Rbutton Down on this way
|
||||
BOOL m_bRButtonDownWay; // m_poRButtonDownWay is valid
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
||||
//CPA2 Gabriela Dumitrascu 98-04-07
|
||||
// Shaitan Correction {
|
||||
// BOOL m_bRButtonDownWayPoint; // m_poRButtonDownWayPoint is valid
|
||||
//End Shaitan Correction }
|
||||
//End CPA2 Gabriela Dumitrascu 98-04-07
|
||||
|
||||
|
||||
//---- List management
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
// CPA_BaseObject* m_poWay; // Current way
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
CPA_BaseObject* m_poActor; // Current actor instance
|
||||
CPA_BaseObject* m_poModel; // Current actor model
|
||||
CPA_BaseObject* m_poFamilly; // Current familly
|
||||
EdtList* m_poWayList; // Current Edtlist
|
||||
|
||||
// these datas are very protected and are just used to transmit datas between key down and key up
|
||||
GLI_tdst2DVertex m_stMouseVertex2DCreate;
|
||||
MTH3D_tdstVector m_stMouseVertex3DCreate;
|
||||
BOOL m_bMouseVertexValid; // These 2 previous values are valid ?
|
||||
|
||||
// Shaitan Correction {
|
||||
Graph * m_pSelectedGraph;
|
||||
WayPoint * m_pDisplayedWayPoint;
|
||||
tdeLinkDisplayMode m_eDisplayMode;
|
||||
tdeWpSelectMode m_eSelectMode;
|
||||
BOOL m_bSymetricMode;
|
||||
|
||||
CPA_KeyActionConfiguration * m_p_oKeyboard;
|
||||
|
||||
// End Shaitan Correction }
|
||||
|
||||
public:
|
||||
Waypoint_Interface(void);
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Dll Base
|
||||
//----------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
// BOOL fn_bPreTranslateMessage(MSG * /*p_stMsg*/);
|
||||
void fn_vJustAfterRegistered(void);
|
||||
void fn_vConstruct(void);
|
||||
// void fn_vRefreshDatas(void);
|
||||
// void fn_vLevelChanges (void);
|
||||
void fn_vLevelHasChanged (void);
|
||||
|
||||
// Editor Modifs
|
||||
void fn_vOnModifDelete (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
|
||||
// void fn_vOnModifParent (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
|
||||
// void fn_vOnModifCopy (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
|
||||
// void fn_vOnModifName (CPA_SuperObject *pEdObj, CString csInitalName, CString csFinalName, tdeTypeModif eType, tdeStatus eStatus);
|
||||
// void fn_vOnSelect (CPA_SuperObject *pEdObj, tdeTypeModif eType, tdeStatus eStatus);
|
||||
|
||||
void fn_vOnModifInsert (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent,
|
||||
tdstPosition *p_stPosition, tdeTypeModif eType, tdeStatus eStatus);
|
||||
|
||||
// Moves
|
||||
void fn_vOnModifMove (CPA_List<EDT_SavePos> *pListObjects, CPA_List<EDT_SaveGlobalPos> *pListConcerned, tdeTypeModif eType, tdeStatus eStatus);
|
||||
void fn_vOnBeginMove (CPA_List<CPA_SuperObject> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeStatus eStatus);
|
||||
void fn_vOnMoving (CPA_List<CPA_SuperObject> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeStatus eStatus);
|
||||
|
||||
// permission
|
||||
BOOL fn_bAcceptModifDelete (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
|
||||
// BOOL fn_bAcceptModifParent (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
|
||||
BOOL fn_bAcceptModifCopy (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
|
||||
BOOL fn_bAcceptModifTranslate (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
|
||||
BOOL fn_bAcceptModifRotate (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
|
||||
BOOL fn_bAcceptModifInsert (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent, tdeStatus eStatus);
|
||||
// BOOL fn_bAcceptModifScale (CPA_SuperObject *pEdObj, tdeStatus eStatus);
|
||||
// BOOL fn_bAcceptModifName (CPA_SuperObject *pEdObj, tdeStatus eStatus);
|
||||
// BOOL fn_bAcceptMultiSelect (void);
|
||||
|
||||
// to precise selection
|
||||
tdeTypeAnswer fn_bAcceptSelect (CPA_SuperObject *pEdObj, ACP_tdxIndex xIndex, HIE_tdstPickInfo *pPicking, tdeStatus eStatus);
|
||||
|
||||
// orient
|
||||
// BOOL fn_bAcceptOrientInstance (CPA_SuperObject *pEdObj);
|
||||
// BOOL fn_bOnClickOrientPosition (CPA_SuperObject *pEdObj, tdstPosition *pOrientPosition);
|
||||
// BOOL fn_bOnOrientingObject (CPA_SuperObject *pEdObj, tdstPosition *pOrientPosition);
|
||||
// BOOL fn_bOnEndOrientObject (CPA_SuperObject *pEdObj, tdstPosition *pOrientPosition);
|
||||
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
Dialog List
|
||||
=========================================================================*/
|
||||
|
||||
// BOOL fn_bSetCustomTest (CPA_DialogList *pDialog);
|
||||
// BOOL fn_bCustomTestFunction (CString csCurrentType, CString csTestName, CPA_BaseObject *pEdObj);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Editor Base
|
||||
//----------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
// focus
|
||||
// void fn_vHasLostFocus (void);
|
||||
// BOOL fn_bHasGainedFocus (void);
|
||||
// engine - editor
|
||||
void fn_vBeforeEngine (void);
|
||||
void fn_vBeforeEditor (void);
|
||||
// engine
|
||||
BOOL fn_bAcceptToRunEngine (void);
|
||||
// BOOL fn_bAcceptToRunTimerEngine (void);
|
||||
// end appli
|
||||
// void fn_vJustBeforeClosing (void);
|
||||
BOOL fn_bAcceptToExit (void);
|
||||
// save
|
||||
BOOL fn_bAcceptToSave (void);
|
||||
// void fn_vBeforeSaveAll (void);
|
||||
void fn_vAfterSaveAll (void);
|
||||
// Shaitan Correction {
|
||||
// keys
|
||||
BOOL _OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags);
|
||||
BOOL _OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags);
|
||||
//End Shaitan Correction }
|
||||
// mouse
|
||||
BOOL _OnMouseMove (UINT nFlags, tdstMousePos *p_stPos, MTH3D_tdstVector *p_stVect);
|
||||
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
|
||||
// BOOL _OnRButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
|
||||
BOOL _OnLButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
|
||||
BOOL _OnRButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
|
||||
BOOL _OnLButtonUp (UINT nFlags, tdstMousePos *p_stPos);
|
||||
// BOOL _OnRButtonUp (UINT nFlags, tdstMousePos *p_stPos);
|
||||
// command
|
||||
// BOOL _OnCommand (UINT IDCmdMsg);
|
||||
// BOOL _OnUpdateCommandUI (UINT uiID, CCmdUI *pCmdUI);
|
||||
// dragdrop
|
||||
// BOOL _OnDragDropEnd (WPARAM wParam, LPARAM lParam);
|
||||
// BOOL _OnDragDropMove (WPARAM wParam, LPARAM lParam);
|
||||
// BOOL _OnDragDropLooseFocus (WPARAM wParam, LPARAM lParam);
|
||||
// BOOL _OnDragDropGainFocus (WPARAM wParam, LPARAM lParam);
|
||||
// add objects to draw
|
||||
void fn_vAddObjectsToDraw (GLD_tdstViewportAttributes *p1, GLI_tdxHandleToLight p2, DEV_ViewPort* p3);
|
||||
// void fn_vAddObjectsToDraw2 (GLD_tdstViewportAttributes *p1, GLI_tdxHandleToLight p2);
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
Reinit
|
||||
=========================================================================*/
|
||||
|
||||
// void fn_vOnChangeDevice (void);
|
||||
// void fn_vOnChangeWorld (void);
|
||||
// void fn_vOnChangeRoot (void);
|
||||
|
||||
/*===========================================================================
|
||||
Models
|
||||
=========================================================================*/
|
||||
|
||||
// BOOL fn_bCanDeleteThisModel (CString csListName, CString csModelType, CString csModelName);
|
||||
// void fn_vOnAddModelToList (CPA_ObjectDLLBase *pOwnerDLL, CString csListName, CString csModelName, tdeTypeModif eType);
|
||||
|
||||
/*===========================================================================
|
||||
for Dialog List
|
||||
=========================================================================*/
|
||||
|
||||
CPA_BaseObject * GetDialogSelection (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDrawMode);
|
||||
void GetListsForDialog (CPA_DialogList *pDialog);
|
||||
|
||||
BOOL fn_bOnSelChangeHierarchyTree (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject, CPA_BaseObject *pSelectedParent);
|
||||
BOOL fn_bOnDblClkHierarchyTree (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject, CPA_BaseObject *pSelectedParent);
|
||||
BOOL fn_bOnSelChangeListObjects (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, BOOL bUnselect);
|
||||
BOOL fn_bOnDblClkListObjects (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject);
|
||||
// BOOL fn_bCanDragItemInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pObjectToDrag);
|
||||
// BOOL fn_bCanDropItemInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pObjectToDrop, CPA_BaseObject *pTarget);
|
||||
// BOOL fn_bOnDragDropInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pObject, CPA_BaseObject *pTarget);
|
||||
BOOL fn_bOnSelChangeComboList (CPA_DialogList *pDialog, CString csTypeName);
|
||||
BOOL fn_bOnButtonTest (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDraw);
|
||||
|
||||
BOOL fn_bOnKeyDownInDialog (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDraw,
|
||||
CPA_BaseObject *pSelectedObject, UINT nChar, UINT nRepCnt, UINT nFlags);
|
||||
// BOOL fn_bOnKeyUpInDialog (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDraw,
|
||||
// CPA_BaseObject *pSelectedObject, UINT nChar, UINT nRepCnt, UINT nFlags);
|
||||
void fn_vInitDefaultParameters (CPA_DialogList *pDialog);
|
||||
|
||||
// void fn_vSetANewTest (CPA_DialogList *pDialog, CString csCurrentList);
|
||||
BOOL fn_bTestFunction (CString csCurrentType, CString csTestName, CPA_BaseObject *pEdObj);
|
||||
|
||||
CString GetInfoForListItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
||||
// int GetIconForListItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
||||
int GetStateForListItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
||||
|
||||
// CPA_BaseObject * GetTreeNodeFirstChild (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pParent);
|
||||
// CPA_BaseObject * GetTreeNodeNextChild (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pParent, CPA_BaseObject *pCurrentChild);
|
||||
// int GetIconForTreeItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
||||
// int GetStateForTreeItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
Current Editor
|
||||
=========================================================================*/
|
||||
|
||||
tdePermission fn_eAcceptNewEditor (CPA_EditorBase *pNewEditor);
|
||||
|
||||
BOOL fn_bCanActivateEditor (CPA_List<CPA_BaseObject> *pParams);
|
||||
void fn_vOnActivateEditor (CPA_List<CPA_BaseObject> *pParams, BOOL bBackActivated=FALSE);
|
||||
|
||||
// BOOL fn_bCanCloseEditor (void);
|
||||
void fn_vOnCloseEditor (void);
|
||||
|
||||
// void fn_vBackActiveMe (void *pMyData);
|
||||
// void fn_vEraseWalkDataStructure (void *pMyData);
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
Dialog Bar - Mircea Dunka 31 Aug. 1998
|
||||
=========================================================================*/
|
||||
void fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn);
|
||||
|
||||
/*===========================================================================
|
||||
SubMenus and PopupMenu
|
||||
=========================================================================*/
|
||||
|
||||
BOOL fn_bDefineSubMenu (EDT_SubMenu *_p_oEDTSubMenu);
|
||||
void _OnSubMenuCommand (EDT_SubMenu *_p_oEDTSubMenu,UINT uiMsgID);
|
||||
|
||||
BOOL fn_bDefinePopupMenu (EDT_PopUpMenu *pPopup, CPA_List<CPA_SuperObject> *pSelection, BOOL bAsCurrentEditor);
|
||||
void _OnPopUpMenuCommand (UINT m_IDCmdMsg);
|
||||
|
||||
/*===========================================================================
|
||||
Coherence
|
||||
=========================================================================*/
|
||||
|
||||
// BOOL fn_bOnInvalidateLink (CPA_BaseObject *pOwner, CPA_BaseObject *pReferencedObject, BOOL bDestroyed);
|
||||
// void fn_vOnRestoreLink (CPA_BaseObject *pOwner, CPA_BaseObject *pReferencedObject);
|
||||
// void fn_vOnModifyChild (CPA_BaseObject *pOwner, CPA_BaseObject *pReferencedObject, unsigned long _ulData);
|
||||
|
||||
/*===========================================================================
|
||||
Draw Flag
|
||||
=========================================================================*/
|
||||
|
||||
// void fn_vOnModifDrawFlag (CPA_SuperObject *pSuperObject);
|
||||
|
||||
/*===========================================================================
|
||||
General Purpose
|
||||
=========================================================================*/
|
||||
|
||||
long OnQueryAction (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM);
|
||||
// long OnQueryInfos (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM);
|
||||
// long OnQueryOpen (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM);
|
||||
// long OnQueryClose (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM);
|
||||
|
||||
/*===========================================================================
|
||||
Reachable Objects
|
||||
=========================================================================*/
|
||||
|
||||
// BOOL fn_bLoadBaseObject (CPA_BaseObject *p_oObject);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Object DllBase
|
||||
//----------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
// hierarchy
|
||||
// CPA_SuperObject * GetNewEditorInstance (HIE_tdxHandleToSuperObject pEngineInstance);
|
||||
// void fn_vBuildNewEditorInstance (CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance);
|
||||
// void fn_vUpdateEditorInstance (CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance);
|
||||
// BOOL fn_bCanHandleThisType (long lEngineType);
|
||||
// models & instances
|
||||
void fn_vInitListByType (CPA_World *pWorld);
|
||||
void fn_vInitListsOfModels (void);
|
||||
// void fn_vSaveListModels (CString csListName, CPA_List<EDT_Model> *pListModels);
|
||||
// CString fn_csLoadListModels (void);
|
||||
// EDT_Model * GetNewModel (CString csListName);
|
||||
// BOOL fn_bCanLoadNewModel (CString csListName);
|
||||
// BOOL fn_bCanDeleteModel (CString csListName);
|
||||
// BOOL fn_bCanSaveListModels (CString csListName);
|
||||
// BOOL fn_bCanLoadListModels (void);
|
||||
// void fn_vOnLoadNewModel (CString csListName, EDT_Model *pNewModel);
|
||||
|
||||
CPA_SuperObject * GetNewInstance (CString csTypeName, CString csModelName, CPA_SuperObject *pParent);
|
||||
tdeTypeSO GetTypeInstance (CString csTypeName, CString csModelName);
|
||||
//ANNECY Shaitan EmptySectors 25/02/98
|
||||
tdeSaveStatus GetStatusInstance (CString csTypeName, CString csModelName);
|
||||
//ENDANNECY Shaitan EmptySectors
|
||||
CPA_SuperObject * GetParentForInsertion (CString csTypeName, CString csModelName, tdstPosition *p_stPosition);
|
||||
// BOOL fn_bChooseInsertPosition (CPA_SuperObject *pNewInstance, CPA_SuperObject *pParent, tdstPosition *p_stPosition);
|
||||
|
||||
// objects
|
||||
// CPA_BaseObject * GetNewObject (CString csObjectFile, CString csObjectName, FILE *p_fFile, CPA_MainWorld *p_oMainWorld);
|
||||
CPA_BaseObject * Duplicate (CPA_BaseObject *pObject, CPA_SuperObject *pNewSuperObject);
|
||||
|
||||
CPA_SuperObject * GetCopyOfProtectedChild (CPA_SuperObject *pInitialChild, CPA_SuperObject *pNewOwner);
|
||||
|
||||
// permissions for EvtEditor
|
||||
BOOL fn_bAcceptAsParent (CPA_BaseObject *pChild, CPA_BaseObject *pParent);
|
||||
// BOOL fn_bAcceptAsChild (CPA_BaseObject *pParent, CPA_BaseObject *pChild);
|
||||
|
||||
// for bounding volumes
|
||||
// void fn_vComputeBoundingVolume(CPA_BaseObject *pObject);
|
||||
ACP_tdxHandleOfObject fn_hGetBoundingVolume(CPA_BaseObject *_pObj);
|
||||
|
||||
// when insertion is canceled
|
||||
// void fn_vOnCancelInsertion (CPA_SuperObject *pInstance);
|
||||
|
||||
// Shaitan Correction {
|
||||
// to scale editor objects
|
||||
CPA_SuperObject * GetVisualSuperObject (CPA_SuperObject *pInstance);
|
||||
//End Shaitan Correction }
|
||||
|
||||
void fn_vUpdateObjectList (CPA_BaseObject *p_oObject, tdeUpdate eType);
|
||||
EDT_Model * fn_pstLoadNewDescriptor (void);
|
||||
|
||||
//--------------------------------------------------- Load
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 25/02/98)
|
||||
void fn_vLoadGraph (void);
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
||||
void fn_vLoadWaypoint (void);
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
void fn_vLoadWay (void);
|
||||
void fn_vInsertWaySon (void);
|
||||
Way* fn_pCreateWayFromEngine ( WP_tdhWay hWay, CPA_BaseObject* poOwner, CString csName, CString csReferencedSectionName );
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
||||
//--------------------------------------------------- copy of way
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
// CPA_SuperObject* fn_pCopyWay ( Way* poWay );
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
||||
void fn_vSetNextInstanceInWay (void) { m_bNextInstanceInWay=TRUE; }
|
||||
void fn_vSetModifDeleteOk (BOOL bModifDeleteOk) { m_bModifDeleteOk=bModifDeleteOk; }
|
||||
|
||||
//-------------------------------------------------- Dialog management
|
||||
void fn_vRefreshWaypointCoordinate (void);
|
||||
void fn_vRefreshList (void);
|
||||
void fn_vRefreshTestButton (void);
|
||||
void fn_vSaveDialogsPreferences (void);
|
||||
void fn_vSwapLinkDialog ( BOOL bOrientationMode );
|
||||
|
||||
//----------------------------------------------------------- Edition
|
||||
void fn_vEdit (WayPoint* poWP);
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
// void fn_vEdit (Way* p_oWay, int iWpPos=0);
|
||||
// void fn_vEdit (Link* p_oLink);
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
||||
|
||||
// Is there a waypoint in any way ?
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
// BOOL fn_bWaypointInAWay ( WayPoint* poWP );
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
||||
//----------------------------------------------------------- Refresh Screen
|
||||
void fn_vRefreshScreen (void);
|
||||
void fn_vRefreshDisplayControl (void);
|
||||
|
||||
//--------------------------------------------------- other functions
|
||||
void fn_vComputeAbsoluteMatrix (CPA_SuperObject* psoWP);
|
||||
void fn_vComputeNewRelativeMatrix (HIE_tdxHandleToSuperObject _hSprObj);
|
||||
void fn_vComputeRelativeMatrix (CPA_SuperObject* poSuperObject, CPA_SuperObject* poParentSuperObject);
|
||||
|
||||
|
||||
//------------------------------------------------------------- Draw
|
||||
void fn_vDrawAllWP (void);
|
||||
void fn_vSetRefreshWay ( BOOL bRefreshWay ) { m_bRefreshWay = bRefreshWay; }
|
||||
|
||||
//--------------------------------------- Selected objects in lists
|
||||
CPA_BaseObject* fn_pGetSelectedFamilly (void) { return m_poFamilly; }
|
||||
CPA_BaseObject* fn_pGetSelectedModel (void) { return m_poModel; }
|
||||
CPA_BaseObject* fn_pGetSelectedInstance (void) { return m_poActor; }
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
// CPA_BaseObject* fn_pGetSelectedWay (void) { return m_poWay; }
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
EdtList* fn_pGetSelectedEdtList (void) { return m_poWayList; }
|
||||
CPA_DialogList* fn_pGetDialogList (void) { return m_p_oDialogList; }
|
||||
|
||||
//--------------------------------------- Get new graphical instances
|
||||
CPA_SuperObject* fn_pGetNewSymbolicalGraphicObject (void);
|
||||
CPA_SuperObject* fn_pGetNewSphericalGraphicObject (void);
|
||||
CPA_SuperObject* fn_pGetNewLineGraphicObject (void);
|
||||
CPA_SuperObject* fn_pGetNewTangentGraphicObject (GEO_tdstColor* pstColor);
|
||||
CPA_SuperObject* fn_pGetNewPlaneGraphicObject(void);
|
||||
CPA_SuperObject* fn_pGetNewCursorGraphicObject (void);
|
||||
// Shaitan Correction {
|
||||
// CPA_SuperObject* fn_pGetNewConnectionGraphicObject (int iGraph, int iNode, int iArc);
|
||||
CPA_SuperObject* fn_pCreateConnectionGraphicObject (Graph *pGraph, WayPoint *pSrcWP, WayPoint *pDstWP, long lCapacity, long lWeight);
|
||||
//End Shaitan Correction }
|
||||
|
||||
inline void fn_vRefreshHierarchyList (void);
|
||||
|
||||
|
||||
//---------------------------------------- File Management
|
||||
//--- waypoint
|
||||
CString Waypoint_Interface::fn_csGetWaypointSaveFileName (void);
|
||||
BOOL fn_bIsExistWaypointFile (void) { return m_bExistWaypointSaveFile; }
|
||||
void fn_vSetExistWaypointFile (BOOL bExistWaypointSaveFile) { m_bExistWaypointSaveFile=bExistWaypointSaveFile; }
|
||||
BOOL fn_bExistWaypointSaveFile (void);
|
||||
|
||||
//--- way
|
||||
CString Waypoint_Interface::fn_csGetWaySaveFileName (void);
|
||||
BOOL fn_bIsExistWayFile (void) { return m_bExistWaySaveFile; }
|
||||
void fn_vSetExistWayFile (BOOL bExistWaySaveFile) { m_bExistWaySaveFile=bExistWaySaveFile; }
|
||||
BOOL fn_bExistWaySaveFile (void);
|
||||
|
||||
|
||||
//--- important function that convert way in EdtList to Real way to edit
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
// BOOL fn_bComputeRealWay (Way** ppoWay);
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
||||
//--- return EdtList used by the actor
|
||||
EdtList* fn_poGetEdtListUseByActor (CPA_BaseObject* poActorInstance);
|
||||
CPA_BaseObject* fn_pGetActorUsingAList (EdtList* poEdtList);
|
||||
|
||||
|
||||
protected :
|
||||
void fn_vPick ( ACP_tdxIndex* pxNbPicked, HIE_aDEF_stTabOfPickInfo& ra_stPickInfo, tdstMousePos *p_stPos);
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
// void fn_vAddWayPoint (void);
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
CPA_SuperObject* fn_pExplorePicking (ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stObject, long lTypeObject, ACP_tdxIndex* pxFindIndex=NULL );
|
||||
CPA_SuperObject* fn_pFirstSuperObjectPicked (HIE_tdstPickInfo *p_stObject);
|
||||
CPA_SuperObject* fn_pFirstSuperObjectPickedInDynamicHierarchy (ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stObject);
|
||||
|
||||
//----------- tools
|
||||
// extract a reachable object from the list
|
||||
CPA_BaseObject* fn_pSelectWayPointParam ( CPA_List<CPA_BaseObject> *pParams );
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
CPA_BaseObject* fn_pSelectWayParam ( CPA_List<CPA_BaseObject> *pParams );
|
||||
CPA_BaseObject* fn_pSelectLinkParam ( CPA_List<CPA_BaseObject> *pParams );
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
||||
// set the list of Way
|
||||
void fn_vSetCursor ( UINT i );
|
||||
void fn_vSetCursor ( LPCTSTR lpszResourceName );
|
||||
|
||||
|
||||
//--------------------------------------------------- Lists management
|
||||
void fn_vEditWayList ( CPA_List<CPA_BaseObject>* poList );
|
||||
CPA_SuperObject* fn_pCreateEmptyWay (char* pszName, CPA_BaseObject* poFamilly);
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
void fn_vFillListOfWay (void);
|
||||
void fn_vGetListOfWaySuperObject ( CPA_List<CPA_BaseObject>* poSuperObjectList );
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
||||
void fn_vEditListOfWay ( CPA_BaseObject* poObjectList );
|
||||
void fn_vEditListOfActorModel ( CPA_BaseObject* poFamilly, BOOL bChange=TRUE );
|
||||
void fn_vEditListOfActorInstance ( CPA_BaseObject* poActorModel, BOOL bChange=TRUE );
|
||||
|
||||
void fn_vEditListOfFamilly ( BOOL bChange=TRUE );
|
||||
|
||||
|
||||
CPA_BaseObject* fn_pGetOwnerOfList ( CString csTypeList );
|
||||
|
||||
BOOL fn_bIsSuperObjectInStaticHierarchy (CPA_SuperObject* poSuperObject);
|
||||
|
||||
void fn_vCreateVirtualWaypoint (void);
|
||||
void fn_vDeleteVirtualWaypoint (void);
|
||||
BOOL fn_bIsSubSectionInSection ( CString csFullPath, CString csSearchPath );
|
||||
|
||||
void fn_vInitGameMaterial ( Geometry3D* poGeomObject, ACP_tdxHandleOfElement hElement, float fR, float fG, float fB );
|
||||
|
||||
// modification of EdtList
|
||||
void fn_vNotifyAllEdtList ( CPA_tdoNameList* poNameList );
|
||||
|
||||
void fn_vCleanHierarchy(void);
|
||||
|
||||
// Shaitan Correction {
|
||||
public:
|
||||
|
||||
tdeLinkDisplayMode GetDisplayMode (void) { return m_eDisplayMode; }
|
||||
void SetDisplayMode (tdeLinkDisplayMode eNewMode);
|
||||
|
||||
Graph * GetSelectedGraph (void) { return m_pSelectedGraph; }
|
||||
WayPoint * GetDisplayedWaypoint (void) { return m_pDisplayedWayPoint; }
|
||||
|
||||
void fn_vSelectGraph (Graph *pGraph);
|
||||
void fn_vSetDisplayedWaypoint (WayPoint *pWaypoint, BOOL bCenter = FALSE);
|
||||
void fn_vUpdateConnections (void);
|
||||
|
||||
void fn_vUpdateEditor (tdeModeChange eMode);
|
||||
|
||||
void fn_vSetSymetricMode (BOOL bSymetric) { m_bSymetricMode = bSymetric; }
|
||||
BOOL fn_bGetSymetricMode (void) { return m_bSymetricMode; }
|
||||
|
||||
};
|
||||
// End Shaitan Correction }
|
||||
|
||||
extern tdstDLLIdentity g_stWayPointIdentity;
|
||||
|
||||
|
||||
#endif // __WPINTERF_HPP__
|
||||
|
||||
|
||||
|
||||
|
64
Rayman_X/cpa/tempgrp/Owp/inc/Link2D.hpp
Normal file
64
Rayman_X/cpa/tempgrp/Owp/inc/Link2D.hpp
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : Link2D.hpp
|
||||
//
|
||||
// Definition of links defined in a 2D plane
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : Link
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 30 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __Link2D_HPP__
|
||||
#define __Link2D_HPP__
|
||||
|
||||
|
||||
class Link2D : public Link
|
||||
{
|
||||
protected :
|
||||
MTH3D_tdstVector m_stPlaneVertex; // Only use to rotate the plane
|
||||
MTH3D_tdstVector m_stNormalVertex; // Use to keep the same normal when move
|
||||
CPA_SuperObject* m_poGraphic; // graphic object of the plane
|
||||
GLI_tdxValue m_xe; // e of the plane
|
||||
|
||||
public:
|
||||
Link2D ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner, WP_tdhLink hLink );
|
||||
Link2D ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner );
|
||||
|
||||
void fn_vInitPlane (MTH3D_tdstVector* pstVertex) { m_stNormalVertex=*pstVertex; }
|
||||
void fn_vDrawPlane (void);
|
||||
void fn_vConstructPlane (void);
|
||||
void fn_vDestroyPlane (void);
|
||||
|
||||
// moves
|
||||
void fn_vStartMove ( MTH3D_tdstVector* pstStartVertex );
|
||||
void fn_vMove ( MTH3D_tdstVector* pstTranslation );
|
||||
void fn_vEndMove (void);
|
||||
|
||||
BOOL fn_bIsPlane (void) { return TRUE; }
|
||||
|
||||
void fn_vSetPlaneHorizontal (void);
|
||||
void fn_vSetPlaneVertical (void);
|
||||
void fn_vProjVertex ( MTH3D_tdstVector* pstVertex );
|
||||
|
||||
|
||||
protected :
|
||||
// compute the matrix of the plane ( VertexLink1, VertexLink2, pstVertex )
|
||||
void fn_vComputePlaneAxis (MTH3D_tdstVector* pstVertex=NULL);
|
||||
};
|
||||
|
||||
#endif //__Link2D_HPP__
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
92
Rayman_X/cpa/tempgrp/Owp/inc/LinkArc.hpp
Normal file
92
Rayman_X/cpa/tempgrp/Owp/inc/LinkArc.hpp
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : LinkArc.hpp
|
||||
//
|
||||
// Definition of the link editors objects
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : Link2D
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 30 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __LinkArc_HPP__
|
||||
#define __LinkArc_HPP__
|
||||
|
||||
//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98)
|
||||
#include "ogd.h"
|
||||
//ENDROMTEAM WorldEditor (Viorel Preoteasa)
|
||||
|
||||
class LinkArc : public Link2D
|
||||
{
|
||||
protected:
|
||||
static char ms_cType; // type of link
|
||||
static char ms_szName [10]; // name of the link
|
||||
BOOL m_bFirstEdition; // This object was not yet edited
|
||||
BOOL m_bEditPlane; // Must we draw the edit plane
|
||||
Cursor* m_poCursor; // cursor object
|
||||
MTH3D_tdstVector m_stCenterVertex; // Local vertex of translation
|
||||
|
||||
//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98)
|
||||
// EDWAY_tdhCircleArcObject m_hArcObject; // editor object
|
||||
Arc3D m_hArcObject; // editor object
|
||||
//ENDROMTEAM WorldEditor (Viorel Preoteasa)
|
||||
|
||||
BOOL m_bInitCenter; // m_stCenterVertex must be reinit
|
||||
|
||||
|
||||
public:
|
||||
static Link* fn_pConstruct ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner, WP_tdhLink hLink) { if (hLink) return new LinkArc ( p_oDLL, p_oOwner, hLink);
|
||||
else return new LinkArc ( p_oDLL, p_oOwner ); }
|
||||
static void fn_vRegisterObject (void); // this function is used to register this object
|
||||
|
||||
LinkArc ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner, WP_tdhLink hLink );
|
||||
LinkArc ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner );
|
||||
char fn_cGetType (void) { return ms_cType; }
|
||||
char* fn_pGetName (void) { return ms_szName; }
|
||||
CDialog* fn_pGetSpecificDialog (CWnd* pParentWnd);
|
||||
void fn_vFreeSpecificDialog (CDialog* pDialog);
|
||||
|
||||
//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98)
|
||||
// EDWAY_tdhCircleArcObject fn_hGetEditArcObject (void) { return m_hArcObject; }
|
||||
Arc3D *fn_hGetEditArcObject (void) { return &m_hArcObject;}
|
||||
//ENDROMTEAM WorldEditor (Viorel Preoteasa)
|
||||
|
||||
void fn_vConstructGraphic (void);
|
||||
void fn_vRotationGraphic (BOOL bRotation);
|
||||
void fn_vDrawNormal (void);
|
||||
void fn_vDrawOutHierarchy (GLD_tdstViewportAttributes *pViewportAttributes);
|
||||
void fn_vSetWaypoints ( WayPoint* poFirstWP, WayPoint* poSecondWP );
|
||||
void fn_vGetSaveInfo ( char dszParam [20][20], long& lNbParam );
|
||||
void fn_vInitGraphic (void);
|
||||
|
||||
|
||||
void fn_vStopEdit (void);
|
||||
void fn_vStartEdit (void);
|
||||
|
||||
// Update data
|
||||
void fn_vUpdateCenter (void);
|
||||
|
||||
protected :
|
||||
void fn_vSetEngineStructure (void);
|
||||
void fn_vInitCenter (BOOL bInit);
|
||||
void fn_vGetAbsoluteCenter (MTH3D_tdstVector* pstCenter);
|
||||
void fn_vSetAbsoluteCenter (MTH3D_tdstVector* pstCenter);
|
||||
void fn_vComputeCursorVertex ( MTH3D_tdstVector* pstCursorVertex );
|
||||
void fn_vInitPlaneOrientation (void);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
82
Rayman_X/cpa/tempgrp/Owp/inc/LinkBez.hpp
Normal file
82
Rayman_X/cpa/tempgrp/Owp/inc/LinkBez.hpp
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : LinkBez.hpp
|
||||
//
|
||||
// Edit the Bezier links
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : Link
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 29 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __LinkBez_HPP__
|
||||
#define __LinkBez_HPP__
|
||||
|
||||
//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98)
|
||||
#include "ogd.h"
|
||||
//ENDROMTEAM WorldEditor (Viorel Preoteasa)
|
||||
|
||||
class LinkBez : public Link
|
||||
{
|
||||
protected:
|
||||
static char ms_cType; // type of link
|
||||
static char ms_szName [10]; // name of the link
|
||||
|
||||
//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98)
|
||||
// EDWAY_tdhBezierObject m_hBezierObject; // editor object
|
||||
Bezier3D m_hBezierObject; // editor object
|
||||
//ENDROMTEAM WorldEditor (Viorel Preoteasa)
|
||||
|
||||
Tangent* m_pstStartTangent; // Tangent object first point
|
||||
Tangent* m_pstFinishTangent; // Tangent object second point
|
||||
BOOL m_bFirstEdition;
|
||||
|
||||
|
||||
public:
|
||||
static void fn_vRegisterObject (void); // this function is used to register this object
|
||||
static Link* fn_pConstruct ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner, WP_tdhLink hLink) { if (hLink) return new LinkBez ( p_oDLL, p_oOwner, hLink);
|
||||
else return new LinkBez ( p_oDLL, p_oOwner ); }
|
||||
LinkBez ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner, WP_tdhLink hLink );
|
||||
LinkBez ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner );
|
||||
|
||||
char fn_cGetType (void) { return ms_cType; }
|
||||
char* fn_pGetName (void) { return ms_szName; }
|
||||
//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98)
|
||||
// EDWAY_tdhBezierObject fn_hGetEditBezierObject (void) { return m_hBezierObject; }
|
||||
Bezier3D *fn_hGetEditBezierObject (void) { return &m_hBezierObject; }
|
||||
//ENDROMTEAM WorldEditor (Viorel Preoteasa)
|
||||
|
||||
void fn_vChangeNeighbourTangent (Tangent* pTangent);
|
||||
void fn_vSetTangent ( int iSide, MTH3D_tdstVector* pTangentVertex );
|
||||
|
||||
void fn_vConstructGraphic (void);
|
||||
void fn_vInitGraphic (void);
|
||||
void fn_vRotationGraphic (BOOL bRotation);
|
||||
void fn_vDrawNormal (void);
|
||||
void fn_vDrawOutHierarchy (GLD_tdstViewportAttributes *pViewportAttributes);
|
||||
void fn_vGetSaveInfo ( char dszParam [20][20], long& lNbParam );
|
||||
void fn_vInitEditorFromEngine (void);
|
||||
|
||||
CDialog* fn_pGetSpecificDialog (CWnd* pParentWnd);
|
||||
void fn_vFreeSpecificDialog (CDialog* pDialog);
|
||||
|
||||
protected :
|
||||
void fn_vSetEngineStructure (void);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
62
Rayman_X/cpa/tempgrp/Owp/inc/LinkLine.hpp
Normal file
62
Rayman_X/cpa/tempgrp/Owp/inc/LinkLine.hpp
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : LinkLine.hpp
|
||||
//
|
||||
// Definition of the link editors objects
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : Link
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 29 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
|
||||
#ifndef __LinkLine_HPP__
|
||||
#define __LinkLine_HPP__
|
||||
|
||||
|
||||
class LinkLine : public Link
|
||||
{
|
||||
protected:
|
||||
static char ms_cType; // type of link
|
||||
static char ms_szName [10]; // name of the link
|
||||
GLI_tdxValue m_xLBeam; // grahpical dim of the link
|
||||
|
||||
public:
|
||||
static void fn_vRegisterObject (void); // this function is used to register this object
|
||||
static Link* fn_pConstruct ( CPA_ObjectDLLBase* p_oDLL, CPA_BaseObject *p_oOwner, WP_tdhLink hLink) { if (hLink) return new LinkLine ( p_oDLL, p_oOwner, hLink);
|
||||
else return new LinkLine ( p_oDLL, p_oOwner ); }
|
||||
|
||||
LinkLine ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner, WP_tdhLink hLink );
|
||||
LinkLine ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner );
|
||||
char fn_cGetType (void) { return ms_cType; }
|
||||
char* fn_pGetName (void) { return ms_szName; }
|
||||
|
||||
void fn_vConstructGraphic (void);
|
||||
void fn_vRotationGraphic (BOOL bRotation);
|
||||
void fn_vDrawNormal (void);
|
||||
void fn_vGetSaveInfo ( char dszParam [20][20], long& lNbParam );
|
||||
void fn_vSetWaypoints ( WayPoint* poFirstWP, WayPoint* poSecondWP );
|
||||
|
||||
|
||||
protected :
|
||||
// Line graphic
|
||||
CPA_SuperObject* fn_vLineGraphic (MTH3D_tdstVector *pstVertex1, MTH3D_tdstVector *pstVertex2, char* szName, tdeLocalColor color = E_lc_NoColor );
|
||||
void fn_vModifLineGraphic (CPA_SuperObject* psoLine, MTH3D_tdstVector *pstVertex1, MTH3D_tdstVector *pstVertex2 );
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
34
Rayman_X/cpa/tempgrp/Owp/inc/LinkMod.hpp
Normal file
34
Rayman_X/cpa/tempgrp/Owp/inc/LinkMod.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : LinkMod.cpp
|
||||
//
|
||||
// Modification class.
|
||||
// This class is used to implement the Do/Undo actions.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from CPA_Modif
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __LinkMOD_HPP__
|
||||
#define __LinkMOD_HPP__
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
216
Rayman_X/cpa/tempgrp/Owp/inc/LinkObj.hpp
Normal file
216
Rayman_X/cpa/tempgrp/Owp/inc/LinkObj.hpp
Normal file
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : LinkObj.hpp
|
||||
//
|
||||
// Definition of the link editors objects
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : CPA_Object
|
||||
// CPA_EdMot<WP_tdhWayPoint>
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __LinkOBJECT_HPP__
|
||||
#define __LinkOBJECT_HPP__
|
||||
|
||||
#define C_ucLink 1997
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Definition of the name of the models
|
||||
static char* pszLineModelName = "Line";
|
||||
static char* pszArcModelName = "Arc";
|
||||
static char* pszSplineModelName = "Spline";
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
class DiaLink;
|
||||
class RotationDia;
|
||||
class Link;
|
||||
|
||||
typedef struct tdst_LinkObject_
|
||||
{
|
||||
char szName [10];
|
||||
char cType;
|
||||
Link* (*fn_pConstruct) ( CPA_ObjectDLLBase* , CPA_BaseObject*, WP_tdhLink );
|
||||
} tdst_LinkObject;
|
||||
|
||||
class WayPoint;
|
||||
class Way;
|
||||
class Waypoint_Interface;
|
||||
class Tangent;
|
||||
|
||||
class Link : public CPA_BaseObject, public CPA_EdMot<WP_tdhLink>
|
||||
{
|
||||
protected :
|
||||
static Waypoint_Interface* ms_poInterface; // Interface
|
||||
static DiaLink* ms_poDiaLink; // Dialog
|
||||
static RotationDia* ms_poRotationDia; // Rotation Dialog
|
||||
static CPA_List<tdst_LinkObject> ms_oListLinkObject; // List of the present links
|
||||
static long ms_lNbLink; // Number of created link
|
||||
|
||||
CPA_SuperObject* m_poSuperObject; // super object
|
||||
Way* m_poParent; // Father of the link
|
||||
WayPoint* m_poFirstWP; // First WP of the link
|
||||
WayPoint* m_poSecondWP; // Second WP of the link
|
||||
Tangent* m_poFirstOrientationTangent; // orientation at first WP location
|
||||
Tangent* m_poSecondOrientationTangent; // orientation at second WP location
|
||||
|
||||
MTH_tdxReal m_xOrientationTangentLenght; // lenght of orientation tangent
|
||||
|
||||
BOOL m_bAddInHierarchy; // The link is insert in the hierarchy
|
||||
BOOL m_bRemoveInHierarchy; // The link has been in the hierarchy, but was retired
|
||||
BOOL m_bDraw; // The link is ok in the hierachy but must be draw
|
||||
BOOL m_bCanDrawOutHierarchy;// can we run the fn_vDrawOutHierarchy function ?
|
||||
BOOL m_bRotationMode; // Link is in rotation edition mode
|
||||
BOOL m_bFirstEdition;
|
||||
|
||||
MTH_tdxReal m_xFirstTwistOrientation; // twist at first WP location
|
||||
MTH_tdxReal m_xSecondTwistOrientation; // twist at second WP location
|
||||
BOOL m_bXDirectOrientation; // Ox rotation in trigo way
|
||||
BOOL m_bYDirectOrientation; // Oy rotation in trigo way
|
||||
BOOL m_bZDirectOrientation; // twist in trigo way
|
||||
long m_lNbLapXOrientation; // Number of complete laps in Ox rotation
|
||||
long m_lNbLapYOrientation; // Number of complete laps in Oy rotation
|
||||
long m_lNbLapZOrientation; // Number of complete laps in Oz rotation
|
||||
|
||||
|
||||
public:
|
||||
// static
|
||||
static void fn_vInitObject (Waypoint_Interface* poInterface);
|
||||
static SCRIPT_tdeReturnValue CallBackLoad (FILE *p_fFile, char *szAction, char *szParams[], SCRIPT_tdeAction cType);
|
||||
static void fn_vSetDialog ( DiaLink* poDiaLink, RotationDia* poRotationDia );
|
||||
static DiaLink* fn_pGetDialog ( void ) { return ms_poDiaLink; }
|
||||
static RotationDia* fn_pGetRotationDialog (void) { return ms_poRotationDia; }
|
||||
|
||||
static Link* fn_pCreateLink ( Way* poWay, char cType, WayPoint* poFirstWP=NULL, WayPoint* poSecondWP=NULL, WP_tdhLink hLink=NULL ); // create a new link with it's associated super object
|
||||
static Link* fn_pCreateLink ( Way* poWay, WP_tdhLink hLink, WayPoint* poFirstWP, WayPoint* poSecondWP );
|
||||
|
||||
static Link* CloneLink ( Way* poWay, Link* poLink, CString& szNewLinkName );
|
||||
|
||||
Link ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner, WP_tdhLink hLink );
|
||||
Link ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *p_oOwner );
|
||||
void *GetEngineStruct (void) { return GetStruct(); }
|
||||
|
||||
//--- data
|
||||
long GetDataType (void);
|
||||
void* GetData (void);
|
||||
|
||||
// super object
|
||||
void SetSuperObject ( CPA_SuperObject* poSuperObject) { m_poSuperObject=poSuperObject; }
|
||||
CPA_SuperObject* GetSuperObject (void) { return m_poSuperObject; }
|
||||
|
||||
|
||||
void fn_vSplitLink ( Way* poWay, WayPoint* poWP, Link** pLinkBefore, Link** pLinkAfter );
|
||||
Link* fn_pMergeLink ( Way* poWay, Link* pLink );
|
||||
|
||||
// save link
|
||||
void fn_vSave ( SCR_tdst_File_Description *_p_stFile );
|
||||
|
||||
// set
|
||||
void fn_vSetAddInHierarchy ( BOOL bAddInHierarchy ) { m_bAddInHierarchy=bAddInHierarchy; }
|
||||
void fn_vSetRemoveInHierarchy ( BOOL bRemoveInHierarchy ) { m_bRemoveInHierarchy=bRemoveInHierarchy; }
|
||||
void fn_vSetDraw ( BOOL bDraw ) { m_bDraw=bDraw; }
|
||||
void fn_vSetDrawOutHierarchy (BOOL bDraw) { m_bCanDrawOutHierarchy = bDraw; }
|
||||
void fn_vSetXDirectOrientation ( BOOL bXDirectOrientation );
|
||||
void fn_vSetYDirectOrientation ( BOOL bYDirectOrientation );
|
||||
void fn_vSetZDirectOrientation ( BOOL bZDirectOrientation );
|
||||
void fn_vSetNbLapXOrientation ( long lNbLapXOrientation );
|
||||
void fn_vSetNbLapYOrientation ( long lNbLapYOrientation );
|
||||
void fn_vSetNbLapZOrientation ( long lNbLapZOrientation );
|
||||
void fn_vSetFirstTwistOrientation ( MTH_tdxReal xFirstTwistOrientation );
|
||||
void fn_vSetSecondTwistOrientation ( MTH_tdxReal xSecondTwistOrientation );
|
||||
virtual void fn_vSetWaypoints ( WayPoint* poFirstWP, WayPoint* poSecondWP ) { if(poFirstWP) m_poFirstWP=poFirstWP; if (poSecondWP) m_poSecondWP=poSecondWP; }
|
||||
|
||||
// get
|
||||
static CPA_List <tdst_LinkObject>* fn_pGetListObject (void) { return &ms_oListLinkObject; }
|
||||
BOOL fn_bIsAddInHierarchy ( void ) { return m_bAddInHierarchy; }
|
||||
BOOL fn_bIsRemoveInHierarchy ( void ) { return m_bRemoveInHierarchy; }
|
||||
BOOL fn_bIsDraw ( void ) { return m_bDraw; }
|
||||
BOOL fn_bCanDrawOutHierarchy (void) { return m_bCanDrawOutHierarchy; }
|
||||
void fn_vGetWaypoints ( WayPoint** poFirstWP, WayPoint** poSecondWP ) { *poFirstWP=m_poFirstWP; *poSecondWP=m_poSecondWP; }
|
||||
BOOL fn_bIsWaypoint ( WayPoint* poWp ) { return (m_poFirstWP==poWp) || (m_poSecondWP==poWp); }
|
||||
Way* fn_pGetWay (void) { return m_poParent; }
|
||||
BOOL fn_bIsRotationMode (void) { return m_bRotationMode; }
|
||||
BOOL fn_bIsXDirectOrientation (void) { return m_bXDirectOrientation; }
|
||||
BOOL fn_bIsYDirectOrientation (void) { return m_bYDirectOrientation; }
|
||||
BOOL fn_bIsZDirectOrientation (void) { return m_bZDirectOrientation; }
|
||||
long fn_lGetNbLapXOrientation (void) { return m_lNbLapXOrientation; }
|
||||
long fn_lGetNbLapYOrientation (void) { return m_lNbLapYOrientation; }
|
||||
long fn_lGetNbLapZOrientation (void) { return m_lNbLapZOrientation; }
|
||||
MTH_tdxReal fn_xGetFirstTwistOrientation (void) { return m_xFirstTwistOrientation; }
|
||||
MTH_tdxReal fn_xGetSecondTwistOrientation (void) { return m_xSecondTwistOrientation; }
|
||||
|
||||
//---- Object dependant functions
|
||||
virtual char fn_cGetType ( void )=0;
|
||||
virtual char* fn_pGetName ( void )=0;
|
||||
|
||||
// draw
|
||||
virtual void fn_vConstructGraphic (void); // construct the graphic son's
|
||||
virtual void fn_vInitGraphic (void); // init the graphic son after it has been put into the hierarchy
|
||||
virtual void fn_vRotationGraphic (BOOL bRotation); // Set/Unset rotation mode
|
||||
virtual void fn_vDrawNormal (void) {} // refresh the draw when in normal mode
|
||||
virtual void fn_vDrawRotation (void) {} // refresh the draw when in rotation mode
|
||||
virtual void fn_vInitEditorFromEngine (void) {} // init editor data when engine exist
|
||||
virtual void fn_vGetSaveInfo ( char dszParam [20][20], long& lNbParam )=0; // ask for saving data
|
||||
|
||||
virtual void fn_vDrawOutHierarchy (GLD_tdstViewportAttributes *pViewportAttributes) {} // This function is call to draw out of the hierarchy
|
||||
|
||||
virtual void fn_vStartEdit (void) { }; // this link is selected
|
||||
virtual void fn_vStopEdit (void) { }; // this link is no longer selected
|
||||
virtual void fn_vChangeNeighbourTangent (Tangent* pTangent);
|
||||
virtual void fn_vChangeAllTangent (Tangent* pTangent);
|
||||
|
||||
// A tangent son of this link change
|
||||
|
||||
|
||||
void fn_vDraw (void); // refreh the draw according to the mode
|
||||
|
||||
|
||||
// dialog
|
||||
virtual CDialog* fn_pGetSpecificDialog (CWnd* pParentWnd) { return NULL; } // return a pointer on a specific dialog son of pParentWnd
|
||||
virtual void fn_vFreeSpecificDialog (CDialog* pDialog) {}
|
||||
virtual BOOL fn_bIsPlane (void) { return FALSE; }
|
||||
|
||||
Waypoint_Interface* GetInterface (void);
|
||||
void fn_vWayNotifySave (void);
|
||||
|
||||
void fn_vEdit (void);
|
||||
void fn_vSelectWay (void);
|
||||
void fn_vSetAllOrientationTangent ( MTH3D_tdstVector* pTangentVertex );
|
||||
void fn_vReinitOrientationTangent (Tangent* poTangent);
|
||||
|
||||
protected :
|
||||
void fn_vRefreshEngineOrientation (void);
|
||||
void fn_vComputeAxis (void); // Modify local axis
|
||||
void fn_vSetType ( WP_tde_ucConnectionType cType );
|
||||
void fn_vSetOrientationTangent ( int iSide, MTH3D_tdstVector* pTangentVertex );
|
||||
|
||||
|
||||
void fn_vVertex2Rotation (MTH_tdxReal* pxXRot, MTH_tdxReal* pxYRot, MTH_tdxReal* pxZRot, MTH3D_tdstVector* pstVector, MTH_tdxReal* pxRot );
|
||||
void fn_vRotation2Vertex ( MTH3D_tdstVector* pstVector, MTH_tdxReal* pxRot, MTH_tdxReal* pxXRot, MTH_tdxReal* pxYRot, MTH_tdxReal* pxZRot );
|
||||
void fn_vComputeModulusRotation ( MTH_tdxReal* xStartRot, MTH_tdxReal* xEndRot, BOOL bDirectOrientation, long lNbLapOrientation );
|
||||
void fn_vExtractModulusRotation ( BOOL* bDirectOrientation, long* lNbLapOrientation, MTH_tdxReal& xStartRot, MTH_tdxReal& xEndRot );
|
||||
|
||||
|
||||
private:
|
||||
void fn_vCorrectNulValue ( MTH3D_tdstVector* pstVector );
|
||||
inline BOOL fn_bIsRealNul ( MTH_tdxReal& rReal );
|
||||
|
||||
};
|
||||
|
||||
#endif //__LinkOBJECT_HPP__
|
||||
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
76
Rayman_X/cpa/tempgrp/Owp/inc/LkArcDia.h
Normal file
76
Rayman_X/cpa/tempgrp/Owp/inc/LkArcDia.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : ArcDia.hpp
|
||||
//
|
||||
// Dialog edition the arcs
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 6 feb 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __ArcDia_HPP__
|
||||
#define __ArcDia_HPP__
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// BezierDia dialog
|
||||
|
||||
class LinkArc;
|
||||
class Waypoint_Interface;
|
||||
|
||||
class ArcDia : public CDialog
|
||||
{
|
||||
protected:
|
||||
LinkArc* m_pLinkArc;
|
||||
|
||||
// Construction
|
||||
public:
|
||||
ArcDia (LinkArc* pLinkBez, CWnd* pParent = NULL); // standard constructor
|
||||
void fn_vTutRegister (void);
|
||||
void fn_vTutUnregister (void);
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(BezierDia)
|
||||
enum { IDD = IDD_ARC_DIALOG };
|
||||
int m_iSamplingRate;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(BezierDia)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(ArcDia)
|
||||
afx_msg void OnKillfocusArcEdit();
|
||||
virtual BOOL OnInitDialog();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
76
Rayman_X/cpa/tempgrp/Owp/inc/LkBezDia.h
Normal file
76
Rayman_X/cpa/tempgrp/Owp/inc/LkBezDia.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : LinkDia.hpp
|
||||
//
|
||||
// Dialog edition the ways
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __BezDia_HPP__
|
||||
#define __BezDia_HPP__
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// BezierDia dialog
|
||||
|
||||
class LinkBez;
|
||||
|
||||
class BezierDia : public CDialog
|
||||
{
|
||||
protected:
|
||||
LinkBez* m_pLinkBez;
|
||||
|
||||
// Construction
|
||||
public:
|
||||
BezierDia (LinkBez* pLinkBez, CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
void fn_vTutRegister (void);
|
||||
void fn_vTutUnregister (void);
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(BezierDia)
|
||||
enum { IDD = IDD_BEZIER_DIALOG };
|
||||
int m_iSamplingRate;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(BezierDia)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(BezierDia)
|
||||
afx_msg void OnKillfocusBezierEdit();
|
||||
virtual BOOL OnInitDialog();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
179
Rayman_X/cpa/tempgrp/Owp/inc/NtwMod.hpp
Normal file
179
Rayman_X/cpa/tempgrp/Owp/inc/NtwMod.hpp
Normal file
@@ -0,0 +1,179 @@
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 15/03/98)
|
||||
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : NtwMod.hpp
|
||||
//
|
||||
// Modification classes
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from CPA_Modif
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 98-03-15 Author: CPA2 Gabriela Dumitrascu
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
#ifndef __NTWMOD_HPP__
|
||||
#define __NTWMOD_HPP__
|
||||
|
||||
#include "NtwObj.hpp"
|
||||
|
||||
#define GRAPH_INSERT_GRAPH 0
|
||||
#define GRAPH_DELETE_GRAPH 1
|
||||
#define GRAPH_INSERT_NODE 2
|
||||
#define GRAPH_DELETE_NODE 3
|
||||
#define GRAPH_INSERT_ARC 4
|
||||
#define GRAPH_DELETE_ARC 5
|
||||
#define GRAPH_RENAME_GRAPH 6
|
||||
|
||||
class ModifGraph : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
Graph *m_poGraph;
|
||||
WP_tdHandleOfGraph m_hOldGraph, m_hNewGraph;
|
||||
|
||||
public :
|
||||
ModifGraph(Graph *poGraph, unsigned short type);
|
||||
void ModifSave();
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
// Shaitan Correction {
|
||||
|
||||
//===========================================================================
|
||||
class DeleteGraph : public CPA_Modif
|
||||
{
|
||||
private:
|
||||
// editor parameters
|
||||
Graph *m_pGraph;
|
||||
// flags
|
||||
BOOL m_bDeleted;
|
||||
BOOL m_bFirstTime;
|
||||
|
||||
public:
|
||||
DeleteGraph (Graph *pGraph);
|
||||
~DeleteGraph (void);
|
||||
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
class RenameGraph : public CPA_Modif
|
||||
{
|
||||
private:
|
||||
// editor parameters
|
||||
Graph *m_pGraph;
|
||||
CString m_csOldName;
|
||||
CString m_csNewName;
|
||||
// flags
|
||||
BOOL m_bFirstTime;
|
||||
|
||||
public:
|
||||
RenameGraph (Graph *pGraph, CString csNewName);
|
||||
~RenameGraph (void);
|
||||
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
class InsertNode : public CPA_Modif
|
||||
{
|
||||
private:
|
||||
// editor parameters
|
||||
Graph *m_pGraph;
|
||||
WayPoint *m_pNode;
|
||||
// flags
|
||||
BOOL m_bInserted;
|
||||
BOOL m_bFirstTime;
|
||||
|
||||
public:
|
||||
InsertNode (Graph *pGraph, WayPoint *pNode, BOOL pBlock);
|
||||
~InsertNode (void);
|
||||
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
class DeleteNode : public CPA_Modif
|
||||
{
|
||||
private:
|
||||
// editor parameters
|
||||
Graph *m_pGraph;
|
||||
WayPoint *m_pNode;
|
||||
// connections
|
||||
CPA_List<CPA_SuperObject> m_lstConnections;
|
||||
// flags
|
||||
BOOL m_bDeleted;
|
||||
BOOL m_bFirstTime;
|
||||
|
||||
public:
|
||||
DeleteNode (Graph *pGraph, WayPoint *pNode, BOOL pBlock);
|
||||
~DeleteNode (void);
|
||||
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
class InsertConnection : public CPA_Modif
|
||||
{
|
||||
private:
|
||||
// editor parameters
|
||||
Graph *m_pGraph;
|
||||
WayPoint *m_pSrcWaypoint;
|
||||
WayPoint *m_pDstWaypoint;
|
||||
CPA_SuperObject *m_pArrow;
|
||||
// engine parameters
|
||||
WP_tdhGraphNode m_hSrcNode;
|
||||
WP_tdhGraphNode m_hDstNode;
|
||||
// flags
|
||||
BOOL m_bInserted;
|
||||
BOOL m_bUpdate;
|
||||
BOOL m_bFirstTime;
|
||||
|
||||
public:
|
||||
InsertConnection (Graph *pGraph, WayPoint *pSrcWaypoint, WayPoint *pDstWaypoint, BOOL bUpdate, BOOL pBlock);
|
||||
~InsertConnection (void);
|
||||
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
|
||||
//===========================================================================
|
||||
class DeleteConnection : public CPA_Modif
|
||||
{
|
||||
private:
|
||||
// editor parameters
|
||||
Graph *m_pGraph;
|
||||
WayPoint *m_pSrcWaypoint;
|
||||
WayPoint *m_pDstWaypoint;
|
||||
CPA_SuperObject *m_pArrow;
|
||||
// engine parameters
|
||||
WP_tdhGraphNode m_hSrcNode;
|
||||
WP_tdhGraphNode m_hDstNode;
|
||||
// flags
|
||||
BOOL m_bDeleted;
|
||||
BOOL m_bFirstTime;
|
||||
|
||||
public:
|
||||
DeleteConnection (Graph *pGraph, WayPoint *pSrcWaypoint, WayPoint *pDstWaypoint, BOOL pBlock);
|
||||
~DeleteConnection (void);
|
||||
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
|
||||
//End Shaitan Correction }
|
||||
|
||||
#endif
|
||||
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
199
Rayman_X/cpa/tempgrp/Owp/inc/NtwObj.hpp
Normal file
199
Rayman_X/cpa/tempgrp/Owp/inc/NtwObj.hpp
Normal file
@@ -0,0 +1,199 @@
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 25/02/98)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : NtwObj.hpp
|
||||
//
|
||||
// Definition of the graph editors objects
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : CPA_Object
|
||||
// CPA_EdMot<ACP_tdxHandleOfLink>
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 1998-03-02 Author: CPA2 Gabi Dumitrascu
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __NTWOBJ_HPP__
|
||||
#define __NTWOBJ_HPP__
|
||||
|
||||
#define _WP_D_WPARC_FREIND_
|
||||
#include "Wparc.h"
|
||||
#include "ogd.h"
|
||||
|
||||
|
||||
class NtwDia;
|
||||
class Waypoint_Interface;
|
||||
|
||||
|
||||
class Graph : public CPA_SaveObject, public CPA_EdMot<WP_tdHandleOfGraph>
|
||||
{
|
||||
//protected:
|
||||
public:
|
||||
static NtwDia* ms_poNtwDia;
|
||||
static Waypoint_Interface* ms_poInterface;
|
||||
static BOOL ms_bNotifyHeader;
|
||||
|
||||
// Shaitan Correction {
|
||||
CPA_List<CPA_SuperObject> ms_oListOfArrows; // list of all arrows of the graph
|
||||
//End Shaitan Correction }
|
||||
|
||||
CPA_SuperObject* m_poSuperObject; // super object
|
||||
BOOL m_bSave;
|
||||
|
||||
public:
|
||||
static CPA_List<Graph> ms_oListOfGraph; //// list of all the graph
|
||||
//--- static
|
||||
static void fn_vInitObject (Waypoint_Interface* poInterface);
|
||||
static Waypoint_Interface* GetInterface (void) { return ms_poInterface; }
|
||||
|
||||
static void fn_vCallbackSave ( SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName, void *_p_vData,SCR_tde_Ntfy_Action _eAction );
|
||||
static void fn_vCallbackEmptySectionWPGraph( SCR_tdst_File_Description *p_stFile, char *_p_szSectionName, void *_p_vData,SCR_tde_Ntfy_Action _eAction );
|
||||
static void fn_vCallbackEmptySectionWPSommet( SCR_tdst_File_Description *p_stFile, char *_p_szSectionName, void *_p_vData,SCR_tde_Ntfy_Action _eAction );
|
||||
|
||||
static void fn_vSetDialog ( NtwDia* poNtwDia );
|
||||
static void fn_vSetNotifyHeader (BOOL bNotifyHeader) { ms_bNotifyHeader = bNotifyHeader; }
|
||||
static void fn_vRefreshGraph (void);
|
||||
|
||||
static Graph* fn_pGetGraph(WP_tdhWayPoint hWP);
|
||||
|
||||
static NtwDia* fn_pGetDialog ( void ) { return ms_poNtwDia; }
|
||||
static CPA_List<Graph>* fn_poGetListOfGraph (void) { return &ms_oListOfGraph; }
|
||||
|
||||
static WayPoint* GetWaypoint(WP_tdhWayPoint hWP);
|
||||
|
||||
Graph( CPA_ObjectDLLBase *p_oDLL, CString csName = "1", BOOL bSave = TRUE );
|
||||
Graph ( CPA_ObjectDLLBase *p_oDLL, WP_tdHandleOfGraph hEngineGraph, CString csName, CString csFileName, CString csSectionName );
|
||||
Graph( Graph& rGraph );
|
||||
~Graph();
|
||||
|
||||
Graph& operator= (Graph& rGraph);
|
||||
|
||||
//--- data
|
||||
long GetDataType (void);
|
||||
void* GetData (void) {return GetStruct();}
|
||||
|
||||
// Unicity
|
||||
tdeMissingCriteria fn_eCheckUnicity (const CString csNewName);
|
||||
|
||||
//--- save
|
||||
void fn_vNotifySave (void);
|
||||
void fn_vNotifyUnSave (void);
|
||||
void fn_vNotifyRestore (void);
|
||||
void fn_vNotifyRename (void);
|
||||
void fn_vUpdateReference (CPA_SaveObject *pReferencedObject);
|
||||
|
||||
//---set
|
||||
void SetSuperObject ( CPA_SuperObject* poSuperObject) { m_poSuperObject=poSuperObject; }
|
||||
void fn_vSetSave (BOOL bSave) { m_bSave=bSave; }
|
||||
|
||||
//----get
|
||||
CPA_SuperObject* GetSuperObject (void) {return m_poSuperObject;}
|
||||
WP_tdHandleOfGraph GetEngineStruct() {return (WP_tdHandleOfGraph)GetStruct();}
|
||||
|
||||
|
||||
// Shaitan Correction {
|
||||
void fn_vAddNode(WP_tdhWayPoint hWP, BOOL pBlock);
|
||||
BOOL fn_bRemoveNode(int iNode, BOOL pBlock);
|
||||
void fn_vAddNode(WayPoint *pWP, BOOL pBlock);
|
||||
BOOL fn_bRemoveNode(WayPoint *pWP, BOOL pBlock);
|
||||
//End Shaitan Correction }
|
||||
BOOL fn_bHasNode(WP_tdhWayPoint hWP) {return fn_iGetNodeOfWayPoint(hWP) != -1;}
|
||||
BOOL fn_bHasNode(WayPoint *pWP) {return fn_bHasNode((WP_tdhWayPoint)pWP->GetEngineStruct());}
|
||||
int fn_iGetNumberOfNodes() {return WPG_fn_lNumberOfWaypointOfGraph(GetEngineStruct());}
|
||||
WP_tdhGraphNode fn_hGetNode(int iNode);
|
||||
WP_tdhWayPoint fn_hGetWayPointOfNode(int iNode);
|
||||
int fn_iGetNodeOfWayPoint(WP_tdhWayPoint hWP);
|
||||
|
||||
int fn_iGetNumberOfArcs(WP_tdhGraphNode hNode);
|
||||
WP_tdHandleOfArc fn_hGetArc(WP_tdhGraphNode hNode, int iArc);
|
||||
int fn_iGetArcOfNode(WP_tdhGraphNode hNode, WP_tdhGraphNode hArcNode);
|
||||
BOOL fn_bNodeHasArc(WP_tdhGraphNode hNode, WP_tdhGraphNode hArcNode) {return fn_iGetArcOfNode(hNode, hArcNode) != -1;}
|
||||
// Shaitan Correction {
|
||||
void fn_vAddArcToNode(WP_tdhGraphNode hNode, WP_tdhGraphNode hArcNode, BOOL pBlock);
|
||||
void fn_vAddArcToNode(WayPoint *pSrcNode, WayPoint *pDstNode, BOOL bUpdate, BOOL pBlock);
|
||||
void fn_vRemoveArcOfNode(WP_tdhGraphNode hNode, int iArc, BOOL pBlock);
|
||||
void fn_vRemoveArcOfNode(WayPoint *pSrcNode, WayPoint *pDstNode, BOOL pBlock);
|
||||
//End Shaitan Correction }
|
||||
void fn_vSetDefaultArcWeight(WP_tdhGraphNode hNode, int iArc);
|
||||
void fn_vSetDefaultAllArcsWeight();
|
||||
// Shaitan NewParam {
|
||||
long fn_lGetDefaultArcWeight(WayPoint* pSrcNode, WayPoint* pDstNode);
|
||||
void fn_vSetAllArcsCapacity(long lCapacity);
|
||||
//End Shaitan NewParam }
|
||||
|
||||
// Shaitan Correction {
|
||||
void fn_vInitGraphicConnections (void);
|
||||
void fn_vUpdateConnection (CPA_SuperObject *pConnection, BOOL bUpdate);
|
||||
void fn_vDisplayConnection (CPA_SuperObject *pConnection, BOOL bUpdate);
|
||||
void fn_vDisplayAllLinks (BOOL bDisplay, BOOL bUpdate);
|
||||
void fn_vDisplayOutLinks (WayPoint* pSrcNode, BOOL bUpdate);
|
||||
void fn_vDisplayInLinks (WayPoint* pDstNode, BOOL bUpdate);
|
||||
void fn_vUpdateConnections (WayPoint *pMovedWP, BOOL bUpdate);
|
||||
|
||||
void fn_vAddGraphicConnection (CPA_SuperObject *pConnection);
|
||||
void fn_vRemoveGraphicConnection (CPA_SuperObject *pConnection);
|
||||
|
||||
CPA_SuperObject * GetGraphicConnection (WayPoint* pSrcNode, WayPoint* pDstNode);
|
||||
|
||||
void GetConnectionsToWaypoint (WayPoint *pNode, int iType, CPA_List<CPA_SuperObject> *pListToFill);
|
||||
|
||||
void SetConnectionCapacity (WayPoint *pSrcNode, WayPoint *pDstNode, long lCapacity);
|
||||
void SetConnectionWeight (WayPoint *pSrcNode, WayPoint *pDstNode, long lWeight);
|
||||
long GetConnectionCapacity (WayPoint *pSrcNode, WayPoint *pDstNode);
|
||||
long GetConnectionWeight (WayPoint *pSrcNode, WayPoint *pDstNode);
|
||||
|
||||
// Shaitan NewParam {
|
||||
void SetNodeType (WayPoint *pSrcNode, long lType);
|
||||
long GetNodeType (WayPoint *pSrcNode);
|
||||
|
||||
WayPoint * GetPrevNode (WayPoint *pSrcNode);
|
||||
WayPoint * GetNextNode (WayPoint *pSrcNode);
|
||||
|
||||
WayPoint * GetPrevConnection (WayPoint *pSrcNode, WayPoint *pDstNode);
|
||||
WayPoint * GetNextConnection (WayPoint *pSrcNode, WayPoint *pDstNode);
|
||||
//End Shaitan NewParam }
|
||||
|
||||
void fn_vShowWaypoints (BOOL bShow);
|
||||
//End Shaitan Correction }
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
class Connection : public Arrow3D
|
||||
{
|
||||
// Shaitan Correction {
|
||||
/*
|
||||
public:
|
||||
|
||||
int m_iGraph, m_iNode, m_iArc;
|
||||
// construct
|
||||
Connection(CPA_EditorBase *p_oEditor, int iGraph, int iNode, int iArc);
|
||||
*/
|
||||
private:
|
||||
Graph *m_pGraph;
|
||||
WayPoint *m_pSrcWP;
|
||||
WayPoint *m_pDstWP;
|
||||
long m_lCapacity;
|
||||
long m_lWeight;
|
||||
|
||||
public:
|
||||
Graph * GetGraph (void) { return m_pGraph; }
|
||||
WayPoint * GetSrcWayPoint (void) { return m_pSrcWP; }
|
||||
WayPoint * GetDstWayPoint (void) { return m_pDstWP; }
|
||||
long GetCapacity (void) { return m_lCapacity; }
|
||||
long GetWeight (void) { return m_lWeight; }
|
||||
|
||||
void SetCapacity (long lCapacity) { m_lCapacity = lCapacity; }
|
||||
void SetWeight (long lWeight) { m_lWeight = lWeight; }
|
||||
|
||||
Connection(CPA_EditorBase *p_oEditor, Graph *pGraph, WayPoint *pSrcWP, WayPoint *pDstWP, long m_lCapacity, long m_lWeight);
|
||||
//End Shaitan Correction }
|
||||
};
|
||||
|
||||
|
||||
#endif //__NTWOBJ_HPP__
|
||||
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
18
Rayman_X/cpa/tempgrp/Owp/inc/StdAfx.h
Normal file
18
Rayman_X/cpa/tempgrp/Owp/inc/StdAfx.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
#ifndef __STDAAFX_H__
|
||||
#define __STDAAFX_H__
|
||||
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
|
||||
#endif //__STDAAFX_H__
|
||||
|
153
Rayman_X/cpa/tempgrp/Owp/inc/TanObj.hpp
Normal file
153
Rayman_X/cpa/tempgrp/Owp/inc/TanObj.hpp
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : TanObj.hpp
|
||||
//
|
||||
// Definition of the tangent objects
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : CPA_Object
|
||||
// CPA_EdMot<ACP_tdxHandleOfLink>
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 29 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __TanagentOBJECT_HPP__
|
||||
#define __TanagentOBJECT_HPP__
|
||||
|
||||
|
||||
class Waypoint_Interface;
|
||||
class Link;
|
||||
|
||||
|
||||
typedef enum _eTangentLenghtMode
|
||||
{
|
||||
eVariableLenghtTangent, // lenght of tangent is edited
|
||||
eFixLenghtTangent // lenght of tangent is constant
|
||||
}
|
||||
eTangentLenghtMode;
|
||||
|
||||
typedef enum _eTangentOrientationMode
|
||||
{
|
||||
eVariableOrientationTangent, // lenght of tangent is edited
|
||||
eFixOrientationTangent // lenght of tangent is constant
|
||||
}
|
||||
eTangentOrientationMode;
|
||||
|
||||
typedef enum _eTangentChangeNeighbourMode // change the neighbour tangent only
|
||||
{
|
||||
eNeverChangeNeighbour,
|
||||
eAlwaysChangeNeighbour,
|
||||
eShiftDownChangeNeighbour,
|
||||
eControlDownChangeNeighbour,
|
||||
eShiftUpChangeNeighbour,
|
||||
eControlUpChangeNeighbour
|
||||
}
|
||||
eTangentNeighbourMode;
|
||||
|
||||
typedef enum _eTangentChangeAllMode // change all the tangents
|
||||
{
|
||||
eNeverChangeAll,
|
||||
eAlwaysChangeAll,
|
||||
eShiftDownChangeAll,
|
||||
eControlDownChangeAll,
|
||||
eShiftUpChangeAll,
|
||||
eControlUpChangeAll
|
||||
}
|
||||
eTangentChangeAllMode;
|
||||
|
||||
class Tangent : public CPA_BaseObject
|
||||
{
|
||||
protected:
|
||||
static Waypoint_Interface* ms_poInterface; // interface
|
||||
static long ms_lNbTangent; // object counter
|
||||
|
||||
CPA_SuperObject* m_poSuperObject;
|
||||
Link* m_poParent; // Father Link onject
|
||||
MTH3D_tdstVector m_stFixVertex; // in the axis of the father object
|
||||
MTH3D_tdstVector m_stTangentVector; // in the absolute axis
|
||||
GLI_tdxValue m_xDim;
|
||||
MTH3D_tdstVector m_stMoveVertex; // extrem vertex of the tangant
|
||||
// -> is only used when tangent moves
|
||||
GLI_tdxValue m_xMoveRatio; // dif between pick point and movevertex
|
||||
|
||||
|
||||
|
||||
GEO_tdstColor m_stColor; // color of the graphic tangent
|
||||
eTangentLenghtMode m_eTangentLenghtMode; // lenght edition mode
|
||||
eTangentOrientationMode m_eTangentOrientationMode; // orientation edition mode
|
||||
eTangentNeighbourMode m_eTangentNeighbourMode; // change neighbour mode
|
||||
eTangentChangeAllMode m_eTangentChangeAllMode; // change all mode
|
||||
BOOL m_bOrientationAllow; // allow orientation of tangent
|
||||
BOOL m_bNotifyWay; // notify the owner way
|
||||
|
||||
public:
|
||||
// static
|
||||
static void fn_vInitObject (Waypoint_Interface* poInterface);
|
||||
static Waypoint_Interface* GetInterface (void);
|
||||
|
||||
Tangent
|
||||
(
|
||||
CPA_ObjectDLLBase *p_oDLL,
|
||||
CPA_BaseObject *p_oOwner,
|
||||
eTangentLenghtMode eLenghtMode=eVariableLenghtTangent,
|
||||
eTangentOrientationMode eOrientationMode=eFixOrientationTangent,
|
||||
eTangentNeighbourMode eNeighbourMode = eNeverChangeNeighbour,
|
||||
eTangentChangeAllMode eChangeAllMode = eNeverChangeAll,
|
||||
GEO_tdstColor* pstColor=NULL
|
||||
);
|
||||
|
||||
void *GetEngineStruct (void) { return NULL; }
|
||||
|
||||
// data
|
||||
long GetDataType (void);
|
||||
void* GetData (void);
|
||||
|
||||
// set
|
||||
void fn_vSetAbsoluteVertex ( MTH3D_tdstVector* pstFixAbsoluteVertex, MTH3D_tdstVector* pstTangentVe );
|
||||
void fn_vSetTangent ( MTH3D_tdstVector* pstMoveAbsoluteVertex );
|
||||
void fn_vSetTangentDirection ( MTH3D_tdstVector* pstAbsoluteDirectionVertex, BOOL bOppositeDirection=FALSE );
|
||||
void fn_vSetColor ( GEO_tdstColor* pstColor );
|
||||
void fn_vSetDim ( GLI_tdxValue xDim ) { m_xDim = xDim; }
|
||||
|
||||
// get
|
||||
Link* fn_pGetParent (void) { return m_poParent; }
|
||||
|
||||
// super object
|
||||
void SetSuperObject ( CPA_SuperObject* poSuperObject) { m_poSuperObject=poSuperObject; }
|
||||
CPA_SuperObject* GetSuperObject (void) { return m_poSuperObject; }
|
||||
|
||||
// move
|
||||
void fn_pGetAbsoluteTangent (MTH3D_tdstVector* pstTangent);
|
||||
|
||||
// draw
|
||||
void fn_vConstructGraphic (void); // construct the graphic son's
|
||||
void fn_vDraw (void); // refreh the draw according to the object
|
||||
|
||||
// moves
|
||||
void fn_vStartMove ( MTH3D_tdstVector* pstStartVertex, BOOL bShift, BOOL bControl );
|
||||
void fn_vMove ( MTH3D_tdstVector* pstTranslation, BOOL bShift, BOOL bControl );
|
||||
void fn_vEndMove (void);
|
||||
|
||||
void fn_vChangeAllTangent (void); // change all the tangent of the way
|
||||
|
||||
protected :
|
||||
void fn_vChangeNeighbourTangent (BOOL bShift, BOOL BControl);
|
||||
void fn_vChangeAllTangent (BOOL bShift, BOOL BControl);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //__TanagentOBJECT_HPP__
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
92
Rayman_X/cpa/tempgrp/Owp/inc/WPDia.hpp
Normal file
92
Rayman_X/cpa/tempgrp/Owp/inc/WPDia.hpp
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : WPDia.hpp
|
||||
//
|
||||
// Dialog edition the waypoints
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
// DiaWP.hpp : header file
|
||||
//
|
||||
|
||||
#ifndef DIAWP_HPP
|
||||
#define DIAWP_HPP
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DiaWP dialog
|
||||
|
||||
class DiaWP : public CFormView
|
||||
{
|
||||
protected:
|
||||
WayPoint* m_poWP;
|
||||
BOOL m_bEditRadius;
|
||||
|
||||
// Construction
|
||||
public:
|
||||
DiaWP(CWnd* pParent = NULL); // standard constructor
|
||||
DECLARE_DYNCREATE ( DiaWP );
|
||||
void fn_vInitDialog ( void ); // jack's function to init the dialog
|
||||
void fn_vEdit (WayPoint* poWP);
|
||||
WayPoint* fn_pGetEditWP (void) { return m_poWP; }
|
||||
BOOL fn_bIsEditWP (WayPoint* poWP) { return m_poWP==poWP; }
|
||||
void fn_vRefreshDialog (void);
|
||||
void fn_vRefreshCoordinate(void);
|
||||
void fn_vEditName (void);
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(DiaWP)
|
||||
enum { IDD = IDD_WAYPOINT_DIALOG };
|
||||
CEdit m_EditWP;
|
||||
float m_fRadius;
|
||||
BOOL m_bStaticCoord;
|
||||
BOOL m_bGlobalCheck;
|
||||
CString m_csWaypointName;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(DiaWP)
|
||||
public:
|
||||
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
||||
void OnDestroy();
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(DiaWP)
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
afx_msg void OnKillfocusWaypointEdit();
|
||||
afx_msg void OnWaypointCoordCheck();
|
||||
afx_msg void OnChangeWaypointEdit();
|
||||
afx_msg void OnRealwpRadio();
|
||||
afx_msg void OnSymbolicalwpRadio();
|
||||
afx_msg void OnGlobaldrawCheck();
|
||||
afx_msg void OnKillfocusWaypointNameEdit();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
void fn_vDrawWP (void);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
54
Rayman_X/cpa/tempgrp/Owp/inc/WPMod.hpp
Normal file
54
Rayman_X/cpa/tempgrp/Owp/inc/WPMod.hpp
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : WPMod.hpp
|
||||
//
|
||||
// Modification classes
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from CPA_Modif
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
#ifndef __WPMOD_HPP__
|
||||
#define __WPMOD_HPP__
|
||||
|
||||
#define TYPE_RADIUS_WP 3
|
||||
#define TYPE_COORDINATE_WP 4
|
||||
|
||||
class ModifWayPointRadius : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
WayPoint* m_poWP;
|
||||
GLI_tdxValue m_xOldRadius;
|
||||
GLI_tdxValue m_xNewRadius;
|
||||
BOOL m_bFirstTime;
|
||||
public :
|
||||
ModifWayPointRadius (WayPoint* poWP, GLI_tdxValue* pxR, BOOL pBlock=0);
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
class ModifWayPointCoordinate : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
WayPoint* m_poWP;
|
||||
BOOL m_bFirstTime;
|
||||
public :
|
||||
ModifWayPointCoordinate (WayPoint* poWP, BOOL pBlock=0);
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
protected :
|
||||
inline void fn_vChangeSystemCoordinate (void);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
168
Rayman_X/cpa/tempgrp/Owp/inc/WPObj.hpp
Normal file
168
Rayman_X/cpa/tempgrp/Owp/inc/WPObj.hpp
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : WPObj.hpp
|
||||
//
|
||||
// Definition of the waypoint editors objects
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : CPA_Object
|
||||
// CPA_EdMot<ACP_tdxHandleOfLink>
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
#ifndef __WPOBJECT_HPP__
|
||||
#define __WPOBJECT_HPP__
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Definition of the name of the models
|
||||
static CString csStaticModelName = "Static";
|
||||
static CString csDynamicModelName = "Dynamic";
|
||||
static CString csWaypointModelName = "Waypoint";
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
class DiaWP;
|
||||
//class Way;
|
||||
class Waypoint_Interface;
|
||||
|
||||
class WayPoint : public CPA_SaveObject, public CPA_EdMot<WP_tdhWayPoint>
|
||||
{
|
||||
protected:
|
||||
static DiaWP* ms_poDiaWP;
|
||||
static BOOL ms_bRealDraw;
|
||||
static BOOL ms_bGlobalDraw;
|
||||
static BOOL ms_bNotifyHeader;
|
||||
static Waypoint_Interface* ms_poInterface;
|
||||
|
||||
static BOOL ms_bOnScreen;
|
||||
static BOOL ms_bDrawJustIsolateWaypoint;
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 02/03/98)
|
||||
// static CPA_List<WayPoint> ms_oListOfWaypoint; // list of all the ways
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
||||
|
||||
CPA_SuperObject* m_poSuperObject;
|
||||
BOOL m_bAbsoluteCoordinate;
|
||||
CPA_SuperObject* m_poFather;
|
||||
BOOL m_bCurrentDraw;
|
||||
BOOL m_bRealDraw;
|
||||
BOOL m_bAlone; // this waypoint is created alone ( not in a way )
|
||||
BOOL m_bSave; // this waypoint can be save
|
||||
BOOL m_bOnScreen;
|
||||
CPA_SuperObject* m_pSymbolicalGraphic;
|
||||
CPA_SuperObject* m_pRealGraphic;
|
||||
|
||||
CPA_SuperObject * m_poDynamicFather;
|
||||
|
||||
public:
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 02/03/98)
|
||||
static CPA_List<WayPoint> ms_oListOfWaypoint; // list of all the ways
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
||||
//--- static
|
||||
static void fn_vInitObject (Waypoint_Interface* poInterface);
|
||||
|
||||
static void fn_vCallbackHeader ( SCR_tdst_File_Description *p_stFile, char *_p_szSectionName, void *_p_vData,SCR_tde_Ntfy_Action _eAction );
|
||||
static void fn_vCallbackSave ( SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName, void *_p_vData,SCR_tde_Ntfy_Action _eAction );
|
||||
static void fn_vCallbackEmptySectionWaypointIsolate ( SCR_tdst_File_Description *p_stFile, char *_p_szSectionName, void *_p_vData,SCR_tde_Ntfy_Action _eAction );
|
||||
static void fn_vCallbackEmptySectionWaypointInWay ( SCR_tdst_File_Description *p_stFile, char *_p_szSectionName, void *_p_vData,SCR_tde_Ntfy_Action _eAction );
|
||||
|
||||
static void fn_vSetDialog ( DiaWP* poDiaWP );
|
||||
static DiaWP* fn_pGetDialog ( void ) { return ms_poDiaWP; }
|
||||
static BOOL fn_bIsWaypointScreen (void) { return ms_bOnScreen; }
|
||||
static void fn_vSetWaypointOnScreen (BOOL bOnScreen) { ms_bOnScreen=bOnScreen; }
|
||||
static BOOL fn_bDrawJustIsolateWaypoint ( void ) { return ms_bDrawJustIsolateWaypoint; }
|
||||
static void fn_vSetDrawJustIsolateWaypoint ( BOOL bDrawJustIsolateWaypoint ) { ms_bDrawJustIsolateWaypoint=bDrawJustIsolateWaypoint;}
|
||||
|
||||
static void fn_vSetNotifyHeader (BOOL bNotifyHeader) { ms_bNotifyHeader = bNotifyHeader; }
|
||||
static void fn_vRefreshWaypoint (void);
|
||||
static BOOL fn_bCheckWaypointCoherence (CPA_List<WayPoint> *poWaypointList=NULL);
|
||||
|
||||
|
||||
WayPoint( CPA_ObjectDLLBase *p_oDLL, BOOL bAlone=TRUE, CString csName="Waypoint1", BOOL bSave=TRUE );
|
||||
WayPoint ( CPA_ObjectDLLBase *p_oDLL, WP_tdhWayPoint hEngineWP, CString csName, CString csFileName, CString csSectionName );
|
||||
WayPoint( WayPoint& rWayPoint );
|
||||
~WayPoint();
|
||||
|
||||
WayPoint& operator= (WayPoint& rWP);
|
||||
|
||||
|
||||
//--- data
|
||||
long GetDataType (void);
|
||||
void* GetData (void);
|
||||
|
||||
|
||||
//--- save
|
||||
void fn_vUpDateSectorSection (void);
|
||||
void fn_vNotifySave (void);
|
||||
void fn_vNotifyUnSave (void);
|
||||
void fn_vNotifyRestore (void);
|
||||
void fn_vNotifyRename (void);
|
||||
void fn_vUpdateReference (CPA_SaveObject *pReferencedObject);
|
||||
|
||||
|
||||
void *GetEngineStruct() { return GetStruct(); };
|
||||
void fn_vSetRadius (GLI_tdxValue* pxR);
|
||||
void fn_vSetCoordinate (BOOL bAbsolute);
|
||||
void fn_vSetFather (CPA_SuperObject* poFather);
|
||||
void fn_vChangeSystemCoordinate (void);
|
||||
GLI_tdxValue fn_xGetRadius (void);
|
||||
BOOL fn_bIsAlone (void) { return m_bAlone; }
|
||||
void fn_vSetAlone ( BOOL bAlone ) { m_bAlone=bAlone; }
|
||||
void fn_vSetSave ( BOOL bSave ) { m_bSave=bSave; }
|
||||
void fn_vSetSymbolicalGraphic ( CPA_SuperObject* poSymbolicalGraphic ) { m_pSymbolicalGraphic=poSymbolicalGraphic; }
|
||||
void fn_vSetRealGraphic ( CPA_SuperObject* poRealGraphic ) { m_pRealGraphic=poRealGraphic; }
|
||||
// Shaitan Correction {
|
||||
CPA_SuperObject * GetSymbolicalGraphic (void) { return m_pSymbolicalGraphic; }
|
||||
CPA_SuperObject * GetRealGraphic (void) { return m_pRealGraphic; }
|
||||
//End Shaitan Correction }
|
||||
BOOL fn_bGetCoordinate (void) { return m_bAbsoluteCoordinate; }
|
||||
CPA_SuperObject* fn_pGetFather (void);
|
||||
void fn_vSetOnScreen ( BOOL bOnScreen ) { m_bOnScreen = bOnScreen; }
|
||||
BOOL fn_bGetOnScreen (void) { return m_bOnScreen; }
|
||||
void SetSuperObject ( CPA_SuperObject* poSuperObject) { m_poSuperObject=poSuperObject; }
|
||||
CPA_SuperObject* GetSuperObject (void) { return m_poSuperObject; }
|
||||
|
||||
CPA_SuperObject* fn_pGetDynamicFather (void);
|
||||
void fn_vSetDynamicFather (CPA_SuperObject* poDynamicFather);
|
||||
|
||||
static Waypoint_Interface* GetInterface (void) { return ms_poInterface; }
|
||||
|
||||
//------------------------------- compute motor object
|
||||
void fn_vComputeMotorStructure (void);
|
||||
|
||||
//------------------------------- Drawing mode
|
||||
// draw
|
||||
void fn_vDraw (BOOL bScreen=TRUE, BOOL bDestroy=TRUE); // draw the wp
|
||||
void fn_vDrawNewRadius (void); // modify the draw of the radius if necessary
|
||||
// local drawing
|
||||
BOOL fn_bIsRealDraw (void) { return m_bRealDraw; }
|
||||
void fn_vSetRealDraw (BOOL bDrawMode) { m_bRealDraw=bDrawMode; }
|
||||
// global variables of drawing
|
||||
// mode of global drawing
|
||||
static BOOL fn_bIsGlobalRealDraw (void) { return ms_bRealDraw; }
|
||||
static void fn_vSetGlobalRealDraw (BOOL bGlobalDrawMode) { ms_bRealDraw=bGlobalDrawMode; }
|
||||
// global draw activate
|
||||
static BOOL fn_bIsGlobalDraw (void) { return ms_bGlobalDraw; }
|
||||
static void fn_vSetGlobalDraw (BOOL bGlobalDraw) { ms_bGlobalDraw=bGlobalDraw; }
|
||||
// general functions
|
||||
// solve local/global directions
|
||||
BOOL fn_bIsGeneralRealDraw (void) { return ms_bGlobalDraw ? ms_bRealDraw : m_bRealDraw; }
|
||||
void fn_vSetGeneralRealDraw (BOOL bDrawMode) { if (ms_bGlobalDraw) fn_vSetGlobalRealDraw (bDrawMode); else fn_vSetRealDraw(bDrawMode); }
|
||||
|
||||
BOOL fn_bIsWaypointDrawable (void);
|
||||
|
||||
//-------------------------------- Coherence management
|
||||
BOOL fn_bCheckCoherence (void);
|
||||
BOOL fn_bIsReferencedInAI (void);
|
||||
};
|
||||
|
||||
extern CPA_List<WayPoint> g_ListWayPoint;
|
||||
|
||||
#endif //__OBJECT_HPP__
|
105
Rayman_X/cpa/tempgrp/Owp/inc/WayMod.hpp
Normal file
105
Rayman_X/cpa/tempgrp/Owp/inc/WayMod.hpp
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : WayMod.hpp
|
||||
//
|
||||
// Modification classes
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from CPA_Modif
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __WayMOD_HPP__
|
||||
#define __WayMOD_HPP__
|
||||
|
||||
#define TYPE_INSERT_WP 1
|
||||
#define TYPE_DELETE_WP 2
|
||||
#define TYPE_REMOVE_WP 3
|
||||
#define TYPE_ADD_NEW_WP 4
|
||||
|
||||
|
||||
// insert a WP at any position in the way
|
||||
class ModifWayInsert : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
Way* m_pWay;
|
||||
WayPoint* m_pInsertWP;
|
||||
WP_tduc_WPIndex m_stBeforeWP;
|
||||
BOOL m_DialogRefresh;
|
||||
Link* m_pOldLink;
|
||||
Link* m_pLinkBefore;
|
||||
Link* m_pLinkAfter;
|
||||
|
||||
public :
|
||||
ModifWayInsert (Way* pWay, WayPoint* m_pInsertWP, WP_tduc_WPIndex stBeforeWP, BOOL bDialog1stRefresh=TRUE,BOOL pBlock=0);
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
// delete a way point in the net at a given position
|
||||
class ModifWayDelete : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
Way* m_pWay;
|
||||
WayPoint* m_pDeleteWP;
|
||||
WP_tduc_WPIndex m_stDeletePosWP;
|
||||
Link* m_pLink;
|
||||
Link* m_pOldLinkBefore;
|
||||
Link* m_pOldLinkAfter;
|
||||
BOOL m_DialogRefresh;
|
||||
public :
|
||||
ModifWayDelete (Way* pWay, WP_tduc_WPIndex lPosDeleteWP, BOOL pBlock=0);
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
// delete all the waypoints in a way
|
||||
class ModifWayRemove : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
Way* m_pWay;
|
||||
WayPoint* m_pRemoveWP;
|
||||
long m_lNbRemoveWP;
|
||||
WP_tduc_WPIndex* m_dstRemovePosWP;
|
||||
Link** m_dpoRemoveLinkBefore;
|
||||
Link** m_dpoRemoveLinkAfter;
|
||||
|
||||
public :
|
||||
ModifWayRemove (Way* pWay, WayPoint* pDeleteWP, BOOL pBlock=0);
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
// Add a new WP in a way
|
||||
class ModifWayAddWP : public CPA_Modif
|
||||
{
|
||||
protected :
|
||||
Way* m_poWay; // net where the WP wil be add
|
||||
CPA_SuperObject* m_poSuperWP; // new super object WP
|
||||
MTH3D_tdstVector* m_pAbsolutePosition; // location of the WP in absolute system
|
||||
CPA_Interface* m_pEditor; // ref to the editor to be use
|
||||
ModifWayInsert* m_pModifInsertWP; // insert modif object
|
||||
WP_tduc_WPIndex m_stPosBeforeWP; // pos to insert
|
||||
|
||||
public :
|
||||
ModifWayAddWP ( Way* poWay, MTH3D_tdstVector* pAbsolutePosition, WP_tduc_WPIndex lBeforeWP, CPA_Interface* pEditor, BOOL pBlock=FALSE);
|
||||
BOOL Do (void);
|
||||
BOOL Undo (void);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
256
Rayman_X/cpa/tempgrp/Owp/inc/WayObj.hpp
Normal file
256
Rayman_X/cpa/tempgrp/Owp/inc/WayObj.hpp
Normal file
@@ -0,0 +1,256 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : WayObj.hpp
|
||||
//
|
||||
// Definition of the way editors objects
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : CPA_Object
|
||||
// CPA_EdMot<ACP_tdxHandleOfLink>
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __WayOBJECT_HPP__
|
||||
#define __WayOBJECT_HPP__
|
||||
|
||||
|
||||
#define c_Way_Normal 0
|
||||
#define c_Way_InsertWP 1
|
||||
#define c_Way_Add 2
|
||||
|
||||
|
||||
class DiaWay;
|
||||
class WayPoint;
|
||||
class Link;
|
||||
class Waypoint_Interface;
|
||||
class EdtList;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eWayDisplayOn,
|
||||
eWayDisplayOff,
|
||||
eWayDisplaySelected
|
||||
} tdeWayDisplay;
|
||||
|
||||
class Way : public CPA_SaveObject, public CPA_EdMot<WP_tdhWay>
|
||||
{
|
||||
protected :
|
||||
static DiaWay* ms_poDiaWay; // Dialog
|
||||
static WayPoint* m_poVirtualWP; // Virtual WP
|
||||
static CPA_List<Way> ms_oListOfWay; // list of all the ways
|
||||
static Waypoint_Interface* ms_poInterface; // dll interface
|
||||
static tdeWayDisplay ms_eWayDisplay; // display all ways state
|
||||
static Way* ms_poCopyWay; // buffer used to copy/paste ways
|
||||
|
||||
CPA_SuperObject* m_poSuperObject; // super object
|
||||
|
||||
CPA_List<WayPoint> m_WaypointList; // List of the WP of the way
|
||||
CPA_List<Link> m_LinkList; // List of links
|
||||
long m_lSelectWP; // Select WP in the dialog
|
||||
long m_lMode; // Current mode
|
||||
BOOL m_bRecreate; // this way is delete but can be recrete
|
||||
BOOL m_bRotationMode; // rotation edition mode
|
||||
|
||||
//---- Used only in creation and insertion mode
|
||||
long m_lWPInsertBefore; // We insert the new WP here
|
||||
Link *m_pLinkBefore, *m_pLinkAfter; // Elastic links
|
||||
Link *m_pOldLink; // Deleted link for edition
|
||||
//----
|
||||
|
||||
tdeWayDisplay m_eWayDisplay; // display all ways state
|
||||
|
||||
// style
|
||||
char m_cDefaultLink;
|
||||
GLI_tdxValue m_xLBeam;
|
||||
|
||||
public:
|
||||
//----- static
|
||||
static void fn_vInitObject (Waypoint_Interface* poInterface);
|
||||
static void fn_vSetDialog ( DiaWay* poDiaWay );
|
||||
static DiaWay* fn_pGetDialog ( void ) { return ms_poDiaWay; }
|
||||
static void fn_vSetVirtualWP (WayPoint* poVirtualWP) { m_poVirtualWP = poVirtualWP; }
|
||||
static WayPoint* fn_pGetVirtualWP (void) { return m_poVirtualWP; }
|
||||
|
||||
// display
|
||||
static void fn_vRefreshWay (void);
|
||||
static void fn_vDisplayWayOfActor ( CPA_BaseObject* poInstance );
|
||||
|
||||
static void fn_vResetRecreate (void);
|
||||
static CPA_List<Way>* fn_poGetListOfWay (void) { return &ms_oListOfWay; }
|
||||
static Waypoint_Interface* GetInterface (void) { return ms_poInterface; }
|
||||
static BOOL fn_oGetListOfWayUnderParent (CPA_List<Way>* poList, CPA_BaseObject* poParent);
|
||||
static void fn_vCallbackSave ( SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName, void *_p_vData,SCR_tde_Ntfy_Action _eAction );
|
||||
static void fn_vSetDisplayAllWay (tdeWayDisplay eWayDisplay) { ms_eWayDisplay=eWayDisplay; }
|
||||
static tdeWayDisplay fn_eGetDisplayAllWay (void) { return ms_eWayDisplay; }
|
||||
static Way* fn_pGetCopyWay (void) { return ms_poCopyWay; }
|
||||
static BOOL fn_bCheckWayCoherence ( CPA_List<Way>* poWayList=NULL );
|
||||
|
||||
Way ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject* poFamilly );
|
||||
Way( CPA_ObjectDLLBase *p_oDLL, WP_tdhWay hWayEngine, CPA_BaseObject* poOwner, CString csName, CString csReferencedSectionName );
|
||||
Way ( Way& rWay );
|
||||
~Way (void);
|
||||
Way& operator= ( Way& );
|
||||
|
||||
//--- data
|
||||
long GetDataType (void);
|
||||
void* GetData (void);
|
||||
|
||||
// Unicity
|
||||
tdeMissingCriteria fn_eCheckUnicity (const CString csNewName) { return fn_eCheckUnicityWithOwner(csNewName); }
|
||||
|
||||
|
||||
// Load
|
||||
void fn_vLoadFromEngine (void);
|
||||
|
||||
// Save
|
||||
void fn_vNotifySave (void);
|
||||
void fn_vNotifyUnSave (void);
|
||||
void fn_vNotifyRestore (void);
|
||||
void fn_vNotifyRename (void);
|
||||
void fn_vUpdateReference (CPA_SaveObject *pReferencedObject);
|
||||
|
||||
void fn_vNotifyAllEdtList (void);
|
||||
|
||||
// Dialog
|
||||
inline BOOL fn_bIsDialog (void); // the dialog of this instance is open ?
|
||||
|
||||
// Set
|
||||
void fn_vSetSelectWayPoint (long lPosSelectWP);
|
||||
void fn_vSetLBeam (GLI_tdxValue xLBeam ) { m_xLBeam=xLBeam; }
|
||||
void fn_vSetSpeed (GLI_tdxValue xSpeed);
|
||||
void fn_vSetDefaultLink (char cTypeLink) { m_cDefaultLink=cTypeLink; }
|
||||
void fn_vSetRecreate ( BOOL bRecreate ) { m_bRecreate = bRecreate; }
|
||||
void fn_vSetDisplayWay (tdeWayDisplay eWayDisplay) { m_eWayDisplay=eWayDisplay; }
|
||||
void fn_vSetRotationMode (BOOL bRotationMode);
|
||||
void SetSuperObject ( CPA_SuperObject* poSuperObject) { m_poSuperObject=poSuperObject; }
|
||||
|
||||
// Get
|
||||
long fn_lGetSelectWayPoint (void);
|
||||
GLI_tdxValue fn_xGetLBeam (void) { return m_xLBeam; }
|
||||
GLI_tdxValue fn_xGetSpeed (void);
|
||||
long fn_lGetWPName (char (**dszName)[30]); // this function allocate the array
|
||||
WayPoint* fn_pGetWayPoint (char* pszNameWP);
|
||||
WayPoint* fn_pGetWayPoint (long lIndice);
|
||||
Link* fn_pGetLink (long lIndice);
|
||||
tdeWayDisplay fn_eGetDisplayWay (void) { return m_eWayDisplay; }
|
||||
BOOL fn_bGetRotationMode (void) { return m_bRotationMode; }
|
||||
CPA_SuperObject* GetSuperObject (void) { return m_poSuperObject; }
|
||||
|
||||
WP_tdhLink fn_pGetLinkInfo (long lIndice);
|
||||
char fn_cGetDefaultLink (void) { return m_cDefaultLink; }
|
||||
|
||||
// get lists
|
||||
CPA_List<WayPoint>* GetListWaypoint (void) { return &m_WaypointList; }
|
||||
CPA_List<Link>* GetListLink (void) { return &m_LinkList; }
|
||||
|
||||
void *GetEngineStruct (void) { return GetStruct(); };
|
||||
|
||||
// insert functions
|
||||
BOOL fn_vAddWayPoint (WayPoint* poWP);
|
||||
BOOL fn_vInsertWayPoint(WayPoint* poWP, BOOL bBlock=FALSE);
|
||||
BOOL fn_vInsBeforeWP (WayPoint* poInsWP, long lBeforeWP, BOOL bDialog1stRefresh=TRUE, BOOL bBlock=FALSE);
|
||||
void fn_vInsertNewWayPoint (MTH3D_tdstVector* pAbsolutePosition);
|
||||
|
||||
// remove functions
|
||||
void fn_vRemoveWayPoint (WayPoint* poWP);
|
||||
void fn_vDeleteWayPoint(void);
|
||||
void fn_vSupWP (long lPosDelWP, BOOL bBlock=FALSE);
|
||||
|
||||
// search
|
||||
int fn_iIsWayPointInNet (WayPoint* poSearchWP,WayPoint* poNextSearchWP=NULL);
|
||||
int fn_iSearchLinkInWay (Link* poSearchLink);
|
||||
|
||||
// Change Link
|
||||
BOOL fn_bChangeLink ( Link* pOldLink, Link* pNewLink );
|
||||
void fn_vChangeAllOrientationTangent (MTH3D_tdstVector* pTangentVertex);
|
||||
|
||||
// return previous or next links
|
||||
Link* fn_pPrevLink (Link* pLink);
|
||||
Link* fn_pNextLink (Link* pLink);
|
||||
|
||||
// select WP in way
|
||||
BOOL fn_vClicWayPoint (WayPoint* poWP1, WayPoint* poWP2=NULL);
|
||||
|
||||
// If the WP poWP has moved, must we redraw the way ?
|
||||
// and if so compute the links to redraw
|
||||
BOOL fn_bIsRedrawWay (WayPoint* poWP);
|
||||
|
||||
// DRAW
|
||||
// Redraw just the 'elastics'
|
||||
void fn_vDrawMouseLine (MTH3D_tdstVector* pxPosMouse);
|
||||
// Draw the creation elastic
|
||||
void fn_vDrawElastic (MTH3D_tdstVector* pxPosMouse);
|
||||
void fn_vRefresh (BOOL bDeleteMark=TRUE, BOOL bDraw=TRUE);
|
||||
void fn_vDraw (void);
|
||||
|
||||
// this way must be on screen ?
|
||||
BOOL fn_bIsWayDrawable (void);
|
||||
|
||||
// Selection
|
||||
void fn_vSelectAllWP (void);
|
||||
void fn_vUnselectAllWP (void);
|
||||
|
||||
// Copy/Paste
|
||||
BOOL fn_bCanPaste (void) { return ms_poCopyWay!=NULL && IsWayEmpty(); }
|
||||
void fn_vCopy (void);
|
||||
void fn_vPaste (void);
|
||||
|
||||
// New Link
|
||||
CPA_SuperObject* fn_pCreateLink (char cType);
|
||||
|
||||
// Change mode
|
||||
void fn_vModeNormal (void);
|
||||
BOOL fn_vModeAdd (MTH3D_tdstVector* pxPosMouse=NULL);
|
||||
void fn_vModeInsert (Link* poLink, MTH3D_tdstVector* pxPosMouse);
|
||||
|
||||
// Premature end of the creation mode
|
||||
void fn_vStopModeAdd (void);
|
||||
void fn_vAddAtTheEnd (void);
|
||||
|
||||
// Is the way ok ?
|
||||
// if bCorrec modify the Net to make it ok
|
||||
BOOL fn_bIsValid (BOOL bCorrec);
|
||||
|
||||
// the way share waypoint with poWay ?
|
||||
BOOL fn_bConnect ( Way* poWay, CPA_List<WayPoint>* poList );
|
||||
|
||||
// Is the net empty
|
||||
BOOL IsWayEmpty (void) { return m_WaypointList.GetCount()==0; }
|
||||
void fn_vEmptyWay (void); // clear the way
|
||||
|
||||
// Share mode ?
|
||||
long fn_lGetShareMode (void);
|
||||
BOOL fn_bIsCommon (void);
|
||||
|
||||
// number of EdtList that use this way
|
||||
long fn_lUsedInEdtList (void);
|
||||
EdtList* fn_pGetEdtList (void);
|
||||
BOOL fn_bWayInEdtList (EdtList* poEdtList);
|
||||
CString fn_csGetNameInNameList (void);
|
||||
|
||||
// Tools
|
||||
void fn_vSetWaypointOnScreen (BOOL bOnScreen);
|
||||
void fn_vComputeLocation (void);
|
||||
|
||||
// Dialog edition
|
||||
void fn_vDialogAddWp (void);
|
||||
void fn_vDialogDeleteWp (void);
|
||||
};
|
||||
|
||||
|
||||
#endif //__WayOBJECT_HPP__
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
|
91
Rayman_X/cpa/tempgrp/Owp/inc/editdia.h
Normal file
91
Rayman_X/cpa/tempgrp/Owp/inc/editdia.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : EditDia.hpp
|
||||
//
|
||||
// Dialog edition the waypoints
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 10 mar 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
|
||||
#ifndef EDITWP_HPP
|
||||
#define EDITWP_HPP
|
||||
|
||||
|
||||
class Waypoint_Interface;
|
||||
|
||||
class EditDia : public CFormView
|
||||
{
|
||||
protected:
|
||||
Waypoint_Interface* m_poInterface;
|
||||
|
||||
protected:
|
||||
EditDia(void); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(EditDia);
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(EditDia)
|
||||
enum { IDD = IDD_EDIT_DIALOG };
|
||||
CTabCtrl m_oTab;
|
||||
//}}AFX_DATA
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void fn_vInit (void);
|
||||
void fn_vSetInterface ( Waypoint_Interface* );
|
||||
void fn_vRefresh (void);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(EditDia)
|
||||
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext);
|
||||
virtual void OnDestroy();
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(EditDia)
|
||||
afx_msg void OnEditWaypointOnRadio();
|
||||
afx_msg void OnEditWaypointOffRadio();
|
||||
afx_msg void OnEditWaypointAllRadio();
|
||||
afx_msg void OnEditWaypointIsolateRadio();
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
afx_msg void OnSelchangeEditTab(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg void OnEditWayOffRadio();
|
||||
afx_msg void OnEditWayOnRadio();
|
||||
afx_msg void OnEditWaySelectedRadio();
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
long fn_lGetId (long lWayDisplay);
|
||||
void fn_vSetDisplay ( long lDisplayState );
|
||||
void fn_vSetFlags ( int iIndex, long lDisplayState );
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
||||
};
|
||||
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////
|
56
Rayman_X/cpa/tempgrp/Owp/inc/isowpdia.hpp
Normal file
56
Rayman_X/cpa/tempgrp/Owp/inc/isowpdia.hpp
Normal file
@@ -0,0 +1,56 @@
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 25/02/98)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : IsoWpDia.hpp
|
||||
//
|
||||
// Definition of the waypoint
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : CDialog
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 1998-02-23 Author: CPA2 Gabriela Dumitrascu
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IsoWPDia dialog
|
||||
|
||||
class IsoWPDia : public CDialog
|
||||
{
|
||||
public:
|
||||
CPA_List<WayPoint> m_oListOfWP;
|
||||
CPA_List<WayPoint> m_oListOfSelWP;
|
||||
|
||||
// Construction
|
||||
public:
|
||||
IsoWPDia(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(IsoWPDia)
|
||||
enum { IDD = IDD_ISOLATE_WP };
|
||||
CListBox m_IsoWpList;
|
||||
//}}AFX_DATA
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(IsoWPDia)
|
||||
public:
|
||||
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(IsoWPDia)
|
||||
virtual void OnOK();
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnDestroy();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
101
Rayman_X/cpa/tempgrp/Owp/inc/linkdia.hpp
Normal file
101
Rayman_X/cpa/tempgrp/Owp/inc/linkdia.hpp
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : LinkDia.hpp
|
||||
//
|
||||
// Dialog edition the ways
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __LinkDia_HPP__
|
||||
#define __LinkDia_HPP__
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DiaLink form view
|
||||
|
||||
|
||||
class Link;
|
||||
|
||||
|
||||
class DiaLink : public CFormView
|
||||
{
|
||||
protected:
|
||||
DiaLink(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(DiaLink);
|
||||
Link* m_poLink;
|
||||
CDialog* m_pSpecificDialog;
|
||||
|
||||
//{{AFX_DATA(DiaLink)
|
||||
enum { IDD = IDD_LINK_DIALOG };
|
||||
CString m_szLinkName;
|
||||
CString m_oSpeedMode;
|
||||
float m_fSpeed1;
|
||||
float m_fSpeed2;
|
||||
float m_fSpeed3;
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
|
||||
// Operations
|
||||
public:
|
||||
virtual void fn_vInitDialog (void);
|
||||
virtual void fn_vEdit (Link* poLink);
|
||||
BOOL fn_bIsEditLink (Link* poLink) { return m_poLink==poLink; }
|
||||
CString& fn_rGetTypeLink (void) { return m_szLinkName; }
|
||||
void fn_vChangeDialog (void);
|
||||
void fn_vSetDynParam (void);
|
||||
void fn_vDrawDynParamDialog (void);
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(DiaLink)
|
||||
public:
|
||||
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
||||
void OnDestroy();
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
virtual ~DiaLink();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(DiaLink)
|
||||
afx_msg void OnSelchangeLinkCombo();
|
||||
afx_msg void OnSelchangeLinkSpeedCombo();
|
||||
afx_msg void OnKillfocusLinkSpeed1Edit();
|
||||
afx_msg void OnKillfocusLinkSpeed2Edit();
|
||||
afx_msg void OnKillfocusLinkSpeed3Edit();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
260
Rayman_X/cpa/tempgrp/Owp/inc/ntwdia.hpp
Normal file
260
Rayman_X/cpa/tempgrp/Owp/inc/ntwdia.hpp
Normal file
@@ -0,0 +1,260 @@
|
||||
//ROMTEAM Networks (Gabriela Dumitrascu 25/02/98)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : ntwdia.hpp
|
||||
//
|
||||
// header file
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// inherit from : CFormView
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 1998-02-25 Author: CPA2 Gabriela Dumitrascu
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef NTWDIA_HPP
|
||||
#define NTWDIA_HPP
|
||||
|
||||
class NtwDia : public CFormView
|
||||
{
|
||||
public:
|
||||
NtwDia(CWnd* pParent = NULL); // standard constructor
|
||||
DECLARE_DYNCREATE(NtwDia)
|
||||
void fn_vInitDialog ( void ); // function to init the dialog
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(NtwDia)
|
||||
enum { IDD = IDD_GRAPH_DIALOG };
|
||||
CListBox m_ConnectList;
|
||||
CComboBox m_WPList;
|
||||
CComboBox m_GraphNameList;
|
||||
CString m_EditGraph;
|
||||
CButton m_Symetric;
|
||||
// Shaitan NewParam {
|
||||
// long m_lWeight;
|
||||
//End Shaitan NewParam }
|
||||
CString m_EditWP;
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
// Shaitan Correction {
|
||||
// enum {statusReady, statusNextWP, statusPreviousWP} m_status;
|
||||
// WP_tdHandleOfArc m_hSelArc;
|
||||
// CPA_List<CPA_SuperObject> ms_oListOfArrows; // list of all the arrow
|
||||
// End Shaitan Correction }
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void fn_vRefreshDialog();
|
||||
|
||||
// Shaitan Correction {
|
||||
//void fn_vRefreshGraphList(int iGraph = 0, int iNode = 0, int iArc = 0);
|
||||
//void fn_vRefreshWPList(int iGraph, int iNode = 0, int iArc = 0);
|
||||
//void fn_vRefreshConnectList(int iGraph, int iNode, int iArc = 0);
|
||||
|
||||
// BOOL fn_bSetCrtWaypoint(WayPoint* poWayPoint);
|
||||
// BOOL fn_bSetCrtConnection(class Connection* poConnection);
|
||||
// BOOL fn_bAddOrDeleteWaypoint(WayPoint* poWayPoint);
|
||||
|
||||
// CPA_SuperObject* fn_pCreateConnection(int iGraph, int iNode, int iArc);
|
||||
// void fn_vDestroyAllArrows();
|
||||
// void fn_vShowOutLinks ();
|
||||
// void fn_vShowInLinks ();
|
||||
// void fn_vShowAllLinks ();
|
||||
// void fn_vCancelDisplayLinks();
|
||||
// void fn_vDefineNextWP();
|
||||
// void fn_vDefinePreviousWP();
|
||||
// void fn_vDeleteConnection(class Connection* pConnection);
|
||||
// void fn_vMove ( MTH3D_tdstVector* pstTranslation = NULL);
|
||||
// void fn_vShowAllWP();
|
||||
// void fn_vDeleteWP();
|
||||
// End Shaitan Correction }
|
||||
|
||||
// Shaitan Correction {
|
||||
int GetIndexOfGraph (Graph *pGraph);
|
||||
int GetIndexOfNode (WayPoint *pNode);
|
||||
int GetIndexOfConnection (WayPoint *pDstNode);
|
||||
|
||||
void fn_vSelectGraph (Graph *pGraph);
|
||||
void fn_vSelectNode (Graph *pGraph, WayPoint *pNode);
|
||||
void fn_vSelectConnection (Graph *pGraph, WayPoint *pSrcWaypoint, WayPoint *pDstWaypoint);
|
||||
|
||||
void fn_vRefreshGraphList (Graph *pGraph);
|
||||
void fn_vRefreshNodeList (Graph *pGraph, WayPoint *pNode);
|
||||
void fn_vRefreshConnectList (Graph *pGraph, WayPoint *pSrcWaypoint, WayPoint *pDstWaypoint);
|
||||
//End Shaitan Correction }
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(NtwDia)
|
||||
public:
|
||||
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(NtwDia)
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnSelchangeGraphName();
|
||||
afx_msg void OnSelchangeNtwWp();
|
||||
// Shaitan Correction {
|
||||
afx_msg void OnDblClkNtwWp();
|
||||
afx_msg void OnChangeGraphName();
|
||||
//End Shaitan Correction }
|
||||
afx_msg void OnSelchangeConnectList();
|
||||
afx_msg void OnGraphInsert();
|
||||
afx_msg void OnGraphDelete();
|
||||
afx_msg void OnConnectDelete();
|
||||
afx_msg void OnConnectInsert();
|
||||
afx_msg void OnWpInsert();
|
||||
afx_msg void OnWpDelete();
|
||||
// Shaitan NewParam {
|
||||
afx_msg void OnEditNode();
|
||||
afx_msg void OnEditConnect();
|
||||
// afx_msg void OnDefaultWeight();
|
||||
afx_msg void OnDefaultAllWeights();
|
||||
afx_msg void OnEditAllConnects();
|
||||
// afx_msg void OnChangeWeight();
|
||||
// afx_msg void OnCapacity();
|
||||
//End Shaitan NewParam }
|
||||
afx_msg void OnDefault();
|
||||
// Shaitan Correction {
|
||||
afx_msg void OnSize(UINT, int, int);
|
||||
//End Shaitan Correction }
|
||||
afx_msg void OnSymetric();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
// Shaitan Correction {
|
||||
private:
|
||||
int m_iSelectedGraph;
|
||||
int m_iSelectedNode;
|
||||
int m_iSelectedConnection;
|
||||
BOOL m_bInitialised;
|
||||
//End Shaitan Correction }
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Shaitan Correction {
|
||||
class NtwCreationDialog : public CDialog
|
||||
{
|
||||
private:
|
||||
NtwDia *m_pParentDialog;
|
||||
Graph *m_pEditedGraph;
|
||||
|
||||
// Construction
|
||||
public:
|
||||
NtwCreationDialog(CString csDefaultName, NtwDia *pParentDialog, Graph *pGraph, CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(EdActors_ActorNameChangeDialog)
|
||||
enum { IDD = IDD_CREATION_DIALOG };
|
||||
CString m_csNewName;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(EdActors_ActorNameChangeDialog)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(EdActors_ActorNameChangeDialog)
|
||||
virtual void OnOK();
|
||||
afx_msg void OnDestroy();
|
||||
virtual BOOL OnInitDialog();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//End Shaitan Correction }
|
||||
|
||||
// Shaitan NewParam {
|
||||
class NtwParameterDialog : public CDialog
|
||||
{
|
||||
private:
|
||||
NtwDia *m_pParentDialog;
|
||||
Graph *m_pEditedGraph;
|
||||
WayPoint *m_pSrcNode;
|
||||
WayPoint *m_pDstNode;
|
||||
BOOL m_bEditConnection;
|
||||
BOOL m_bAll;
|
||||
BOOL m_bSymetric;
|
||||
|
||||
// Construction
|
||||
public:
|
||||
NtwParameterDialog(NtwDia *pParentDialog, Graph *pGraph, WayPoint *pSrcNode, WayPoint *pDstNode = NULL, BOOL bAll = FALSE, CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(EdActors_ActorNameChangeDialog)
|
||||
enum { IDD = IDD_GRAPH_PARAMETERS };
|
||||
CEdit m_cEditWeight;
|
||||
CStatic m_cStaticWeight;
|
||||
CButton m_cDefaultWeight;
|
||||
CStatic m_cStaticType;
|
||||
CButton m_cNextOK;
|
||||
CButton m_cPrevOK;
|
||||
CButton m_cNextCancel;
|
||||
CButton m_cPrevCancel;
|
||||
CButton m_cNextWPOK;
|
||||
CButton m_cPrevWPOK;
|
||||
CButton m_cNextWPCancel;
|
||||
CButton m_cPrevWPCancel;
|
||||
CStatic m_cStaticNode;
|
||||
CStatic m_cStaticLink;
|
||||
CButton m_cSymetric;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(EdActors_ActorNameChangeDialog)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
void fn_vInitParameters (void);
|
||||
void fn_vApplyModifications (void);
|
||||
void fn_vUpdateButtons (void);
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(EdActors_ActorNameChangeDialog)
|
||||
virtual void OnOK();
|
||||
afx_msg void OnPrevOK();
|
||||
afx_msg void OnNextOK();
|
||||
afx_msg void OnPrevCancel();
|
||||
afx_msg void OnNextCancel();
|
||||
afx_msg void OnPrevWPOK();
|
||||
afx_msg void OnNextWPOK();
|
||||
afx_msg void OnPrevWPCancel();
|
||||
afx_msg void OnNextWPCancel();
|
||||
afx_msg void OnDefaultWeight();
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnSymetric();
|
||||
virtual BOOL OnInitDialog();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//End Shaitan NewParam }
|
||||
|
||||
#endif
|
||||
|
||||
//ENDROMTEAM Networks (Gabriela Dumitrascu)
|
||||
|
106
Rayman_X/cpa/tempgrp/Owp/inc/rotdia.hpp
Normal file
106
Rayman_X/cpa/tempgrp/Owp/inc/rotdia.hpp
Normal file
@@ -0,0 +1,106 @@
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
#if !defined(AFX_ROTDIA_HPP__E2A06241_1F76_11D1_95C8_0060973153D4__INCLUDED_)
|
||||
#define AFX_ROTDIA_HPP__E2A06241_1F76_11D1_95C8_0060973153D4__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// rotdia.hpp : header file
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// RotationDia form view
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
|
||||
class Link;
|
||||
|
||||
class RotationDia : public CFormView
|
||||
{
|
||||
protected:
|
||||
Link* m_poLink;
|
||||
BOOL m_bFocusTwist1;
|
||||
BOOL m_bFocusTwist2;
|
||||
BOOL m_bFocusTwistLap;
|
||||
BOOL m_bFocusXLap;
|
||||
BOOL m_bFocusYLap;
|
||||
|
||||
RotationDia(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(RotationDia)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
void fn_vInitDialog ( void ); // jack's function to init the dialog
|
||||
void fn_vEdit (Link* poLink);
|
||||
|
||||
BOOL fn_bIsEditLink (Link* poLink) { return m_poLink==poLink; }
|
||||
|
||||
|
||||
|
||||
//{{AFX_DATA(RotationDia)
|
||||
enum { IDD = IDD_ORIENTATION_DIALOG };
|
||||
float m_fTwist1;
|
||||
float m_fTwist2;
|
||||
long m_lTwistLap;
|
||||
long m_lxLap;
|
||||
long m_lyLap;
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
|
||||
// Operations
|
||||
public:
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(RotationDia)
|
||||
public:
|
||||
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
virtual ~RotationDia();
|
||||
void fn_vActivateWindow (BOOL bActivate);
|
||||
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(RotationDia)
|
||||
afx_msg void OnKillfocusOrientLapTwistEdit();
|
||||
afx_msg void OnKillfocusOrientLapXEdit();
|
||||
afx_msg void OnKillfocusOrientLapYEdit();
|
||||
afx_msg void OnOrientTwistDirectRadio();
|
||||
afx_msg void OnOrientTwistIndirectRadio();
|
||||
afx_msg void OnOrientXDirectRadio();
|
||||
afx_msg void OnOrientXIndirectRadio();
|
||||
afx_msg void OnOrientYDirectRadio();
|
||||
afx_msg void OnOrientYIndirectRadio();
|
||||
afx_msg void OnKillfocusTwist1Edit();
|
||||
afx_msg void OnKillfocusTwist2Edit();
|
||||
afx_msg void OnSetfocusOrientLapTwistEdit();
|
||||
afx_msg void OnSetfocusOrientLapXEdit();
|
||||
afx_msg void OnSetfocusOrientLapYEdit();
|
||||
afx_msg void OnSetfocusTwist1Edit();
|
||||
afx_msg void OnSetfocusTwist2Edit();
|
||||
afx_msg void OnDestroy();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_ROTDIA_HPP__E2A06241_1F76_11D1_95C8_0060973153D4__INCLUDED_)
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
2
Rayman_X/cpa/tempgrp/Owp/inc/version.txt
Normal file
2
Rayman_X/cpa/tempgrp/Owp/inc/version.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Waypoint V3.4.4
|
||||
|
101
Rayman_X/cpa/tempgrp/Owp/inc/waydia.hpp
Normal file
101
Rayman_X/cpa/tempgrp/Owp/inc/waydia.hpp
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : WayDia.hpp
|
||||
//
|
||||
// Dialog edition the ways
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 21 jan 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
//ANNECY Shaitan Nettoyage (12/05/98) {
|
||||
/*
|
||||
|
||||
#ifndef __WayDia_HPP__
|
||||
#define __WayDia_HPP__
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DiaWay dialog
|
||||
|
||||
class DiaWay : public CFormView
|
||||
{
|
||||
protected :
|
||||
Way* m_pWayObj;
|
||||
int m_iSelect;
|
||||
BOOL m_bInsert;
|
||||
BOOL m_bDisableDelete;
|
||||
|
||||
// Construction
|
||||
public:
|
||||
DiaWay(CWnd* pParent = NULL); // standard constructor
|
||||
DECLARE_DYNCREATE (DiaWay);
|
||||
void fn_vInitDialog (void);
|
||||
void fn_vRefreshDialog (int iSelect=0);
|
||||
void fn_vRefreshLinkBox (void);
|
||||
void fn_vRefreshNameList (void);
|
||||
BOOL fn_vSelectWPInList (WayPoint* poWP);
|
||||
BOOL fn_vSelectWPInList (int iIndiceWP);
|
||||
void fn_vEdit (Way* poWay,int iSelect=0);
|
||||
Way* fn_pGetEditWay (void) { return m_pWayObj; }
|
||||
BOOL fn_bIsEdit (Way* poWay);
|
||||
void fn_vMessageBoxDynamicWP ( WayPoint* p_oWP );
|
||||
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(DiaWay)
|
||||
enum { IDD = IDD_WAY_DIALOG };
|
||||
CEdit m_oEditWayPointButton;
|
||||
CComboBox m_ListNameWP ;
|
||||
CString m_EditWay;
|
||||
CString m_csWayName;
|
||||
//}}AFX_DATA
|
||||
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(DiaWay)
|
||||
public:
|
||||
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
virtual void OnDestroy ();
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
protected :
|
||||
BOOL fn_bValidEntry (void);
|
||||
void fn_vEditName (void);
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(DiaWay)
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
afx_msg void OnDeleteWayButton();
|
||||
afx_msg void OnAddWayButton();
|
||||
afx_msg void OnSelchangeWayCombo();
|
||||
afx_msg void OnEditupdateWayCombo();
|
||||
afx_msg void OnClose();
|
||||
afx_msg void OnKillfocusWayNameEdit();
|
||||
afx_msg void OnDblclkWayCombo();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
BOOL fn_bSameNameSuit (void);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
//ENDANNECY Shaitan Nettoyage }
|
421
Rayman_X/cpa/tempgrp/Owp/inc/waypoint.h
Normal file
421
Rayman_X/cpa/tempgrp/Owp/inc/waypoint.h
Normal file
@@ -0,0 +1,421 @@
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
HEADER FILE FOR WP:
|
||||
WayPoint.h
|
||||
|
||||
Creation Date : January,1997
|
||||
Author : Jacques (Annecy)
|
||||
------------------------------------------------------------------------------------------
|
||||
Modifications :
|
||||
January 16,1997 Alb Many modification in all file to conform it with 3DOS
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
This file defines structures and functions used to manage waypoint and way
|
||||
in the engine
|
||||
------------------------------------------------------------------------------------------
|
||||
Remark :
|
||||
if _WAY_FirstLinkIsFirstWaypoint_ is defined, it is assumed that there is as much links as
|
||||
waypoints, first link describing how to go to the first waypoint, and so on
|
||||
if it is not defined, it is assumed that there is one more waypoint than links. First link
|
||||
describing how to go from the first WP to the second, and so on.
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
Invalidate one of the two following lines :
|
||||
*/
|
||||
//#define _WAY_FirstLinkIsFirstWaypoint_
|
||||
#undef _WAY_FirstLinkIsFirstWaypoint_
|
||||
|
||||
#if !defined(__WAYPOINT_TYPES__)
|
||||
#define __WAYPOINT_TYPES__
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
#define WAYPOINT_UNDEF
|
||||
#define ONLY_TYPES
|
||||
#endif /* !ONLY_TYPES */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
INCLUDE FILES :
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
Avoiding :
|
||||
error C2501: 'Do_not_use_extern_in_c_files' : missing decl-specifiers
|
||||
*/
|
||||
#ifdef extern
|
||||
#undef extern
|
||||
#endif
|
||||
#include "ACP_Base.h"
|
||||
#include "Hie.h"
|
||||
#include "mth.h"
|
||||
#include "Macros.h"
|
||||
#include "dynamic.h"
|
||||
#include "Bezier.h"
|
||||
#include "Circlway.h"
|
||||
|
||||
#if defined(WAYPOINT_UNDEF)
|
||||
#undef ONLY_TYPES
|
||||
#undef WAYPOINT_UNDEF
|
||||
#endif /* !WAYPOINT_UNDEF */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
TYPE DEFINITION :
|
||||
If enumerate :
|
||||
M_BeginDeclareEnumerate(<type>)
|
||||
M_EndDeclareEnumerate(<type>, <basic type>)
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
Structure defining WayPoint in the Game Engine :
|
||||
*/
|
||||
typedef struct tdst_WayPoint_
|
||||
{
|
||||
/* vertex defining the position of the waypoint */
|
||||
MTH3D_tdstVector m_stVertex;
|
||||
/* radius of the WP :*/
|
||||
MTH_tdxReal m_xRadius;
|
||||
/* Handle on the superobject owner of the WP (if NULL, WP = static) */
|
||||
HIE_tdxHandleToSuperObject m_hSuperObject;
|
||||
/* following field is used to determine when the object should be free */
|
||||
unsigned char m_ucUsedCount;
|
||||
} tdst_WayPoint;
|
||||
/* defining the handle type :*/
|
||||
typedef tdst_WayPoint* ACP_tdxHandleOfWaypoint;
|
||||
|
||||
/* following type defines the type of the connection */
|
||||
M_BeginDeclareEnumerate(ACP_tde_ucConnectionType_)
|
||||
ACP_ConnType_ucStaticLine,
|
||||
ACP_ConnType_ucDynamicLine,
|
||||
ACP_ConnType_ucBezier,
|
||||
ACP_ConnType_ucCircle,
|
||||
ACP_ConnType_ucInvalid,
|
||||
ACP_ConnType_ucNbrOfElement = ACP_ConnType_ucInvalid,
|
||||
M_EndDeclareEnumerate(ACP_tde_ucConnectionType,unsigned char)
|
||||
|
||||
/* The following enum describes the dynamic type of a connection :*/
|
||||
M_BeginDeclareEnumerate(ACP_tde_ucConnectionDynamicType_)
|
||||
ACP_ConDynType_ucNone,
|
||||
ACP_ConDynType_ucConstant,
|
||||
ACP_ConDynType_ucLinear,
|
||||
ACP_ConDynType_ucSinus,
|
||||
ACP_ConDynType_ucInvalid,
|
||||
ACP_ConDynType_ucNbrOfElement = ACP_ConDynType_ucInvalid
|
||||
M_EndDeclareEnumerate(ACP_tde_ucConnectionDynamicType,unsigned char)
|
||||
|
||||
/* defining a sampling rate type :*/
|
||||
typedef unsigned char tduc_SamplingRate;
|
||||
/*
|
||||
Structure defining a Link in the Game Engine :
|
||||
*/
|
||||
typedef struct tdst_Link_
|
||||
{
|
||||
/* Information depending on the type of the link :*/
|
||||
union
|
||||
{
|
||||
void *m_pvBuffer;/* to access the buffer without caring about the type */
|
||||
MTH3D_tdstVector *m_pstStaticVector;/* to access to the buffer for StaticLine type */
|
||||
tdstBezierObject *m_pstBezierObject;/* to access to the buffer for BezierObect type */
|
||||
//JT modify
|
||||
tdstCircleArcObject *m_pstCircleArcObject;/* to access to the buffer for ArcObject type */
|
||||
};
|
||||
|
||||
/* Information depending on the dynamic type of the link :*/
|
||||
ACP_tdstDynaParam m_stConnDynTypeInfo;
|
||||
|
||||
/* Defines the type of the link(linear,sinesuoidale,spline...) :*/
|
||||
ACP_tde_ucConnectionType m_eucConnectionType;
|
||||
/* defines the dynamic type (none, linear,sinus...)*/
|
||||
ACP_tde_ucConnectionDynamicType m_eucConnectionDynamicType;
|
||||
|
||||
/* Current sample index :*/
|
||||
unsigned char m_ucCurrentSample;
|
||||
|
||||
/* following member is used to determine when to erase the link :*/
|
||||
unsigned char m_ucUsedCount;
|
||||
} tdst_Link;
|
||||
/* defining the handle type :*/
|
||||
typedef tdst_Link* ACP_tdxHandleOfLink;
|
||||
|
||||
/*
|
||||
typedef for the index :
|
||||
*/
|
||||
typedef unsigned char tducWPIndex;
|
||||
/*
|
||||
This structure defines the type of the waypoint :
|
||||
*/
|
||||
typedef struct tdst_Way_
|
||||
{
|
||||
/* this field contains the speed the way is traveled through */
|
||||
/* MTH_tdxReal m_tdxSpeed; No more used since it is in the link, no?*/
|
||||
/* a dynamic array on handles on wp :*/
|
||||
ACP_tdxHandleOfWaypoint *m_d_hWayPoint;
|
||||
/* a dynamic array on handles on link :*/
|
||||
ACP_tdxHandleOfLink *m_d_hLink;
|
||||
/* The following member contains the size of the arrays */
|
||||
tducWPIndex m_ucSizeWay;
|
||||
/* contains an index on the array for the current wp :*/
|
||||
tducWPIndex m_ucCurrentWPIndex;
|
||||
/* following member is used to determine when to erase the way :*/
|
||||
unsigned char m_ucUsedCount;
|
||||
} tdst_Way;
|
||||
/* defining the handle type :*/
|
||||
typedef tdst_Way* ACP_tdxHandleOfWay;
|
||||
|
||||
// index : used in AI for Way in model
|
||||
typedef unsigned char tduc_WayIndex;
|
||||
|
||||
#endif /* !__WAYPOINT_TYPES__ */
|
||||
|
||||
#if !defined(ONLY_TYPES)
|
||||
|
||||
#if !defined(__WAYPOINT_VARS__)
|
||||
#define __WAYPOINT_VARS__
|
||||
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#if !defined(WP_GLOBALS)
|
||||
#define EXTERN extern
|
||||
#else /* !GLOBALS */
|
||||
#define EXTERN
|
||||
#endif /* !GLOBALS */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
VARIABLE DECLARATION :
|
||||
|
||||
<type> <variable name>
|
||||
#if defined(GLOBALS)
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-CONSTANT DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* define script section name :*/
|
||||
#define C_SectionWayPointDescription "WayPoint"
|
||||
#define C_SectionWayDescription "Way"
|
||||
|
||||
/* invalid handles :*/
|
||||
#define ACP_C_InvalidWayPointHandle ((ACP_tdxHandleOfWaypoint)NULL)
|
||||
#define ACP_C_InvalidWayHandle ((ACP_tdxHandleOfWay)NULL)
|
||||
#define ACP_C_InvalidLinkHandle ((ACP_tdxHandleOfLink)NULL)
|
||||
|
||||
|
||||
#undef extern
|
||||
#endif /* !__WAYPOINT_VARS__ */
|
||||
|
||||
#if !defined (__WAYPOINT_PROTOS__)
|
||||
#define __WAYPOINT_PROTOS__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
MACROS-FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
/* accessing to members of the structures :*/
|
||||
#define M_xGetWPRadius(_hWP)\
|
||||
(((ACP_tdxHandleOfWaypoint)(_hWP))->m_xRadius)
|
||||
#define M_hGetSuperObject(hWP)\
|
||||
(((ACP_tdxHandleOfWaypoint)(hWP))->m_hSuperObject)
|
||||
#define M_stGetVertex(hWP)\
|
||||
(((ACP_tdxHandleOfWaypoint)(hWP))->m_stVertex)
|
||||
// ANNECY AV {
|
||||
//#define M_ucGetWPUsedCount(hWP)\
|
||||
(((ACP_tdxHandleOfWaypoint)(hWP))->m_ucUsedCount)
|
||||
// END ANNECY AV }
|
||||
|
||||
#define M_eucGetLinkConnectionType(_hLink)\
|
||||
(((ACP_tdxHandleOfLink)(_hLink))->m_eucConnectionType)
|
||||
#define M_pvGetLinkConnTypeInfo(_hLink)\
|
||||
(((ACP_tdxHandleOfLink)(_hLink))->m_pvBuffer)
|
||||
#define M_stGetLinkConnTypeStaticVector(_hLink)\
|
||||
(((ACP_tdxHandleOfLink)(_hLink))->m_pstStaticVector)
|
||||
#define M_stGetLinkConnTypeBezierObject(_hLink)\
|
||||
(((ACP_tdxHandleOfLink)(_hLink))->m_pstBezierObject)
|
||||
|
||||
#define M_eucGetLinkConnectionDynType(_hLink)\
|
||||
(((ACP_tdxHandleOfLink)(_hLink))->m_eucConnectionDynamicType)
|
||||
#define M_stGetLinkConnDynTypeInfo(_hLink)\
|
||||
(((ACP_tdxHandleOfLink)(_hLink))->m_stConnDynTypeInfo)
|
||||
|
||||
#define M_ucGetLinkCurrentSample(_hLink)\
|
||||
(((ACP_tdxHandleOfLink)(_hLink))->m_ucCurrentSample)
|
||||
// ANNECY AV {
|
||||
//#define M_ucGetLinkUsedCount(_hLink)\
|
||||
(((ACP_tdxHandleOfLink)(_hLink))->m_ucUsedCount)
|
||||
// END ANNECY AV }
|
||||
|
||||
#define M_dhGetWayWPHandleArray(_hWay)\
|
||||
(((ACP_tdxHandleOfWay)(_hWay))->m_d_hWayPoint)
|
||||
#define M_dhGetWayLinkHandleArray(_hWay)\
|
||||
(((ACP_tdxHandleOfWay)(_hWay))->m_d_hLink)
|
||||
#define M_ucGetWaySizeWay(_hWay)\
|
||||
(((ACP_tdxHandleOfWay)(_hWay))->m_ucSizeWay)
|
||||
#define M_ucGetWayCurrentWPIndex(_hWay)\
|
||||
(((ACP_tdxHandleOfWay)(_hWay))->m_ucCurrentWPIndex)
|
||||
// ANNECY AV {
|
||||
//#define M_ucGetWayCurrentUsedCount(_hWay)\
|
||||
(((ACP_tdxHandleOfWay)(_hWay))->m_ucUsedCount)
|
||||
// END ANNECY AV }
|
||||
|
||||
#define M_hGetWPAtPositionWay(_hWay,_ucIndex)\
|
||||
(M_dhGetWayWPHandleArray(_hWay)[(_ucIndex)])
|
||||
#define M_hGetLinkAtPositionWay(_hWay,_ucIndex)\
|
||||
(M_dhGetWayLinkHandleArray(_hWay)[(_ucIndex)])
|
||||
|
||||
#define M_hGetWayCurrentWP(_hWay)\
|
||||
M_hGetWPAtPositionWay((_hWay),M_ucGetWayCurrentWPIndex(_hWay))
|
||||
#define M_ucWayNbrOfWP(_hWay)\
|
||||
M_ucGetWaySizeWay(_hWay)
|
||||
|
||||
#ifdef _WAY_FirstLinkIsFirstWaypoint_
|
||||
#define M_hGetWayCurrentLink(_hWay)\
|
||||
M_hGetLinkAtPositionWay((_hWay),M_ucGetWayCurrentWPIndex(_hWay))
|
||||
#define M_ucWayNbrOfLink(_hWay)\
|
||||
M_ucGetWaySizeWay(_hWay)
|
||||
#else /*_WAY_FirstLinkIsFirstWaypoint_*/
|
||||
#define M_hGetWayCurrentLink(_hWay)\
|
||||
M_hGetLinkAtPositionWay((_hWay),(unsigned char)(M_ucGetWayCurrentWPIndex(_hWay)-1))
|
||||
#define M_ucWayNbrOfLink(_hWay)\
|
||||
((unsigned char)(M_ucGetWaySizeWay(_hWay)-1))
|
||||
#endif /*_WAY_FirstLinkIsFirstWaypoint_*/
|
||||
|
||||
#define M_bWayIsLastWayPoint(_hWay,_ucPos)\
|
||||
(M_ucGetWaySizeWay(_hWay) == ((_ucPos)+1))
|
||||
#define M_bWayIsFirstWayPoint(_hWay)\
|
||||
(M_ucGetWayCurrentWPIndex(_hWay)==0)
|
||||
|
||||
#define M_bIsValidDynTypeLink(_eucConnDynType)\
|
||||
(((_eucConnDynType)>=ACP_ConDynType_ucNone)&&((_eucConnDynType)<ACP_ConDynType_ucInvalid))
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
//------------------------------------ Waypoints
|
||||
ACP_tdxHandleOfWaypoint fn_hConstructWaypoint(void);
|
||||
void fn_vDestroyWaypoint (ACP_tdxHandleOfWaypoint /*_hWP*/);
|
||||
ACP_tdxHandleOfWaypoint fn_hDuplicateWaypoint (ACP_tdxHandleOfWaypoint /*_hWP*/);
|
||||
void fn_vCopyWaypoint (ACP_tdxHandleOfWaypoint /*_hDestWP*/, ACP_tdxHandleOfWaypoint /*_hSrcWP*/);
|
||||
void fn_vInvalidateWaypoint(ACP_tdxHandleOfWaypoint* /*_hWP*/);
|
||||
ACP_tdxBool fn_bIsWaypointValid (ACP_tdxHandleOfWaypoint /*_hWP*/);
|
||||
ACP_tdxHandleOfWaypoint fn_hAddRefWaypoint(ACP_tdxHandleOfWaypoint /*_hWP*/);
|
||||
ACP_tdxHandleOfWaypoint fn_hReleaseWaypoint(ACP_tdxHandleOfWaypoint /*_hWP*/);
|
||||
|
||||
// set
|
||||
void fn_vSetRadiusWaypoint (ACP_tdxHandleOfWaypoint /*_hWP*/, MTH_tdxReal /*_xRadius*/);
|
||||
void fn_vSetVertexWaypoint (ACP_tdxHandleOfWaypoint /*_hWP*/, MTH3D_tdstVector* /*_stVertex*/);
|
||||
void fn_vSetSuperObjetWaypoint (ACP_tdxHandleOfWaypoint /*_hWP*/, HIE_tdxHandleToSuperObject /*_hSuperObject*/);
|
||||
// get
|
||||
void fn_vGetRadiusWaypoint (ACP_tdxHandleOfWaypoint /*_hWP*/, MTH_tdxReal* /*_pstRadius*/);
|
||||
void fn_vGetVertexWaypoint (ACP_tdxHandleOfWaypoint /*_hWP*/, MTH3D_tdstVector* /*_pstVertex*/);
|
||||
HIE_tdxHandleToSuperObject fn_pGetSuperObjetWaypoint (ACP_tdxHandleOfWaypoint /*_hWP*/);
|
||||
|
||||
// load
|
||||
SCRIPT_tdeReturnValue fn_eScriptCallBackLoadWaypoint(FILE * /*p_fFile*/, char * /*szAction*/, char ** /*szParams[]*/, SCRIPT_tdeAction /*cType*/);
|
||||
|
||||
ACP_tdxHandleOfWaypoint fn_hGetHWPLoaded(char * /*_szFileName*/, char* /*_p_szWPName*/);
|
||||
|
||||
// tools
|
||||
|
||||
void fn_vComputeLocationWaypoint ( ACP_tdxHandleOfWaypoint /*_hWP*/, MTH3D_tdstVector* /*_pstVertex*/);
|
||||
|
||||
//----------------------------------- Link
|
||||
ACP_tdxHandleOfLink fn_hConstructLink (void);
|
||||
void fn_vDestroyLink (ACP_tdxHandleOfLink /*_hLink*/);
|
||||
|
||||
//JT modify -> .c change
|
||||
ACP_tdxHandleOfLink fn_hDuplicateLink (ACP_tdxHandleOfLink /*_hLink*/);
|
||||
|
||||
//JT modify -> new function
|
||||
void fn_vCopyLink (ACP_tdxHandleOfLink /*_hDestLink*/, ACP_tdxHandleOfLink /*_hSrcLink*/);
|
||||
|
||||
void fn_vInvalidateLink (ACP_tdxHandleOfLink* /*_hLink*/);
|
||||
ACP_tdxBool fn_bIsLinkValid (ACP_tdxHandleOfLink /*_hLink*/);
|
||||
ACP_tdxHandleOfLink fn_hAddRefLink(ACP_tdxHandleOfLink /*_hWP*/);
|
||||
ACP_tdxHandleOfLink fn_hReleaseLink(ACP_tdxHandleOfLink /*_hWP*/);
|
||||
|
||||
void fn_vAllocLink (ACP_tdxHandleOfLink /*_hLink*/,ACP_tde_ucConnectionType /*_eucConnType*/,ACP_tde_ucConnectionDynamicType /*_eucConnDynType*/);
|
||||
void fn_vFreeLink (ACP_tdxHandleOfLink);
|
||||
|
||||
ACP_tde_ucConnectionType fn_eucGetConTypeLink(ACP_tdxHandleOfLink /*_hLink*/);
|
||||
ACP_tde_ucConnectionDynamicType fn_eucGetConDynTypeLink(ACP_tdxHandleOfLink /*_hLink*/);
|
||||
void *fn_pvGetLinkConTypeInfo(ACP_tdxHandleOfLink /*_hLink*/);
|
||||
|
||||
//JT modify -> create new
|
||||
void fn_vSetLinkConTypeInfo(ACP_tdxHandleOfLink /*_hLink*/, void* /*_pLinkConTypeInfo*/);
|
||||
|
||||
ACP_tdstDynaParam *fn_pvGetLinkConDynTypeInfo(ACP_tdxHandleOfLink /*_hLink*/);
|
||||
void fn_vSetConTypeLink(ACP_tdxHandleOfLink /*_hLink*/,ACP_tde_ucConnectionType /*_eucType*/);
|
||||
|
||||
void fn_vSetConDynTypeLink(ACP_tdxHandleOfLink /*_hLink*/,ACP_tde_ucConnectionDynamicType /*eucType*/);
|
||||
void fn_vBuildLinkFromszParams(ACP_tdxHandleOfLink /*hLink*/, char ** /*szParams*/,ACP_tdxHandleOfWaypoint /*_hWayPointBefore*/, ACP_tdxHandleOfWaypoint /*_hWayPointAfter*/ );
|
||||
|
||||
//-------------------------------- Way
|
||||
ACP_tdxHandleOfWay fn_hConstructWay (void);
|
||||
void fn_vDestroyWay (ACP_tdxHandleOfWay /*_hWay*/);
|
||||
ACP_tdxHandleOfWay fn_hDuplicateWay (ACP_tdxHandleOfWay /*_hWay*/);
|
||||
void fn_vCopyWay (ACP_tdxHandleOfWay /*_hWayDst*/, ACP_tdxHandleOfWay /*_hWaySrc*/);
|
||||
void fn_vInvalidateWay(ACP_tdxHandleOfWay* /*_hWay*/);
|
||||
ACP_tdxBool fn_bIsWayValid (ACP_tdxHandleOfWay /*_hWay*/);
|
||||
void fn_vInitWay (ACP_tdxHandleOfWay /*__hWay*/);
|
||||
ACP_tdxHandleOfWay fn_hAddRefWay(ACP_tdxHandleOfWay /*_hWay*/);
|
||||
ACP_tdxHandleOfWay fn_hReleaseWay(ACP_tdxHandleOfWay /*_hWay*/);
|
||||
|
||||
// manipulate
|
||||
void fn_vAllocWay (ACP_tdxHandleOfWay /*_hWay*/, tducWPIndex/*_ucSizeWay*/);
|
||||
void fn_vFreeWay (ACP_tdxHandleOfWay /*_hWay*/);
|
||||
void fn_vReallocWay (ACP_tdxHandleOfWay /*_hWay*/, tducWPIndex/*_ucNewSizeWay*/);
|
||||
|
||||
//JT modify
|
||||
void fn_vInsertWayPoint (ACP_tdxHandleOfWay /*_hWay*/, ACP_tdxHandleOfWaypoint /*_hWP*/, ACP_tdxHandleOfLink /*_hLinkBefore*/, ACP_tdxHandleOfLink /*_hLinkAfter*/, tducWPIndex /*_ucPosWP*/);
|
||||
//JT modify
|
||||
void fn_vDeleteWayPoint (ACP_tdxHandleOfWay /*hWay*/, tducWPIndex /*_ucPosWP*/, ACP_tdxHandleOfLink /*_hNewLink*/);
|
||||
|
||||
// set
|
||||
void fn_vSetCurrentWPWay(ACP_tdxHandleOfWay,tducWPIndex);
|
||||
|
||||
// get
|
||||
tducWPIndex fn_ucGetSizeWay (ACP_tdxHandleOfWay /*hWay*/);
|
||||
ACP_tdxHandleOfWaypoint fn_hGetWayPoint (ACP_tdxHandleOfWay /*hWay*/, tducWPIndex /*_ucPos*/);
|
||||
ACP_tdxHandleOfLink fn_hGetLink (ACP_tdxHandleOfWay /*hWay*/, tducWPIndex /*ucPos*/);
|
||||
|
||||
tducWPIndex fn_ucPositionWayPoint (ACP_tdxHandleOfWay /*hWay*/, ACP_tdxHandleOfWaypoint /*hWP*/);
|
||||
ACP_tdxHandleOfWaypoint fn_hNextWayPoint(ACP_tdxHandleOfWay /*hWay*/);
|
||||
ACP_tdxHandleOfWaypoint fn_hPrevWayPoint (ACP_tdxHandleOfWay /*hWay*/);
|
||||
ACP_tdxHandleOfWaypoint fn_hCurrentWayPoint (ACP_tdxHandleOfWay /*hWay*/);
|
||||
|
||||
// load
|
||||
SCRIPT_tdeReturnValue fn_eScriptCallBackLoadWay(FILE * /*p_fFile*/, char * /*szAction*/, char * /*szParams*/[], SCRIPT_tdeAction /*cType*/);
|
||||
|
||||
/* Tools :*/
|
||||
/* function called when action FollowWay is initialised :*/
|
||||
void fnv_InitWayBeforeFollowing(HIE_tdxHandleToSuperObject /*_p_SuperObjPerso*/,ACP_tdxHandleOfWay /*_hWay*/);
|
||||
/* function called when the specific vertex has been reached */
|
||||
unsigned char fn_ucCurrentVertexReachedWhileFollowingWay(HIE_tdxHandleToSuperObject /*_p_SuperObjPerso*/,ACP_tdxHandleOfWay /* _hWay */);
|
||||
/* function called to get the speed : */
|
||||
MTH_tdxReal fn_tdxGetSpeedWay(HIE_tdxHandleToSuperObject /*_p_SuperObjPerso*/,ACP_tdxHandleOfWay /*_hWay*/);
|
||||
/* function called to get the vertex to reach */
|
||||
void fn_vGetNextPointWay(HIE_tdxHandleToSuperObject /*_p_SuperobjPerso*/,ACP_tdxHandleOfWay /*_hWay*/,MTH3D_tdstVector* /*_stVertex*/,MTH_tdxReal* /*_p_stMinDist*/);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* !__WAYPOINT_PROTOS__ */
|
||||
|
||||
#endif /* !ONLY_TYPES */
|
26
Rayman_X/cpa/tempgrp/Owp/inc/wp_edit.hpp
Normal file
26
Rayman_X/cpa/tempgrp/Owp/inc/wp_edit.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : wp_edit.hpp
|
||||
//
|
||||
// Include to use wp_edi
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation date: 9 apr 1997 Author: J Th<54>noz
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification date: Author:
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
#ifndef wp_edit_def
|
||||
#define wp_edit_def
|
||||
|
||||
|
||||
#include "ai_handl.h"
|
||||
#include "dnm.h"
|
||||
#include "gam.h"
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user