Add publish

This commit is contained in:
ninja
2025-12-15 22:10:55 +08:00
parent 2b56cf87a8
commit c06fe95a1e
285 changed files with 69398 additions and 1 deletions

View File

@@ -0,0 +1,103 @@
/***********************************************************************************************************************
*
* Copyright (c) 2010 - 2022 by Tech Soft 3D, Inc.
* The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., and considered a trade secret
* as defined under civil and criminal statutes. Tech Soft 3D shall pursue its civil and criminal remedies in the event
* of unauthorized use or misappropriation of its trade secrets. Use of this information by anyone other than authorized
* employees of Tech Soft 3D, Inc. is granted only under a written non-disclosure agreement, expressly prescribing the
* scope and manner of such use.
*
***********************************************************************************************************************/
/**
\file AnimDefStep3.cpp
Animation for Step 3
***********************************************************************************************************************/
// Do not define INITIALIZE_A3D_API here. It should be only included once in a project.
#include "AnimDef.hpp"
//######################################################################################################################
/*
Orbit back to the front of the micro engine
Pause 1 second.
Flash the color of the mini-housing to yellow three times over one second.
Pause 0.5 seconds and then remove the mini housing unit.
*/
A3DStatus BuildAnimationStep3(A3DPDFAnimation **ppAnim,
double dStepInitTimeOffset,
double& dStepTimeDuration)
{
A3DStatus iRet = A3D_SUCCESS;
// ANIMATION = set of MOTIONS
const int INBMOTIONS = 20;
A3DPDFAnimMotion** ppMotion;
ppMotion = (A3DPDFAnimMotion**) malloc(INBMOTIONS * A3DUns32(sizeof(A3DPDFAnimMotion*)));
int idxMotion = 0;
double dInitTimeOffset = dStepInitTimeOffset;
double dTimeDuration;
// MOTIONS to specify init state
CreateMotionsInitState(ppMotion, idxMotion, 3,
dInitTimeOffset,
dTimeDuration);
dInitTimeOffset += dTimeDuration;
// MOTION CAMERA
CreateMotionCameraInit(ppMotion, idxMotion,
-1153.480469, -337.387329, 307.219879,
47.379890, 29.873722, -48.658806,
0.254603, 0.099596, 0.961904,
10, kA3DPDFOrthographicMode, 1.0/(2*160),
143.727493, -160.918030, -101.847794,
44.578068, 19.042654, -51.351418,
0.875282, 0.410491, 0.255690,
10, kA3DPDFOrthographicMode, 1.0/(2*59),
dInitTimeOffset,
dTimeDuration);
dInitTimeOffset += dTimeDuration;
// MOTION 1
// Flash the color of mini-housing to yellow three times over one second.
CreateMotionFlash(ppMotion, idxMotion,
ppTargetsCarbu, idxTargetsCarbu,
128.0/255.0, 255.0/255.0, 255.0/255.0, // color init
1, 1, 0, // color blink
kA3DPDFRenderingSolid,
dInitTimeOffset,
dTimeDuration);
dInitTimeOffset += dTimeDuration;
// MOTION 2
// Pause 0.5 seconds and then remove the mini housing unit.
dInitTimeOffset += PAUSEDEMISEC;
CreateMotionMoveAndHide(ppMotion, idxMotion,
ppTargetsCarbu, idxTargetsCarbu,
0.0, 0.0, 0.0, // init pos
0.0, 0.0, -40.0, // translation to apply
128.0/255.0, 255.0/255.0, 255.0/255.0, // color init
true, //bHide
kA3DPDFRenderingSolid,
dInitTimeOffset,
dTimeDuration);
dInitTimeOffset += dTimeDuration;
dStepTimeDuration = dInitTimeOffset - dStepInitTimeOffset;
// --- ANIMATION CREATION
A3DPDFAnimationData sAnimationData;
A3D_INITIALIZE_DATA(A3DPDFAnimationData, sAnimationData);
sAnimationData.m_pcName = const_cast<A3DUTF8Char*>("step3");
sAnimationData.m_iFramesPerSecond = 20;
sAnimationData.m_iNumAnimationMotions = idxMotion;
sAnimationData.m_ppAnimationMotions = ppMotion;
iRet = A3DPDFAnimationCreate(&sAnimationData, ppAnim);
return iRet;
}