185 lines
7.8 KiB
C
185 lines
7.8 KiB
C
/*
|
|
**************************************************************************************************
|
|
**************************************************************************************************
|
|
**************************************************************************************************
|
|
**************************************************************************************************
|
|
*/
|
|
#define D_CineInfo_StructureDefine
|
|
#include "AIUseCPA.h"
|
|
|
|
#include "specif/AIOption.h"
|
|
#include "AIMacros.h"
|
|
#include "AI_Erm.h"
|
|
|
|
#include "Intell.h"
|
|
#include "StrIntel.h"
|
|
#include "AI_Struc.h"
|
|
#include "EnumCond.h"
|
|
|
|
#include "Operator.h"
|
|
|
|
#include "Convert.h"
|
|
|
|
#include "CAM_Base.h"
|
|
#include "CAM_Tool.h"
|
|
#include "CAM_Vis.h"
|
|
|
|
/*
|
|
*=================================================================================================
|
|
* Is ... ?
|
|
*=================================================================================================
|
|
*/
|
|
|
|
tdstNodeInterpret *CAM_fn_p_stIs(HIE_tdxHandleToSuperObject p_SuperObjPerso, tdstNodeInterpret *p_stTree, long *p_lValue)
|
|
{
|
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
|
HIE_tdxHandleToSuperObject hCamera;
|
|
MS_tdxHandleToCineinfo hCineInfo;
|
|
MS_tdxHandleToInternalCineinfo hIntCineInfo;
|
|
tdstGetSetParam stValue;
|
|
long lCurrentValue;
|
|
long lViewport;
|
|
enum tdeCondId_ eCondId = M_eCondIdInterpret(p_stTree-1);
|
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
|
|
|
/********************************************************************************/
|
|
/* BEWARE THE ULTRA OPERATOR : Must be at the beginning and respect this syntax */
|
|
/********************************************************************************/
|
|
fn_vGetUltraOperatorPerso(fn_ucGetConditionUltraOperator(eCondId),p_SuperObjPerso,&hCamera);
|
|
/********************************************************************************/
|
|
|
|
hCineInfo = M_GetMSHandle(hCamera, Cineinfo);
|
|
#if defined(__DEBUG_AI__)
|
|
if (hCineInfo == NULL)
|
|
M_AIFatalError(E_uwAIFatalNotMSCamera);
|
|
#endif
|
|
|
|
M_EvalNextParameter(&stValue);
|
|
lCurrentValue = M_GetSetParam_lValue(&stValue);
|
|
|
|
if (lCurrentValue == 1)
|
|
{
|
|
if (hCineInfo->ucVolIAFlags & C_VolIAFlags_CurrentAlreadyCopiedInWork)
|
|
{
|
|
hIntCineInfo = hCineInfo->hWork;
|
|
}
|
|
else
|
|
{
|
|
hIntCineInfo = hCineInfo->hCurrent;
|
|
}
|
|
}
|
|
else if(lCurrentValue == -1)
|
|
{
|
|
hIntCineInfo = hCineInfo->hInit;
|
|
}
|
|
else
|
|
{
|
|
if (hCineInfo->ucPerIAFlags & C_PerIAFlags_VisibilityCopied)
|
|
hIntCineInfo = hCineInfo->hVisibility;
|
|
else
|
|
hIntCineInfo = hCineInfo->hCurrent;
|
|
}
|
|
|
|
switch (eCondId)
|
|
{
|
|
#if !defined(_AI_EXCLUDE_NEVER_USED_) /* MT {*/
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsActive :
|
|
*p_lValue=(long) hIntCineInfo->bIsActive;
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsViewportOwner :
|
|
M_EvalNextParameter(&stValue);
|
|
lViewport = M_GetSetParam_lValue(&stValue);
|
|
*p_lValue=(long) (lViewport == (long) hIntCineInfo->eTypeOfViewport);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoDynamicTarget :
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_NoDynamicTarget);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoAverageMoveTgtPerso:
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_NoAverageMoveTgtPerso);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoParseCutAngle :
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_NoParseCutAngle);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoVisibility :
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_NoVisibility);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoVisibilityWithDynHie :
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_NoVisibilityWithDynHie);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoDynChangeTheta :
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_NoDynChangeTheta);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoShiftUntilPosReached:
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_NoShiftUntilPosReached);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoDynSpeed:
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_NoDynSpeed);
|
|
return(p_stTree);
|
|
|
|
/*---------------------------------------------------------------------------------------*/
|
|
/*---------------------------------------------------------------------------------------*/
|
|
|
|
case eCond_Cam_IsFlagNoLinearParsing :
|
|
*p_lValue=(long) (hIntCineInfo->uwDNMFlags & DNM_CAM_C_NoLinearParsing);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoLinearInertia :
|
|
*p_lValue=(long) (hIntCineInfo->uwDNMFlags & DNM_CAM_C_NoLinearInertia);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoAngularParsing :
|
|
*p_lValue=(long) (hIntCineInfo->uwDNMFlags & DNM_CAM_C_NoAngularParsing);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoAngularInertia :
|
|
*p_lValue=(long) (hIntCineInfo->uwDNMFlags & DNM_CAM_C_NoAngularInertia);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoTargetParsing :
|
|
*p_lValue=(long) (hIntCineInfo->uwDNMFlags & DNM_CAM_C_NoTargetParsing);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoTargetInertia :
|
|
*p_lValue=(long) (hIntCineInfo->uwDNMFlags & DNM_CAM_C_NoTargetInertia);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagNoObstacle:
|
|
*p_lValue=(long) (hIntCineInfo->uwDNMFlags & DNM_CAM_C_NoObstacle);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagFixedOrientation :
|
|
*p_lValue=(long) (hIntCineInfo->uwDNMFlags & DNM_CAM_C_FixedOrientation);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagForcedTarget:
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_TargetIsAlreadyComputed);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
case eCond_Cam_IsFlagForcedAxis:
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_RefAxisIsAlreadyComputed);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
#endif /* _AI_EXCLUDE_NEVER_USED_ }*/
|
|
|
|
case eCond_Cam_IsFlagForcedPosition:
|
|
*p_lValue=(long) (hIntCineInfo->uwIAFlags & C_IAFlags_PositionIsAlreadyComputed);
|
|
return(p_stTree);
|
|
/*---------------------------------------------------------------------------------------*/
|
|
default:
|
|
break;
|
|
}
|
|
|
|
M_AIFatalError(E_uwAIFatalNotValidCondition);
|
|
return p_stTree;
|
|
}
|