Add rayman2 source files
303
Rayman_X/cpa/tempgrp/T3D/T3D.DSP
Normal file
@@ -0,0 +1,303 @@
|
||||
# Microsoft Developer Studio Project File - Name="T3D" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=T3D - Win32 Debug Glide with Editors
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "T3d.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "T3d.mak" CFG="T3D - Win32 Debug Glide with Editors"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "T3D - Win32 Debug with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "T3D - Win32 Debug Glide with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""$/CPA/TempGrp/T3D", HADAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "T3D - Win32 Debug with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug with Editors"
|
||||
# PROP BASE Intermediate_Dir "Debug with Editors"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "x:\CPA\EXE\GAM\EDT_Data\Tools"
|
||||
# PROP Intermediate_Dir "Tmp\T3DP5Evd"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "inc" /I "X:\CPA\Public" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\T3DP5Evd.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "T3D - Win32 Debug Glide with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug Glide with Editors"
|
||||
# PROP BASE Intermediate_Dir "Debug Glide with Editors"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "x:\CPA\EXE\main\EDT_Data\Tools"
|
||||
# PROP Intermediate_Dir "Tmp\T3DDFEvd"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "X:\CPA\Public" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Z7 /Od /I "inc" /I "X:\CPA\Public" /I "t:\dxsdk\sdk\inc" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /YX /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o"Tmp\TEDDFEvd\T3d.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /pdb:"x:\CPA\EXE\GAMEDT_Data\Tools\T3DP5Evd.pdb" /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\T3DP5Evd.dll" /pdbtype:sept
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"X:\CPA\EXE\Main\EDT_Data\Tools\T3DDFEvd.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "T3D - Win32 Debug with Editors"
|
||||
# Name "T3D - Win32 Debug Glide with Editors"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "*.c *.cpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\_T3d.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\animview.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\CPA_Grid.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\DlgVwCt.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\dllcom.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\StdAfx.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\T3DFrame.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\T3DFRMBs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\T3Dinterf.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\T3DWorld.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "*.h *.hpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\animview.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\CPA_Grid.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\DlgVwCt.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\StdAfx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\T3d_Res.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\T3DFrame.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\T3DFRMBs.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\T3Dinterf.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\T3DWorld.hpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter "*.rc *.bmp *.ico"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\edit_noo.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\edit_sup.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\EDTeNOb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\EDTeSOb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\EDTnNOb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\EDTnSOb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\EDTpeNOb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\EDTpeSOb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\EDTpnNOb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\EDTpnSOb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\forward.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\noedit_n.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\noedit_s.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\pedit_no.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\pedit_su.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\play.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\pnoedit_.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\pnoedsup.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\reverse.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\rewind.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\stop.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inc\T3d.rc
|
||||
|
||||
!IF "$(CFG)" == "T3D - Win32 Debug with Editors"
|
||||
|
||||
!ELSEIF "$(CFG)" == "T3D - Win32 Debug Glide with Editors"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Other Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\doc\news.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\exe\main\edt_data\Tools\T3D\T3DKeys.ini
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "libs debug"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=X:\Cpa\Exe\Main\MaiDFEvd.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\exe\main\edt_data\objects\OAcDFEvd.lib
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
459
Rayman_X/cpa/tempgrp/T3D/T3D.vcproj
Normal file
@@ -0,0 +1,459 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="T3D"
|
||||
ProjectGUID="{B2F3369A-36D9-4310-A661-7677311436F6}"
|
||||
SccProjectName=""$/CPA/TempGrp/T3D", HADAAAAA"
|
||||
SccAuxPath=""
|
||||
SccLocalPath="."
|
||||
SccProvider="MSSCCI:NXN alienbrain"
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug Glide with Editors|Win32"
|
||||
OutputDirectory="x:\CPA\EXE\main\EDT_Data\Tools"
|
||||
IntermediateDirectory=".\Tmp\T3DDFEvd"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="inc,X:\CPA\Public,t:\dxsdk\sdk\inc"
|
||||
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Tmp\T3DDFEvd/T3D.pch"
|
||||
AssemblerListingLocation=".\Tmp\T3DDFEvd/"
|
||||
ObjectFile=".\Tmp\T3DDFEvd/"
|
||||
ProgramDataBaseFileName=".\Tmp\T3DDFEvd/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="maidfevd.lib oacdfevd.lib"
|
||||
OutputFile="X:\CPA\EXE\Main\EDT_Data\Tools\T3DDFEvd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="X:\cpa\exe\main\edt_data\objects;X:\cpa\exe\main\edt_data;X:\cpa\exe\main;X:\cpa\libd"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile=".\src\_T3d.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="x:\CPA\EXE\main\EDT_Data\Tools/T3DDFEvd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="x:\CPA\EXE\main\EDT_Data\Tools/T3DDFEvd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="x:\CPA\EXE\main\EDT_Data\Tools/T3D.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug with Editors|Win32"
|
||||
OutputDirectory="x:\CPA\EXE\GAM\EDT_Data\Tools"
|
||||
IntermediateDirectory=".\Tmp\T3DP5Evd"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="inc,X:\CPA\Public"
|
||||
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Tmp\T3DP5Evd/T3D.pch"
|
||||
AssemblerListingLocation=".\Tmp\T3DP5Evd/"
|
||||
ObjectFile=".\Tmp\T3DP5Evd/"
|
||||
ProgramDataBaseFileName=".\Tmp\T3DP5Evd/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="X:\CPA\libd\GAMP5Evd.lib"
|
||||
OutputFile="X:\CPA\EXE\GAM\EDT_Data\Tools\T3DP5Evd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\src\_T3d.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="x:\CPA\EXE\GAM\EDT_Data\Tools/T3DP5Evd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="x:\CPA\EXE\GAM\EDT_Data\Tools/T3DP5Evd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="x:\CPA\EXE\GAM\EDT_Data\Tools/T3D.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="*.c *.cpp">
|
||||
<File
|
||||
RelativePath="src\_T3d.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\animview.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\CPA_Grid.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\DlgVwCt.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\dllcom.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\StdAfx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\T3DFrame.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\T3DFRMBs.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\T3Dinterf.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\T3DWorld.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="*.h *.hpp">
|
||||
<File
|
||||
RelativePath="inc\animview.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\CPA_Grid.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\DlgVwCt.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\StdAfx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\T3d_Res.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\T3DFrame.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\T3DFRMBs.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\T3Dinterf.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\T3DWorld.hpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resources"
|
||||
Filter="*.rc *.bmp *.ico">
|
||||
<File
|
||||
RelativePath="inc\edit_noo.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\edit_sup.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\EDTeNOb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\EDTeSOb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\EDTnNOb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\EDTnSOb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\EDTpeNOb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\EDTpeSOb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\EDTpnNOb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\EDTpnSOb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\forward.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\noedit_n.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\noedit_s.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\pedit_no.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\pedit_su.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\play.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\pnoedit_.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\pnoedsup.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\reverse.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\rewind.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\stop.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="inc\T3d.rc">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="inc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="inc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Other Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="doc\news.txt">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\exe\main\edt_data\Tools\T3D\T3DKeys.ini">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
BIN
Rayman_X/cpa/tempgrp/T3D/Tmp/T3DDFEvd/T3d.res
Normal file
130
Rayman_X/cpa/tempgrp/T3D/doc/Help/T3D.rtf
Normal file
@@ -0,0 +1,130 @@
|
||||
{\rtf1\ansi \deff4\deflang1033{\fonttbl{\f1\froman\fcharset2\fprq2 Symbol;}{\f4\froman\fcharset0\fprq2 Times New Roman;}{\f5\fswiss\fcharset0\fprq2 Arial;}{\f27\fnil\fcharset2\fprq2 Wingdings;}
|
||||
{\f43\fswiss\fcharset0\fprq2 Arial Black;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;
|
||||
\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\widctlpar \f4\fs20\lang1036 \snext0 Normal;}{\*\cs10 \additive
|
||||
Default Paragraph Font;}{\*\cs15 \additive\i\f4\cf6 Italique Rouge;}{\s16\sb120\sa120\widctlpar \b\scaps\f43\fs48\expnd4\expndtw20\cf6\lang1036 \sbasedon0\snext16 Titre g\'e9n\'e9ral;}{\s17\sb120\sa120\keepn\widctlpar
|
||||
\b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \sbasedon0\snext17 Titre Page;}{\s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 \sbasedon0\snext18 Puce ronde;}{\s19\widctlpar \f4\fs20\lang1036 \sbasedon0\snext19 footnote text;}{\*\cs20 \additive\super
|
||||
\sbasedon10 footnote reference;}{\*\cs21 \additive\b\f5\fs20 \sbasedon10 R\'e9f\'e9rence;}{\s22\sb240\sa120\widctlpar \b\f4\ul\lang1036 \sbasedon0\snext0 Sous Titre Page;}}{\info{\author Marc TRABUCATO}{\operator Marc TRABUCATO}
|
||||
{\creatim\yr1997\mo3\dy17\hr16\min28}{\revtim\yr1997\mo4\dy7\hr10\min41}{\version3}{\edmins11}{\nofpages12}{\nofwords801}{\nofchars4571}{\*\company UBI SOFT}{\vern57443}}\paperw11906\paperh16838\margl1417\margr1417\margt1417\margb1417
|
||||
\deftab708\widowctrl\ftnbj\aenddoc\hyphhotz425\hyphcaps0\formshade \fet0{\*\template C:\\MSOffice\\Modeles\\Help.dot}\sectd \linex0\headery709\footery709\colsx709\endnhere {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2
|
||||
\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6
|
||||
\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
|
||||
{\pntxtb (}{\pntxta )}}\pard\plain \s16\sb120\sa120\keepn\widctlpar \b\scaps\f43\fs48\expnd4\expndtw20\cf6\lang1036 {\cs20\super K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super K} Pr\'e9sentation}#{\footnote \pard\plain
|
||||
\s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_PRESENTATION}+{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super +} PAGE_000}} \{bml UbiLogo.bmp\} La DLL Tool3D{\uld
|
||||
\par }\pard\plain \keepn\widctlpar \f4\fs20\lang1036 {\uld Auteur}{\v ID_AUTEUR}
|
||||
\par \pard \widctlpar
|
||||
\par Cette DLL regroupe plusieurs outils permettant d\rquote obtenir des affichages diff\'e9rents de celui du monde global utilis\'e9 par d\'e9faut.
|
||||
\par Elle est en fait constitu\'e9e des outils suivants\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} l\rquote affichage d\rquote {\uldb un acteur seul}{\v ID_MODE_ACTEUR} (hors du monde),
|
||||
\par {\b\f27\cf2 \'fc} l\rquote affichage des {\uldb modules d\rquote un acteur}{\v ID_MODE_GRILLE} dans une grille,
|
||||
\par {\b\f27\cf2 \'fc} l\rquote affichage d\rquote un {\uldb module graphique seul}{\v ID_MODE_MODULE} (hors du monde ),
|
||||
\par {\b\f27\cf2 \'fc} un {\uldb Viewer}{\v ID_MODE_VIEWER} permettant de regrouper sur un m\'eame affichage des \'e9l\'e9ments quelconques du monde.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par {\b\fs24\ul\cf12 {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 12}{\fldrslt\f1\fs24}}}{\b\fs24\ul\cf12 Remarques importantes\~:}{\fs24
|
||||
\par }{\b\fs28 1 )} Dans chacun de ces modes, vous pouvez seulement modifier les objets\~, mais pas leurs positions respectives.
|
||||
\par En fait, aucune modification sur la hi\'e9rarachie des objets ( et donc leurs positions respectives ) n\rquote est prise en compte dans ces modes.
|
||||
\par {\b\fs28 2 )} Il est possible, lorsqu\rquote on dans l\rquote un des modes de la DLL, de passer dans un autre mode \'e0 l\rquote aide du menu \ldblquote \~{\cs21\b\f5 Tools}\~\rdblquote . Par contre, lorsqu\rquote
|
||||
on quitte un mode en cliquant sur son nom dans le menu \ldblquote \~{\cs21\b\f5 Tools}\~\rdblquote , on retourne au mode g\'e9n\'e9ral \ldblquote \~{\cs21\b\f5 World View\~}\rdblquote , et non pas au mode pr\'e9c\'e9dent (les modes ne s\rquote
|
||||
empilent pas).
|
||||
\par \pard\plain \s17\sb120\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_MODE_ACTEUR}K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {
|
||||
\cs20\super K} Affichage, d\rquote un acteur seul}+{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super +} PAGE_010}} L\rquote affichage d\rquote un acteur
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Ce mode d\rquote affichage permet de visualiser un acteur dans une vue o\'f9 il est seul, hors du monde du jeu.
|
||||
\par Il est activ\'e9 par l\rquote entr\'e9e \ldblquote \~{\cs21\b\f5 Tools \\ Character View}\~\rdblquote du menu principal, dans le cas o\'f9 la s\'e9lection se r\'e9sume seulement \'e0 un acteur.
|
||||
\par
|
||||
\par Dans ce mode, il est impossible\~de :
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} modifier les positions relatives des modules graphiques de l\rquote acteur,
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Par contre, il est possible de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} cr\'e9er, modifier et supprimer des zones globales de l\rquote acteur,
|
||||
\par {\b\f27\cf2 \'fc} d\'e9former et d\'e9placer ces zones.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \pard\plain \s17\sb120\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_MODE_GRILLE}K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {
|
||||
\cs20\super K} Affichage, des modules d\rquote un acteur}+{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super +} PAGE_020}} L\rquote affichage des modules d\rquote un acteur dans une grille
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Ce mode d\rquote affichage permet de voir un acteur en mode \ldblquote \~\'e9clat\'e9\~\rdblquote dans une grille, \'e0 raison d\rquote un module par case de la grille.
|
||||
\par Il est activ\'e9 par l\rquote entr\'e9e \ldblquote \~{\cs21\b\f5 Tools \\ Modules Grid View}\~\rdblquote du menu principal, dans le cas o\'f9 la s\'e9lection se r\'e9sume seulement \'e0 un acteur.
|
||||
\par
|
||||
\par Dans ce mode, il est impossible\~de :
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} modifier les positions relatives des modules graphiques de l\rquote acteur,
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Par contre, il est possible de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} d\'e9former un objet,
|
||||
\par {\b\f27\cf2 \'fc} cr\'e9er, modifier et supprimer des zones globales de l\rquote acteur,
|
||||
\par {\b\f27\cf2 \'fc} d\'e9former et d\'e9placer ces zones.
|
||||
\par \pard\plain \s17\sb120\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_MODE_MODULE}K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {
|
||||
\cs20\super K} Affichage, d\rquote un module seul}+{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super +} PAGE_030}} L\rquote affichage d\rquote un module seul
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Ce mode d\rquote affichage permet de voir un module seul, hors du monde.
|
||||
\par \pard \widctlpar Il est activ\'e9 par l\rquote entr\'e9e \ldblquote \~{\cs21\b\f5 Tools \\ Modules View}\~\rdblquote du menu principal, dans le cas o\'f9 la s\'e9lection se r\'e9sume seulement \'e0 un module graphique.
|
||||
\par \pard \widctlpar
|
||||
\par Dans ce mode, il est possible de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} d\'e9former un objet,
|
||||
\par {\b\f27\cf2 \'fc} cr\'e9er, modifier et supprimer des zones globales de l\rquote acteur,
|
||||
\par {\b\f27\cf2 \'fc} d\'e9former et d\'e9placer ces zones.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \pard\plain \s17\sb120\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_MODE_VIEWER}K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {
|
||||
\cs20\super K} Viewer}+{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super +} PAGE_040}} Le Viewer
|
||||
\par \pard\plain \s22\sb240\sa120\widctlpar \b\f4\ul\lang1036 {\cs20\super K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super K} Viewer,pr\'e9sentation}} Pr\'e9sentation\~:
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 Ce mode d\rquote affichage permet de regrouper dans un seul affichage (sur plusieurs fen\'eatres), des \'e9l\'e9ments pris dans le monde (modules g\'e9om\'e9triques, acteurs, ... ), \'e0 raison d\rquote un \'e9l
|
||||
\'e9ment par fen\'eatre.
|
||||
\par \pard \widctlpar Il peut \'eatre activ\'e9 par l\rquote entr\'e9e \ldblquote \~{\cs21\b\f5 Tools \\ Viewer \\ Open\~}\rdblquote du menu principal (cette entr\'e9e n\rquote est active que lorsque le viewer contient au moins un \'e9l\'e9ment).
|
||||
\par \pard \widctlpar
|
||||
\par \pard\plain \s22\sb240\sa120\widctlpar \b\f4\ul\lang1036 {\cs20\super K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super K} Viewer,modification du contenu}} Modification du contenu\~:
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 On peut modifier le contenu des \'e9l\'e9ments du viewer\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} en utilisant une {\uldb boite de dialogue}{\v ID_DLG_CONTENT} dans le menu \ldblquote \~{\cs21\b\f5 Tools \\ Viewer \\ Edit Content}\~\rdblquote ,
|
||||
\par \pard \s18\fi-284\li851\widctlpar\tx284 {\b\f27\cf2 \'fc} en ajoutant le(s) \'e9l\'e9ment(s) s\'e9lectionn\'e9(s) \'e0 l\rquote aide de l\rquote entr\'e9e \ldblquote \~{\cs21\b\f5 Viewer \\ Add}\~\rdblquote du menu contextuel,
|
||||
\par \pard \s18\fi-284\li851\widctlpar\tx284 {\b\f27\cf2 \'fc} en supprimant tous les \'e9l\'e9ments du viewer dans le menu \ldblquote \~{\cs21\b\f5 Tools \\ Viewer \\ Reset Content\~}\rdblquote , ou \'e0 l\rquote aide de l\rquote entr\'e9e \ldblquote \~{
|
||||
\cs21\b\f5 Viewer \\ Reset Content\~}\rdblquote du menu contextuel.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Le contenu du viewer ne peut \'eatre modifi\'e9 qu\rquote en dehors du mode Viewer.
|
||||
\par
|
||||
\par \pard\plain \s22\sb240\sa120\widctlpar \b\f4\ul\lang1036 {\cs20\super K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super K} Viewer,menu contextuel}} Menu contextuel\~:
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 Lorsque l\rquote on est en mode viewer, le menu contextuel permet de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} conna\'eetre l\rquote \'e9l\'e9ment de la fen\'eatre active (premi\'e8re entr\'e9e gris\'e9e \ldblquote \~{\cs21\b\f5 Viewer\~ \\ ...\rdblquote }),
|
||||
\par {\b\f27\cf2 \'fc} recentrer la cam\'e9ra de la fen\'eatre active sur sa cible initiale(entr\'e9e \ldblquote \~{\cs21\b\f5 Viewer \\ Restore Target}\~\rdblquote
|
||||
\par {\b\f27\cf2 \'fc} fermer le Viewer (entr\'e9e \ldblquote \~{\cs21\b\f5 Viewer \\ Close}\~\rdblquote ).
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \pard\plain \s17\sb120\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_DLG_CONTENT}K{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {
|
||||
\cs20\super K} Boite de dialogue,gestion du contenu de viewer}+{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super +} PAGE_050}} Boite de dialogue\~: contenu du Viewer
|
||||
\par \pard\plain \s22\sb240\sa120\widctlpar \b\f4\ul\lang1036 Pr\'e9sentation\~:
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 \{bml DlgVwCnt.shg\}
|
||||
\par
|
||||
\par \pard \widctlpar Cette boite de dialogue peut \'eatre activ\'e9e par l\rquote entr\'e9e \ldblquote \~{\cs21\b\f5 Tools \\ Viewer \\ Edit Content}\~\rdblquote du menu principal.
|
||||
\par \pard \widctlpar Elle permet de g\'e9rer le contenu du Viewer.
|
||||
\par {\ul
|
||||
\par }La liste de gauche permet d\rquote afficher\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} la liste des acteurs,
|
||||
\par {\b\f27\cf2 \'fc} la liste des objets g\'e9om\'e9triques,
|
||||
\par {\b\f27\cf2 \'fc} l\rquote arbre de la hi\'e9rarchie des super-objets.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Dans la cas de la liste des acteurs ou ds objets g\'e9om\'e9triques, il est possible de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} s\'e9lectionner plusieurs \'e9l\'e9ments (avec Ctrl ou Shift),
|
||||
\par {\b\f27\cf2 \'fc} double-cliquer sur un \'e9l\'e9ment pour le placer directement dans le contenu du Viewer.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 {\ul
|
||||
\par }De m\'eame, la liste de droite affiche le contenu du Viewer, dans laquelle il est aussi possible de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} s\'e9lectionner plusieurs \'e9l\'e9ments (avec Ctrl ou Shift),
|
||||
\par {\b\f27\cf2 \'fc} double-cliquer sur un \'e9l\'e9ment pour le supprimer du contenu du Viewer.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par {\ul
|
||||
\par }\pard \widctlpar {\b\fs24\ul\cf12 Remarques\~:
|
||||
\par }\pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf16 \'c4} le nombre d\rquote \'e9l\'e9ments contenu dans le viewer est limit\'e9 \'e0 10,
|
||||
\par {\b\f27\cf16 \'c4} un acteur compte pour un seul \'e9l\'e9ment,
|
||||
\par {\b\f27\cf16 \'c4} il est possible de redimensionner cette boite de dialogue.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_CB_TYPE}} permet de choisir le type de la liste d\rquote objets qui sera affich\'e9e au dessous.\page {\cs20\super #
|
||||
{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_LB_CHOIX}} liste des objets du type ci-dessus.
|
||||
\par Il est possible de\~:
|
||||
\par {\b\f27\cf2 \'fc} double-cliquer sur un \'e9l\'e9ment pour le copier dans la liste de contenu,
|
||||
\par {\b\f27\cf2 \'fc} faire une s\'e9lection multiple d\rquote \'e9l\'e9ments.
|
||||
\par \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_BT_ADD}} ajoute dans la liste de contenu l\rquote (les) \'e9l\'e9ment(s) s\'e9lectionn\'e9(s).
|
||||
\par \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_LB_CONTENT}} liste des \'e9l\'e9ments contenu dans le Viewer.
|
||||
\par Il est possible\~de :
|
||||
\par {\b\f27\cf2 \'fc} double-cliquer sur un \'e9l\'e9ment pour le supprimer de la liste,
|
||||
\par {\b\f27\cf2 \'fc} faire une s\'e9lection multiple d\rquote \'e9l\'e9ments.
|
||||
\par \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_BT_DELETE}} supprime de la liste de contenu l\rquote (les) \'e9l\'e9ment(s) s\'e9lectionn\'e9(s).
|
||||
\par \page {\cs20\super #{\footnote \pard\plain \s19\widctlpar \f4\fs20\lang1036 {\cs20\super #} ID_AUTEUR}}\{bmc m_trabuc.bmp\}
|
||||
\par \pard \widctlpar {\b\scaps\fs24\cf13 Ubi Simulations
|
||||
\par }\pard \widctlpar {\b\i Marc Trabucato}
|
||||
\par {\cf2 T\'e9l\~}: 04.50.52.90.84
|
||||
\par {\cf2 E-mail\~}: mtrabucato@annecy.ubisoft.fr
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036
|
||||
\par }
|
10
Rayman_X/cpa/tempgrp/T3D/doc/Help/T3d.cnt
Normal file
@@ -0,0 +1,10 @@
|
||||
:Base T3D.hlp>MainFram
|
||||
:Title T3D Helper
|
||||
1 G<>n<EFBFBD>ralit<69>s
|
||||
2 Pr<50>sentation=ID_PRESENTATION
|
||||
2 Afficher un acteur seul=ID_MODE_ACTEUR
|
||||
2 Afficher les modules d'un acteur dans une grille=ID_MODE_GRILLE
|
||||
2 Afficher un module seul=ID_MODE_MODULE
|
||||
2 Le Viewer
|
||||
3 Pr<50>sentation=ID_MODE_VIEWER
|
||||
3 Editer le contenu=ID_DLG_CONTENT
|
19
Rayman_X/cpa/tempgrp/T3D/doc/Help/T3d.hpj
Normal file
@@ -0,0 +1,19 @@
|
||||
; This file is maintained by HCW. Do not modify this file directly.
|
||||
|
||||
[OPTIONS]
|
||||
HCW=0
|
||||
COMPRESS=12 Hall Zeck
|
||||
LCID=0x40c 0x0 0x0 ;Fran<61>ais (standard)
|
||||
REPORT=Yes
|
||||
BMROOT=bmp
|
||||
BMROOT=shg
|
||||
HLP=.\T3d.hlp
|
||||
|
||||
[FILES]
|
||||
.\T3D.rtf
|
||||
|
||||
[WINDOWS]
|
||||
MainFram="T3d Helper",(653,102,360,600),21252,(r14876671),(r12632256),f3
|
||||
|
||||
[CONFIG]
|
||||
BrowseButtons()
|
BIN
Rayman_X/cpa/tempgrp/T3D/doc/Help/shg/DLGVWCNT.SHG
Normal file
7
Rayman_X/cpa/tempgrp/T3D/doc/news.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
==========================================================================================
|
||||
VERSION 3.4.0
|
||||
-------------
|
||||
|
||||
Lorsqu'un affiche un acteur seul, la hi<68>rarchie est maintenant constitu<74>e d'une racine,
|
||||
ayant pour fils un superobject d'objet acteur, qui poss<73>de ses superobjects fils.
|
||||
|
123
Rayman_X/cpa/tempgrp/T3D/inc/CPA_Grid.hpp
Normal file
@@ -0,0 +1,123 @@
|
||||
// Class CPA_Grid
|
||||
|
||||
#ifndef __CPA_GRID_HPP__
|
||||
#define __CPA_GRID_HPP__
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
class DEV_MultiDevice3D;
|
||||
class DEV_SingleDevice3D;
|
||||
class CPA_SuperObject;
|
||||
|
||||
#include "mth.h"
|
||||
#include "GLD.h"
|
||||
// ALX
|
||||
//#include "CPACont.hpp"
|
||||
// End ALX
|
||||
|
||||
//**************************************
|
||||
/*#ifndef CPA_EXPORT
|
||||
#if defined(CPA_WANTS_IMPORT)
|
||||
#define CPA_EXPORT __declspec(dllimport)
|
||||
#elif defined(CPA_WANTS_EXPORT)
|
||||
#define CPA_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define CPA_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
*///**************************************
|
||||
// Keyboard entry ID
|
||||
#define KA_ID_NAVMODE 10
|
||||
#define KA_ID_LEFT 11
|
||||
#define KA_ID_RIGHT 12
|
||||
#define KA_ID_UP 13
|
||||
#define KA_ID_DOWN 14
|
||||
|
||||
|
||||
|
||||
class /*CPA_EXPORT*/ CPA_Grid : public CPA_Contact
|
||||
{
|
||||
// Constructor/Destructor
|
||||
//-----------------------
|
||||
public:
|
||||
CPA_Grid(CPA_KeyActionConfiguration *p_oKeyboard, DEV_MultiDevice3D *p_oDevice = NULL);
|
||||
|
||||
// Member variables
|
||||
//-----------------
|
||||
private:
|
||||
DEV_MultiDevice3D *m_p_oMultiDevice; // Single device associate with contact
|
||||
|
||||
MTH_tdxReal m_xMaxSphereBoxRadius; // The max radius of sphere box of module
|
||||
MTH_tdxReal m_xGridSquareSize; // The size of a square
|
||||
MTH_tdxReal m_xFirstCenterX; // Distance from center of grid to center of first object in X
|
||||
MTH_tdxReal m_xFirstCenterZ; // Distance from center of grid to center of first object in Z
|
||||
MTH_tdxReal m_xLastCenterX; // Distance from center of grid to center of last object in X
|
||||
MTH_tdxReal m_xLastCenterZ; // Distance from center of grid to center of last object in Z
|
||||
BOOL m_bShowSelection; // There's a selection ?
|
||||
BOOL m_bShowGrid; // Grid is visible ?
|
||||
short m_wNbOfRows; // Number of rows in grid
|
||||
short m_wNbOfColumns; // Number of columns in grid
|
||||
|
||||
CPA_KeyActionConfiguration * m_p_oKeyboard;
|
||||
BOOL m_bNavigationMode;
|
||||
|
||||
public:
|
||||
// override
|
||||
// BOOL _OnCommand(UINT);
|
||||
// BOOL _OnUpdateCommandUI(CCmdUI *);
|
||||
BOOL _OnKeyDown(UINT, UINT, UINT);
|
||||
// BOOL _OnKeyUp(UINT, UINT, UINT);
|
||||
// BOOL _OnMouseMove(UINT, tdstMousePos *);
|
||||
// BOOL _OnLButtonDblClk(UINT, tdstMousePos *, ACP_tdxIndex, HIE_tdstPickInfo *);
|
||||
BOOL _OnLButtonDown(UINT, tdstMousePos *, ACP_tdxIndex, HIE_tdstPickInfo *);
|
||||
// BOOL _OnLButtonUp(UINT, tdstMousePos *);
|
||||
// BOOL _OnRButtonDblClk(UINT, tdstMousePos *, ACP_tdxIndex, HIE_tdstPickInfo *);
|
||||
// BOOL _OnRButtonDown(UINT, tdstMousePos *, ACP_tdxIndex, HIE_tdstPickInfo *);
|
||||
// BOOL _OnRButtonUp(UINT, tdstMousePos *);
|
||||
// BOOL _OnDragDropEnd(WPARAM wParam, LPARAM lParam);
|
||||
// BOOL _OnDragDropMove(WPARAM wParam, LPARAM lParam);
|
||||
// BOOL _OnDragDropLooseFocus(WPARAM wParam, LPARAM lParam);
|
||||
// BOOL _OnDragDropGainFocus(WPARAM wParam, LPARAM lParam);
|
||||
void fn_vAddObjectsToDraw(GLD_tdstViewportAttributes *, GLI_tdxHandleToLight, DEV_ViewPort *);
|
||||
// owner methods
|
||||
void m_fn_vSetMultiDevice (DEV_MultiDevice3D *_p_oMulti) { m_p_oMultiDevice = _p_oMulti; }
|
||||
// ALX
|
||||
DEV_MultiDevice3D *m_fn_p_oGetMultiDevice () { return m_p_oMultiDevice; }
|
||||
// End ALX
|
||||
BOOL m_fn_bIsGridShowed (void) { return m_bShowGrid; }
|
||||
BOOL m_fn_bIsSelectionShowed (void) { return m_bShowSelection; }
|
||||
void m_fn_vShowGrid (void) { m_bShowGrid = TRUE; }
|
||||
void m_fn_vHideGrid (void) { m_bShowGrid = FALSE; }
|
||||
void m_fn_vShowSelection (void) { m_bShowSelection = TRUE; }
|
||||
void m_fn_vHideSelection (void) { m_bShowSelection = FALSE; }
|
||||
void m_fn_vPositionWorldOnGrid (void);
|
||||
void m_fn_vResetContent (void);
|
||||
void m_fn_vDisplay (GLD_tdstViewportAttributes *);
|
||||
void m_fn_vCenterOnGrid (void);
|
||||
void m_fn_vCenterOnSuperObject (CPA_SuperObject *_p_SprObj);
|
||||
CPA_SuperObject* m_fn_p_oGetSuperObjectFromPos (tdstMousePos *p_stPos);
|
||||
protected:
|
||||
void m_fn_vComputeObjectsPosition(void);
|
||||
void m_fn_vConvertRowColumnTo3D(short _wRow, short _wColumn, MTH3D_tdstVector *_p_st3D);
|
||||
void m_fn_vComputeMaxSphereBoxRadius(void);
|
||||
BOOL m_fn_bGetSphereBoxCenter(CPA_SuperObject *_p_oSprObj, MTH3D_tdstVector *_p_stCenter);
|
||||
MTH_tdxReal m_fn_xGetSphereBoxRadius(CPA_SuperObject *_p_oSprObj);
|
||||
|
||||
void m_fn_vComputeFirstAndLastCenters(void);
|
||||
void m_fn_vComputeRowColumn(void);
|
||||
void m_fn_vCompute3DPosOfSuperObject(CPA_SuperObject *_p_SprObj,MTH_tdxReal *_p_xLeftX, MTH_tdxReal *_p_xLeftZ,
|
||||
MTH_tdxReal *_p_xRightX, MTH_tdxReal *_p_xRightZ,
|
||||
MTH_tdxReal *_p_xXL, MTH_tdxReal *_p_xZL);
|
||||
void m_fn_vComputeGridPosOfSuperObject(CPA_SuperObject *_p_SprObj,short *_p_wRow,short *_p_wColumn);
|
||||
void m_fn_vDisplayGrid(GLD_tdstViewportAttributes *);
|
||||
void m_fn_vDisplaySelection(GLD_tdstViewportAttributes *);
|
||||
void m_fn_vDrawOneLine(GLD_tdstViewportAttributes *_p_stViewAttrib, long lColor,
|
||||
MTH3D_tdstVector *_p_stVxA, MTH3D_tdstVector *_p_stVxB,
|
||||
MTH3D_tdstVector *_p_stDepl, ACP_tdxIndex _xNbLines);
|
||||
void m_fn_vComputePickedSquare(GLI_tdst2DVertex *_p_st2DMousePos, short *_p_wRow, short *_p_wColumn);
|
||||
void m_fn_vGetPosOnGridPlane(GLD_tdhDevice hDev, GLD_tdhViewport hVp, GLI_tdst2DVertex *_p_st2DMousePos,
|
||||
MTH3D_tdstVector *p_stDstVertex);
|
||||
};
|
||||
|
||||
#endif //ACTIVE_EDITOR
|
||||
#endif //__CPA_GRID_HPP__
|
81
Rayman_X/cpa/tempgrp/T3D/inc/DlgVwCt.h
Normal file
@@ -0,0 +1,81 @@
|
||||
// DlgVwCt.h : header file
|
||||
//
|
||||
|
||||
#ifndef __DLGVWCT_HPP__
|
||||
#define __DLGVWCT_HPP__
|
||||
|
||||
#include "T3d_Res.h"
|
||||
#include "T3Dinterf.hpp"
|
||||
|
||||
#define C_OPENVIEWER 20
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgViewerContent dialog
|
||||
class CPA_ReachableObjectList;
|
||||
|
||||
class CDlgViewerContent : public CDialog
|
||||
{
|
||||
protected:
|
||||
CPA_List<tdst_VW_ObjInfo> *m_p_oListOfInitialObjects;
|
||||
CPA_MainWorld *m_p_oMainWorld;
|
||||
CString m_ocstTreeName;
|
||||
BOOL m_bTreeUsed;
|
||||
CImageList m_stImageList;
|
||||
CBitmap m_oBmpEdNoObject;
|
||||
CBitmap m_oBmpEdSupObj;
|
||||
CBitmap m_oBmpNoEdNoObject;
|
||||
CBitmap m_oBmpNoEdSupObj;
|
||||
CBitmap m_oBmpPEdNoObject;
|
||||
CBitmap m_oBmpPEdSupObj;
|
||||
CBitmap m_oBmpPNoEdNoObject;
|
||||
CBitmap m_oBmpPNoEdSupObj;
|
||||
// Construction
|
||||
public:
|
||||
CDlgViewerContent(CPA_MainWorld *_p_oMainWorld, CPA_List<tdst_VW_ObjInfo> *_p_oListOfInitialObjects,CWnd* pParent = NULL); // standard constructor
|
||||
~CDlgViewerContent();
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgViewerContent)
|
||||
enum { IDD = IDD_DLG_VIEWERCONTENT };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgViewerContent)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgViewerContent)
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
|
||||
virtual void OnOK();
|
||||
afx_msg void OnBtdelete();
|
||||
afx_msg void OnBtadd();
|
||||
afx_msg void OnSelchangeComboType();
|
||||
afx_msg void OnDblClkListObjects();
|
||||
afx_msg void OnDblclkListContent();
|
||||
afx_msg void OnBtOpen();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
protected:
|
||||
void mfn_vFillChoiceList(CPA_List<CPA_SuperObject> *_p_oList);
|
||||
void mfn_vShowHierarchyTree();
|
||||
void mfn_vAddListOfType(CString _csTypeName, CString _csListName);
|
||||
void mfn_vAddHierarchyTree(CString _csListName);
|
||||
void mfn_vFillHierarchyTree (CPA_SuperObject *pEdParent, HTREEITEM hTreeParent);
|
||||
void mfn_vAddSelectionFromList();
|
||||
void mfn_vAddSelectionFromTree();
|
||||
void mfn_vUpdateList();
|
||||
};
|
||||
|
||||
#endif // __DLGVWCT_HPP__
|
18
Rayman_X/cpa/tempgrp/T3D/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__
|
||||
|
47
Rayman_X/cpa/tempgrp/T3D/inc/T3DFRMBs.hpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef __T3DFRMBS_HPP__
|
||||
#define __T3DFRMBS_HPP__
|
||||
|
||||
//**************************************
|
||||
#ifndef CPA_EXPORT
|
||||
#if defined(CPA_WANTS_IMPORT)
|
||||
#define CPA_EXPORT __declspec(dllimport)
|
||||
#elif defined(CPA_WANTS_EXPORT)
|
||||
#define CPA_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define CPA_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
//**************************************
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
class Tool3D_Interface;
|
||||
|
||||
// ALX
|
||||
//#include "FRMBsMn.hpp"
|
||||
// End ALX
|
||||
|
||||
class Tool3D_FRMBaseMenu : public FRMBaseMenu
|
||||
{
|
||||
protected:
|
||||
Tool3D_Interface *m_p_oTool3D;
|
||||
public:
|
||||
Tool3D_FRMBaseMenu();
|
||||
~Tool3D_FRMBaseMenu();
|
||||
void mfn_vSetTool3D(Tool3D_Interface *_p_oTool3D) { m_p_oTool3D = _p_oTool3D; }
|
||||
void fn_vInitGeneralMenuWithContext(void);
|
||||
void mfn_vUpdateDeviceToolBar(void);
|
||||
DECLARE_DYNCREATE(Tool3D_FRMBaseMenu);
|
||||
protected:
|
||||
//{{AFX_MSG(CPA_MainFrame)
|
||||
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
||||
afx_msg void OnSysCommand( UINT nID, LPARAM lParam );
|
||||
afx_msg void OnSize( UINT nType, int cx, int cy );
|
||||
afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
};
|
||||
|
||||
#endif ACTIVE_EDITOR
|
||||
#endif __T3DFRMBS_HPP__
|
26
Rayman_X/cpa/tempgrp/T3D/inc/T3DFrame.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// T3DFrame.hpp: interface for the Tool3D_Frame class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_T3DFRAME_HPP__2A23345F_F475_11D1_95F0_00A02416A985__INCLUDED_)
|
||||
#define AFX_T3DFRAME_HPP__2A23345F_F475_11D1_95F0_00A02416A985__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
class Tool3D_Frame : public CSplitFrame
|
||||
{
|
||||
public:
|
||||
CPA_DialogList *m_p_clDialogList;
|
||||
CPA_BaseObjectList *m_p_clBaseObjectList;
|
||||
BOOL m_bDisplayAllFam;
|
||||
virtual BOOL OnCreateClient( LPCREATESTRUCT lpcs, CCreateContext* pContext);
|
||||
Tool3D_Frame();
|
||||
virtual ~Tool3D_Frame();
|
||||
|
||||
private:
|
||||
CSplitterWnd m_clSplitter;
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_T3DFRAME_HPP__2A23345F_F475_11D1_95F0_00A02416A985__INCLUDED_)
|
105
Rayman_X/cpa/tempgrp/T3D/inc/T3DWorld.hpp
Normal file
@@ -0,0 +1,105 @@
|
||||
// definition of special world class for the 3DTool Dll
|
||||
|
||||
#ifndef __T3DWORLD_HPP__
|
||||
#define __T3DWORLD_HPP__
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
#include "T3DInterf.hpp"
|
||||
#include "X:\Cpa\Main\inc\_EditID.h"
|
||||
|
||||
|
||||
class CPA_MainWorld;
|
||||
class Evt_Editor;
|
||||
class CPA_ObjectDLLBase;
|
||||
class CPA_List;
|
||||
class CPA_BaseObject;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
C_eNone,
|
||||
C_eActor,
|
||||
C_eSuperObject,
|
||||
C_eGridActor,
|
||||
C_eGridList,
|
||||
C_eObject,
|
||||
C_eViewer,
|
||||
C_eAnimOK,
|
||||
C_eAnimTemp
|
||||
} tde_WorldType;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class Tool3D_World : public CPA_World
|
||||
{
|
||||
|
||||
protected:
|
||||
public:
|
||||
CPA_SuperObject *m_p_oBaseFromAnim;
|
||||
tde_WorldType m_eWorldType;
|
||||
CPA_List<CPA_SuperObject> m_oListOfSO;
|
||||
POSITION m_xLastSOUsedPosition;
|
||||
tdstEngineObject *m_p_stEngineObject;
|
||||
tdstState m_stState;
|
||||
CPA_Interface *m_p_oInterface;
|
||||
CPA_EditorBase *m_p_oDLLPO;
|
||||
CPA_SuperObject *m_p_oRootFromAnim;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Tool3D_World(CPA_MainWorld *_p_oMainWorld);
|
||||
~Tool3D_World();
|
||||
// Editor Messages Functions overload
|
||||
BOOL fn_bAcceptModifDelete (CPA_ObjectDLLBase *pDLLBase) { return mfn_bAcceptModif( pDLLBase ); }
|
||||
BOOL fn_bAcceptModifParent (CPA_ObjectDLLBase *pDLLBase) { return mfn_bAcceptModif( pDLLBase ); }
|
||||
// ALX
|
||||
BOOL fn_bAcceptModifCopy (CPA_ObjectDLLBase *pDLLBase) { return TRUE; }
|
||||
// End ALX
|
||||
BOOL fn_bAcceptModifTranslate (CPA_ObjectDLLBase *pDLLBase) { return mfn_bAcceptModif( pDLLBase ); }
|
||||
BOOL fn_bAcceptModifRotate (CPA_ObjectDLLBase *pDLLBase) { return mfn_bAcceptModif( pDLLBase ); }
|
||||
BOOL fn_bAcceptModifScale (CPA_ObjectDLLBase *pDLLBase) { return mfn_bAcceptModif( pDLLBase ); }
|
||||
BOOL fn_bAcceptModifInsert (CPA_ObjectDLLBase *pDLLBase) { return mfn_bAcceptModif( pDLLBase ); }
|
||||
BOOL fn_bAcceptModifName (CPA_ObjectDLLBase *pDLLBase) { return FALSE;}
|
||||
BOOL fn_bAcceptSelect (CPA_ObjectDLLBase *pDLLBase) { return TRUE; }
|
||||
BOOL fn_bAcceptMultiSelect (void) { return TRUE; }
|
||||
// Called before editor timer execution
|
||||
BOOL fn_bAcceptToRunTimerEngine (void) { return TRUE; };
|
||||
|
||||
public:
|
||||
void mfn_vCreateHierarchyFromActor (CPA_SuperObject *_p_oSprObj);
|
||||
void mfn_vCreateHierarchyFromSuperObject (CPA_SuperObject *_p_oSprObj);
|
||||
void mfn_vCreateHierarchyFromObject (CPA_BaseObject *_p_oObject);
|
||||
void mfn_vCreateGridHierarchyFromActor (CPA_SuperObject *_p_oSprObj);
|
||||
void mfn_vCreateGridHierarchyFromList (CPA_List<CPA_BaseObject> *_p_oList, CPA_MainWorld *_p_oMainWorld);
|
||||
void mfn_vCreateGridHierarchyFromTable (CPA_BaseObject *_p_oTable, CPA_MainWorld *_p_oMainWorld);
|
||||
void mfn_vCreateViewerHierarchyFromVWOIList (CPA_List<tdst_VW_ObjInfo> *_p_oListOfVWOI, CPA_MainWorld *_p_oMainWorld);
|
||||
//
|
||||
CPA_SuperObject *mfn_p_oCreateHierarchyFromAnim (CPA_SuperObject *_p_oSprObjActor);
|
||||
void mfn_vUpdateHierarchyFromAnim (struct tdstAnim3d_* _pstAnim, unsigned short _uwFrame);
|
||||
void mfn_vPlayAnim (struct tdstAnim3d_* _pstAnim, unsigned short _uwFrame);
|
||||
//
|
||||
void mfn_vResetWorld (void);
|
||||
void mfn_vComputeSuperObjectPosFromViewer (void);
|
||||
MTH_tdxReal m_fn_xGetSphereBoxRadius (CPA_SuperObject *_p_oSprObj);
|
||||
BOOL m_fn_bGetSphereBoxCenter (CPA_SuperObject *_p_oSprObj, MTH3D_tdstVector *_p_stCenter);
|
||||
|
||||
BOOL mfn_bComputeCenterAndRadiusBoundingBox (CPA_SuperObject *_p_oSprObj, MTH3D_tdstVector *_p_stCenter = NULL, MTH_tdxReal *_xRadius = NULL);
|
||||
|
||||
protected:
|
||||
BOOL mfn_bAcceptModif (CPA_ObjectDLLBase *pDLLBase);
|
||||
void mfn_vDuplicateHierarchy (CPA_SuperObject *_p_oNewFather, CPA_SuperObject *_p_oPreviousFather);
|
||||
void mfn_vLinearizeHierarchy (CPA_SuperObject *_p_oNewFather, CPA_SuperObject *_p_oPreviousFather);
|
||||
void mfn_vDeleteHierarchy (CPA_SuperObject *_p_oFather );
|
||||
MTH_tdxReal m_fn_vComputeMaxSphereBoxRadius (void);
|
||||
//
|
||||
void mfn_vResetHierarchy (CPA_SuperObject *_p_oRootSO);
|
||||
void mfn_vFillHierarchyWithEngineAnim(CPA_SuperObject *_p_oRootSO, BOOL _bWithObject = TRUE);
|
||||
void mfn_vFillHierarchy (CPA_SuperObject *_p_oRootSO, BOOL _bWithObject = TRUE);
|
||||
void mfn_vClearHierarchy (CPA_SuperObject *p_oRootSO, BOOL _bDelete = FALSE);
|
||||
};
|
||||
|
||||
#endif //ACTIVE_EDITOR
|
||||
|
||||
#endif //__T3DWORLD_HPP__
|
181
Rayman_X/cpa/tempgrp/T3D/inc/T3Dinterf.hpp
Normal file
@@ -0,0 +1,181 @@
|
||||
//**************************************
|
||||
// This is the base class of your DLL interface
|
||||
// All methods of CPA_ToolDLLBase are
|
||||
// present in that class.
|
||||
//**************************************
|
||||
|
||||
#ifndef __T3DINTERF_HPP__
|
||||
#define __T3DINTERF_HPP__
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
// if you want only one instance of your DLL
|
||||
// activate the next line
|
||||
#define DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
class CPA_SuperObject;
|
||||
class Evt_Editor;
|
||||
class CPA_World;
|
||||
class CPA_Contact;
|
||||
class DEV_MultiDevice;
|
||||
class Tool3D_FRMBaseMenu;
|
||||
class Tool3D_World;
|
||||
|
||||
//Stefan Dumitrean 26-05-98
|
||||
class Tool3D_Frame;
|
||||
//End Stefan Dumitrean 26-05-98
|
||||
|
||||
class CAnimationView;
|
||||
class CPA_Family;
|
||||
class CPA_Animation;
|
||||
class EditorObjectTable;
|
||||
|
||||
// Query Info
|
||||
#define C_wTool3D_QI_CanOpenChar 1
|
||||
#define C_wTool3D_QI_CanOpenMod 2
|
||||
#define C_wTool3D_QI_CanOpenGeom 3
|
||||
#define C_wTool3D_QI_CanOpenTable 4
|
||||
#define C_wTool3D_QI_CanOpenViewer 5
|
||||
#define C_wTool3D_QI_CanOpenObject 6
|
||||
|
||||
#define C_wTool3D_QI_GetState 10
|
||||
#define C_wTool3D_QI_GetWorld 11
|
||||
#define C_wTool3D_QI_GetDevice 12
|
||||
#define C_wTool3D_QI_GetContact 13
|
||||
|
||||
// Type of Tool used
|
||||
#define C_wTool3D_None 0
|
||||
#define C_wTool3D_Char 1
|
||||
#define C_wTool3D_Mod_Object 2
|
||||
#define C_wTool3D_Mod_List 3
|
||||
#define C_wTool3D_Table 4
|
||||
#define C_wTool3D_Geom_Object 5
|
||||
#define C_wTool3D_Viewer 6
|
||||
#define C_wTool3D_Object 7
|
||||
|
||||
// General Actions
|
||||
// Actions for 3DModTool
|
||||
#define C_wTool3D_QA_ShowGrid 11
|
||||
#define C_wTool3D_QA_HideGrid 12
|
||||
#define C_wTool3D_QA_ShowSelect 13
|
||||
#define C_wTool3D_QA_HideSelect 14
|
||||
#define C_wTool3D_QA_NewChar 20
|
||||
#define C_wTool3D_QA_NewSuperObject 21
|
||||
#define C_wTool3D_QA_NewTable 22
|
||||
#define C_wTool3D_QA_NewObject 23
|
||||
|
||||
typedef struct tdst_VW_ObjInfo_
|
||||
{
|
||||
CPA_SuperObject *m_p_oSuperObject; // target object
|
||||
BOOL m_bUsePos; //
|
||||
POS_tdstCompletePosition stMatrix;
|
||||
} tdst_VW_ObjInfo;
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Tool DLL interface class
|
||||
//----------------------------------------------------------
|
||||
class Tool3D_Interface : public CPA_ToolDLLBase
|
||||
{
|
||||
private:
|
||||
WORD m_wTypeOfTool;
|
||||
CPA_SuperObject *m_p_InitialRoot; // just reference
|
||||
Tool3D_World *m_p_Tool3DWorld; // created Here
|
||||
CPA_Contact *m_p_Tool3DContact; // created Here
|
||||
DEV_MultiDevice3D *m_p_Tool3DMultiDevice; // created Here
|
||||
DEV_MultiDevice *m_p_PreviousMultiDevice;
|
||||
Tool3D_FRMBaseMenu *m_p_FRMBase; // created here
|
||||
FRMBaseMenu *m_p_PreviousFRMBase;
|
||||
CPA_List<tdst_VW_ObjInfo> m_oListOfVWObjInfo;
|
||||
CString m_csLastSelectMode;
|
||||
GLI_tdxHandleToLight m_hLightUp;
|
||||
GLI_tdxHandleToLight m_hLightDown;
|
||||
CPA_SuperObject *m_p_oSprObjActor;
|
||||
CAnimationView *m_p_oAnimView;
|
||||
//Stefan Dumitrean 26-05-98
|
||||
// FRMBase *m_p_oAnimFrame;
|
||||
Tool3D_Frame *m_p_oAnimFrame;
|
||||
CPA_Family *m_p_CurrentFamily;
|
||||
BOOL m_bAnimPlayerInvoked;
|
||||
//End Stefan Dumitrean 26-05-98
|
||||
CPA_KeyActionConfiguration *m_p_oKeyboard;
|
||||
|
||||
public:
|
||||
//Stefan Dumitrean 27-05-98
|
||||
virtual void GetListsForDialog(CPA_DialogList *pDialog);
|
||||
virtual void fn_vInitDefaultParameters(CPA_DialogList *pDialog);
|
||||
virtual BOOL fn_bOnButtonTest( CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDraw );
|
||||
virtual CPA_BaseObject* GetDialogSelection (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDrawMode);
|
||||
virtual BOOL fn_bOnSelChangeListObjects(CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, BOOL bUnselect);
|
||||
virtual BOOL fn_bOnDblClkListObjects(CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject);
|
||||
private:
|
||||
void fn_vOnActivateEditorAnim();
|
||||
public:
|
||||
//End Stefan Dumitrean 27-05-98
|
||||
|
||||
Tool3D_Interface(void);
|
||||
// ~Tool3D_Interface(void);
|
||||
|
||||
// ACP MEssages Functions overload
|
||||
// BOOL fn_bPreTranslateMessage(MSG *);
|
||||
// void fn_vJustAfterRegistered(void);
|
||||
void fn_vConstruct(void);
|
||||
// void fn_vRefreshDatas(void);
|
||||
// void fn_vAddObjectsToDraw(GLD_tdstViewportAttributes *, GLI_tdstLight *);
|
||||
// void fn_vAddObjectsToDraw2(GLD_tdstViewportAttributes *, GLI_tdstLight *);
|
||||
BOOL fn_bAcceptToRunEngine(void) { return (m_wTypeOfTool==C_wTool3D_None); }
|
||||
// void fn_vBeforeEngine(void);
|
||||
void fn_vBeforeEditor(void);
|
||||
// void fn_vHasLostFocus(void);
|
||||
// BOOL fn_bHasGainedFocus(void);
|
||||
// BOOL fn_bAcceptToExit(void);
|
||||
void fn_vJustBeforeClosing(void);
|
||||
|
||||
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);
|
||||
|
||||
// Current Editor
|
||||
tdePermission fn_eAcceptNewEditor (CPA_EditorBase *pNewEditor);
|
||||
BOOL fn_bCanActivateEditor (CPA_List<CPA_BaseObject> *pParams);
|
||||
BOOL fn_bCanCloseEditor (void);
|
||||
|
||||
void fn_vOnActivateEditor (CPA_List<CPA_BaseObject> *pParams, BOOL bBackActivated = FALSE);
|
||||
void fn_vOnCloseEditor (void);
|
||||
|
||||
long OnQueryAction (CPA_EditorBase*, WPARAM, LPARAM);
|
||||
long OnQueryInfos (CPA_EditorBase*, WPARAM, LPARAM);
|
||||
long OnQueryOpen (CPA_EditorBase*, WPARAM, LPARAM);
|
||||
long OnQueryClose (CPA_EditorBase*, WPARAM, LPARAM);
|
||||
|
||||
// Menus
|
||||
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 bIsAlone);
|
||||
void _OnPopUpMenuCommand (UINT m_IDCmdMsg);
|
||||
|
||||
protected:
|
||||
BOOL fn_bTypeOfToolOK (long _wType);
|
||||
BOOL fn_bCanUseObject (long _wType, long _lParam);
|
||||
BOOL fn_bCanOpenTool (long _wType);
|
||||
BOOL fn_bToolActive (long _wType);
|
||||
void mfn_vAddAnObject (CPA_SuperObject *_p_oSprObj, BOOL _bUsePos = TRUE);
|
||||
void mfn_vAddAListOfSuperObject (CPA_List<CPA_SuperObject> *_p_oList, BOOL _bUsePos = TRUE);
|
||||
void mfn_vEditViewerContent (void);
|
||||
void mfn_vCenterCamera (DEV_Device *p_oDevice, CPA_SuperObject *_p_oSprObj);
|
||||
void mfn_vCenterCameraOnTarget (tdst_VW_ObjInfo *_p_stObjInfo);
|
||||
void mfn_vRestoreCameraOnTarget (int _iTarget);
|
||||
void mfn_vResetViewerContent (void);
|
||||
void mfn_vOpenAnim (CPA_SuperObject *_p_oSprObjActor);
|
||||
BOOL mfn_bFindInfoAboutActor (CPA_SuperObject *_p_oSprObj, CPA_Family **_p_p_oFamily,
|
||||
CPA_Animation **_p_p_oAnim, EditorObjectTable **_p_p_oObjectTable,
|
||||
unsigned short *_p_uwFrame);
|
||||
};
|
||||
|
||||
extern tdstDLLIdentity g_stTool3DIdentity;
|
||||
|
||||
#endif // ACTIVE_EDITOR
|
||||
#endif // __T3DINTERF_HPP__
|
181
Rayman_X/cpa/tempgrp/T3D/inc/T3d.rc
Normal file
@@ -0,0 +1,181 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "T3d_Res.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// French (France) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DLG_VIEWERCONTENT DIALOG DISCARDABLE 0, 0, 274, 158
|
||||
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
CAPTION "Viewer Content"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,7,137,50,14
|
||||
LISTBOX IDC_LIST_CHOICE,7,25,118,105,LBS_NOINTEGRALHEIGHT |
|
||||
LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Cancel",IDCANCEL,217,137,50,14
|
||||
DEFPUSHBUTTON "<<",ID_BT_DELETE,129,74,14,14
|
||||
LISTBOX IDC_LIST_CONTENT,148,7,118,124,LBS_NOINTEGRALHEIGHT |
|
||||
LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON ">>",ID_BT_ADD,129,45,14,14
|
||||
COMBOBOX IDC_COMBO_TYPE,7,7,118,89,CBS_DROPDOWNLIST | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Tree1",IDC_TREE_HIERARCHY,"SysTreeView32",
|
||||
TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT |
|
||||
TVS_SHOWSELALWAYS | NOT WS_VISIBLE | WS_DISABLED |
|
||||
WS_BORDER | WS_TABSTOP,7,25,118,105
|
||||
DEFPUSHBUTTON "Open Viewer",ID_BT_OPEN,112,137,50,14
|
||||
END
|
||||
|
||||
IDD_DIALOG_ANIM DIALOGEX 0, 0, 461, 108
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LISTBOX IDC_LIST_ANIMS,119,20,112,84,LBS_SORT |
|
||||
LBS_OWNERDRAWFIXED | LBS_HASSTRINGS |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL |
|
||||
WS_TABSTOP
|
||||
LTEXT "Channels",IDC_STATIC,247,16,30,8,0,WS_EX_RIGHT
|
||||
LTEXT "Frames",IDC_STATIC,253,49,24,8,0,WS_EX_RIGHT
|
||||
EDITTEXT IDC_EDIT_CHANNEL,287,14,20,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER,WS_EX_STATICEDGE
|
||||
EDITTEXT IDC_EDIT_FRAME,287,47,20,12,ES_AUTOHSCROLL | ES_READONLY |
|
||||
ES_NUMBER | NOT WS_BORDER,WS_EX_STATICEDGE
|
||||
PUSHBUTTON "Load...",IDC_BUTTON_LOAD,260,86,32,14
|
||||
LTEXT "",IDC_STATIC_CURRENTFRAME,426,16,20,10,WS_DISABLED,
|
||||
WS_EX_STATICEDGE
|
||||
PUSHBUTTON "Button1",IDC_BUTTON_REWIND,322,24,20,20,BS_BITMAP
|
||||
SCROLLBAR IDC_SCROLLBAR_FRAME,322,11,100,10
|
||||
PUSHBUTTON "Button1",IDC_BUTTON_REVERSE,342,24,20,20,BS_BITMAP
|
||||
PUSHBUTTON "Button1",IDC_BUTTON_STOP,362,24,20,20,BS_BITMAP
|
||||
PUSHBUTTON "Button1",IDC_BUTTON_PLAY,382,24,20,20,BS_BITMAP
|
||||
PUSHBUTTON "Button1",IDC_BUTTON_FORWARD,402,24,20,20,BS_BITMAP
|
||||
PUSHBUTTON "Help",IDC_BUTTON_HELP,292,86,21,14
|
||||
PUSHBUTTON "Show All Animations",IDC_BT_ANIM,119,5,112,12
|
||||
LTEXT "Speed",IDC_STATIC,255,65,22,8,0,WS_EX_RIGHT
|
||||
EDITTEXT IDC_EDIT_SPEED,287,63,20,12,ES_AUTOHSCROLL | ES_READONLY |
|
||||
ES_NUMBER | NOT WS_BORDER,WS_EX_STATICEDGE
|
||||
LTEXT "",IDC_STATIC_CURRENTSPEED,426,61,20,10,0,
|
||||
WS_EX_STATICEDGE
|
||||
CONTROL "Slider1",IDC_SLIDER,"msctls_trackbar32",TBS_TOP |
|
||||
TBS_NOTICKS | WS_TABSTOP,319,62,105,15
|
||||
PUSHBUTTON "Reinit",IDC_BT_REINIT,236,86,24,14
|
||||
GROUPBOX "",IDC_STATIC,236,2,77,81
|
||||
GROUPBOX "Current Speed",IDC_STATIC,317,50,134,33
|
||||
GROUPBOX "",IDC_STATIC,317,2,133,46
|
||||
LISTBOX IDC_LIST_ACTIONS,3,20,112,84,LBS_SORT |
|
||||
LBS_OWNERDRAWFIXED | LBS_HASSTRINGS |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "Action/Family anim. sel.",IDC_BT_ACTION,3,5,112,12
|
||||
LTEXT "Animations",IDC_STATIC,242,33,35,8,0,WS_EX_RIGHT
|
||||
EDITTEXT IDC_EDIT_ANIMATIONS,287,31,20,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER,WS_EX_STATICEDGE
|
||||
EDITTEXT IDC_EDIT_SELECTION_STATUS,317,87,134,13,ES_CENTER |
|
||||
ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "",IDC_STATIC_CURRENTANIMATION,426,35,20,10,WS_DISABLED,
|
||||
WS_EX_STATICEDGE
|
||||
LTEXT "Frame",IDC_STATIC,426,8,20,8
|
||||
LTEXT "Anim.",IDC_STATIC,427,27,18,8
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DLG_VIEWERCONTENT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 267
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 151
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"T3d_Res.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_EDIT_NOOBJECT BITMAP DISCARDABLE "edit_noo.bmp"
|
||||
IDB_EDIT_SUPOBJ BITMAP DISCARDABLE "edit_sup.bmp"
|
||||
IDB_NOEDIT_NOOBJECT BITMAP DISCARDABLE "noedit_n.bmp"
|
||||
IDB_NOEDIT_SUPOBJ BITMAP DISCARDABLE "noedit_s.bmp"
|
||||
IDB_PEDIT_NOOBJECT BITMAP DISCARDABLE "pedit_no.bmp"
|
||||
IDB_PEDIT_SUPOBJ BITMAP DISCARDABLE "pedit_su.bmp"
|
||||
IDB_PNOEDIT_NOOBJECT BITMAP DISCARDABLE "pnoedit_.bmp"
|
||||
IDB_PNOEDIT_SUPOBJ BITMAP DISCARDABLE "pnoedsup.bmp"
|
||||
IDB_BITMAP_FORWARD BITMAP DISCARDABLE "..\\res\\forward.bmp"
|
||||
IDB_BITMAP_PLAY BITMAP DISCARDABLE "..\\res\\play.bmp"
|
||||
IDB_BITMAP_REVERSE BITMAP DISCARDABLE "..\\res\\reverse.bmp"
|
||||
IDB_BITMAP_REWIND BITMAP DISCARDABLE "..\\res\\rewind.bmp"
|
||||
IDB_BITMAP_STOP BITMAP DISCARDABLE "..\\res\\stop.bmp"
|
||||
#endif // French (France) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
62
Rayman_X/cpa/tempgrp/T3D/inc/T3d_Res.h
Normal file
@@ -0,0 +1,62 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by T3D.rc
|
||||
//
|
||||
#define ID_BT_DELETE 3
|
||||
#define ID_BT_OPEN 4
|
||||
#define IDD_DLG_VIEWERCONTENT 101
|
||||
#define IDB_BITMAP_FORWARD 107
|
||||
#define IDB_BITMAP_REWIND 108
|
||||
#define IDB_BITMAP_PLAY 109
|
||||
#define IDB_BITMAP_REVERSE 110
|
||||
#define IDB_BITMAP_STOP 111
|
||||
#define IDB_EDIT_NOOBJECT 120
|
||||
#define IDB_EDIT_SUPOBJ 121
|
||||
#define IDB_NOEDIT_NOOBJECT 122
|
||||
#define IDB_NOEDIT_SUPOBJ 123
|
||||
#define IDB_PEDIT_NOOBJECT 124
|
||||
#define IDB_PEDIT_SUPOBJ 125
|
||||
#define IDB_PNOEDIT_NOOBJECT 126
|
||||
#define IDB_PNOEDIT_SUPOBJ 127
|
||||
#define IDD_DIALOG_ANIM 400
|
||||
#define ID_BT_ADD 1001
|
||||
#define IDC_EDIT_CHANNEL 1001
|
||||
#define IDC_COMBO_TYPE 1002
|
||||
#define IDC_EDIT_FRAME 1002
|
||||
#define IDC_TREE_HIERARCHY 1003
|
||||
#define IDC_EDIT_SPEED 1003
|
||||
#define IDC_BUTTON_LOAD 1004
|
||||
#define IDC_BUTTON_SAVEBIN 1005
|
||||
#define IDC_SLIDER 1005
|
||||
#define IDC_BUTTON_HELP 1006
|
||||
#define IDC_BT_REINIT 1007
|
||||
#define IDC_EDIT_ANIMATIONS 1008
|
||||
#define IDC_BUTTON_REWIND 1010
|
||||
#define IDC_EDIT_SELECTION_STATUS 1011
|
||||
#define IDC_LIST_FAMILIES 1012
|
||||
#define IDC_LIST_ANIMS 1013
|
||||
#define IDC_LIST_ACTIONS 1014
|
||||
#define IDC_STATIC_CURRENTFRAME 1015
|
||||
#define IDC_SCROLLBAR_FRAME 1016
|
||||
#define IDC_BT_FAMILY 1017
|
||||
#define IDC_STATIC_CURRENTSPEED 1017
|
||||
#define IDC_BUTTON_REVERSE 1018
|
||||
#define IDC_BUTTON_STOP 1019
|
||||
#define IDC_BUTTON_PLAY 1020
|
||||
#define IDC_BUTTON_FORWARD 1021
|
||||
#define IDC_BT_ANIM 1022
|
||||
#define IDC_BT_ACTION 1023
|
||||
#define IDC_STATIC_CURRENTANIMATION 1024
|
||||
#define IDC_LIST_CHOICE 1217
|
||||
#define IDC_LIST_CONTENT 1218
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 121
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1012
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
145
Rayman_X/cpa/tempgrp/T3D/inc/animview.h
Normal file
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
*=============================================================================
|
||||
*
|
||||
* Filename: AnimView.h
|
||||
* Version: 1.0
|
||||
* Date: 11/03/97
|
||||
* Author: Vincent Lhullier
|
||||
*
|
||||
* Description: view box to display list of animations
|
||||
* and control to display animation
|
||||
*
|
||||
*===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __ANIMVIEW2_H__
|
||||
#define __ANIMVIEW2_H__
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
#include "T3D_res.h"
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#define D_State_Define
|
||||
#define D_ObjsTbls_Define
|
||||
#define D_ZdxStuff_StructureDefine
|
||||
//#include "DNM.h"
|
||||
#include "incGAM.h"
|
||||
#undef D_ZdxStuff_StructureDefine
|
||||
#undef D_ObjsTbls_Define
|
||||
#undef D_State_Define
|
||||
|
||||
class CPA_Animation;
|
||||
class CPA_Action;
|
||||
class CPA_Family;
|
||||
class Tool3D_World;
|
||||
/*
|
||||
*=============================================================================
|
||||
* CAnimationView form view
|
||||
*=============================================================================
|
||||
*/
|
||||
class CAnimationView : public CFormView
|
||||
{
|
||||
protected:
|
||||
DECLARE_DYNCREATE(CAnimationView)
|
||||
|
||||
private:
|
||||
BOOL bInitialUpdate;
|
||||
BOOL m_bActionPlay; //Mircea Dunka 12.10.98
|
||||
UINT m_uiNumberOfAnimations;
|
||||
UINT m_uiTotalNumberOfFrames;
|
||||
CPA_EditorBase *m_p_oT3DInterf;
|
||||
Tool3D_World *m_p_oTool3DWorld;
|
||||
CPA_Animation *m_p_oCurrentAnim;
|
||||
CPA_Action *m_p_oCurrentAction;//Mircea Dunka 6.10.98
|
||||
CPA_Family *m_p_oFamily;
|
||||
|
||||
//Stefan Dumitrean 28-05-98
|
||||
CFormView *m_p_oFamilySelDialog;
|
||||
//End Stefan Dumitrean 28-05-98
|
||||
|
||||
unsigned short m_uwInitFrame;
|
||||
|
||||
CBitmap m_oBitmapPlay;
|
||||
CBitmap m_oBitmapStop;
|
||||
CBitmap m_oBitmapReverse;
|
||||
CBitmap m_oBitmapForward;
|
||||
CBitmap m_oBitmapRewind;
|
||||
|
||||
BOOL m_bAllAnims;
|
||||
BOOL m_bAllActions;
|
||||
public:
|
||||
UINT m_uiPlayTimer;
|
||||
UINT m_uiElapseTime;
|
||||
BOOL m_bPlay;
|
||||
BOOL m_bReverse;
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
enum { IDD = IDD_DIALOG_ANIM };
|
||||
|
||||
CAnimationView();
|
||||
~CAnimationView();
|
||||
|
||||
void mfn_vSetEditor(CPA_EditorBase *_p_oEditor ) { m_p_oT3DInterf = _p_oEditor; }
|
||||
void mfn_vSetWorld( Tool3D_World *_p_oWorld ) { m_p_oTool3DWorld = _p_oWorld; }
|
||||
|
||||
//Stefan Dumitrean 28-05-98
|
||||
void mfn_vSetFamilySelDialog( CFormView * _p_oDialogList ) { m_p_oFamilySelDialog = _p_oDialogList; }
|
||||
//End Stefan Dumitrean 28-05-98
|
||||
|
||||
void mfn_vInitDialog( CPA_Family *_p_oCurrentFamily, CPA_Animation *_p_oAnimation = NULL, unsigned short _uwFrame = 0);
|
||||
|
||||
void m_fn_vStopAnim();
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CAnimationView)
|
||||
public:
|
||||
virtual void OnInitialUpdate();
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
private:
|
||||
void fn_vBeginAnim( unsigned short _uwFrame = 0);
|
||||
void fn_vShowFrame(unsigned short _uwFrame);
|
||||
void m_fn_vEnableControl( BOOL _bEnable );
|
||||
void fn_vFillAnimList();
|
||||
void mfn_vFillActionList();
|
||||
|
||||
protected:
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CAnimationView)
|
||||
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnSelchangeListAnims();
|
||||
afx_msg void OnSelchangeListActions(); //Mircea Dunka 6.10.98
|
||||
afx_msg void OnButtonLoad();
|
||||
afx_msg void OnButtonPlay();
|
||||
afx_msg void OnButtonReinit();
|
||||
afx_msg void OnButtonAction(); //Mircea Dunka 8.10.98
|
||||
afx_msg void OnTimer(UINT nIDEvent);
|
||||
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
|
||||
afx_msg void OnButtonAnim();
|
||||
afx_msg void OnButtonStop();
|
||||
afx_msg void OnButtonForward();
|
||||
afx_msg void OnButtonReverse();
|
||||
afx_msg void OnButtonRewind();
|
||||
afx_msg void OnDblclkListAnims();
|
||||
afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
|
||||
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
|
||||
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
|
||||
afx_msg void OnButtonHelp();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif /*__ANIMVIEW2_H__*/
|
5
Rayman_X/cpa/tempgrp/T3D/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a source code control file
|
||||
|
||||
[T3D.vcproj]
|
||||
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
|
||||
SCC_Project_Name = Perforce Project
|
BIN
Rayman_X/cpa/tempgrp/T3D/res/EDTeNOb.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Rayman_X/cpa/tempgrp/T3D/res/EDTeSOb.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Rayman_X/cpa/tempgrp/T3D/res/EDTnNOb.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Rayman_X/cpa/tempgrp/T3D/res/EDTnSOb.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Rayman_X/cpa/tempgrp/T3D/res/EDTpeNOb.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Rayman_X/cpa/tempgrp/T3D/res/EDTpeSOb.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Rayman_X/cpa/tempgrp/T3D/res/EDTpnNOb.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Rayman_X/cpa/tempgrp/T3D/res/EDTpnSOb.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
764
Rayman_X/cpa/tempgrp/T3D/src/CPA_Grid.cpp
Normal file
@@ -0,0 +1,764 @@
|
||||
/*=========================================================================
|
||||
*
|
||||
* CPA_Grid.cpp : Implementation file.
|
||||
*
|
||||
*
|
||||
* Version 1.0
|
||||
* Creation date
|
||||
* Revision date
|
||||
*
|
||||
* MT
|
||||
*=======================================================================*/
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
#include "stdafx.h"
|
||||
#define HieFriend
|
||||
#include "ACP_Base.h"
|
||||
|
||||
#include "incvig.h"
|
||||
#include "incGam.h"
|
||||
|
||||
#include "Itf.h"
|
||||
|
||||
|
||||
#include "CPA_Grid.hpp"
|
||||
|
||||
/*****************************************************************************
|
||||
MACROS
|
||||
*****************************************************************************/
|
||||
#define M_GetLSTWorld() (((DEV_MultiDevice3D*)GetDevice())->GetWorld())
|
||||
#define M_GetLSTViewPort() ((DEV_ViewPort3D*)((DEV_MultiDevice3D*)GetDevice())->GetFocusDevice()->GetViewPort())
|
||||
// ALX
|
||||
#define M_GetLSTCameraInterface() (M_GetLSTViewPort()->GetCameraInterface())
|
||||
#define M_GetLSTCamera() (M_GetLSTViewPort()->GetCamera())
|
||||
// End ALX
|
||||
#define M_GetLSTEvtEditor() (m_p_oDevice->GetInterface())
|
||||
#define M_GetFocusDevice() (GetDevice()->GetFocusDevice())
|
||||
#define M_RedrawAll() (M_GetLSTEvtEditor()->fn_vUpdateAll(E_mc_JustDraw))
|
||||
#define MAKE_RGB(r,g,b) (((r&0xff)<<16)+((g&0xff)<<8)+(b&0xff))
|
||||
|
||||
/*****************************************************************************
|
||||
CONSTANTS
|
||||
*****************************************************************************/
|
||||
static long C_lGridColor = MAKE_RGB(255,255,255); // Color of grid
|
||||
static long C_lSelColor = MAKE_RGB(0,128,0); // Color of box selection
|
||||
|
||||
#define C_xNbLines 5
|
||||
#define C_xLineWidth MTH_M_xFloatToReal(1000)
|
||||
|
||||
#define C_xDefaultSphereRadius MTH_M_xFloatToReal(0.1)
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Constructor
|
||||
//--------------------------------------------------------------------------------------
|
||||
CPA_Grid::CPA_Grid(CPA_KeyActionConfiguration *p_oKeyboard, DEV_MultiDevice3D *p_oDevice /*=NULL*/) : CPA_Contact(p_oDevice)
|
||||
{
|
||||
m_p_oMultiDevice = NULL;
|
||||
m_wNbOfColumns = 0;
|
||||
m_wNbOfRows = 0;
|
||||
m_xMaxSphereBoxRadius = 0;
|
||||
m_xGridSquareSize = 0;
|
||||
m_xFirstCenterX = 0;
|
||||
m_xFirstCenterZ = 0;
|
||||
m_xLastCenterX = 0;
|
||||
m_xLastCenterZ = 0;
|
||||
m_bShowSelection = TRUE;
|
||||
m_bShowGrid = TRUE;
|
||||
|
||||
// Keys
|
||||
m_p_oKeyboard = p_oKeyboard;
|
||||
m_bNavigationMode = FALSE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Create grid for receiving current World
|
||||
// ----------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vPositionWorldOnGrid(void)
|
||||
{
|
||||
if(M_GetLSTWorld() == NULL)
|
||||
return;
|
||||
|
||||
m_fn_vComputeRowColumn();
|
||||
if(!m_wNbOfRows || !m_wNbOfColumns)
|
||||
return;
|
||||
|
||||
m_fn_vComputeMaxSphereBoxRadius();
|
||||
m_fn_vComputeFirstAndLastCenters();
|
||||
m_fn_vComputeObjectsPosition();
|
||||
m_fn_vCenterOnGrid();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Compute the position of each objects, and move them.
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vComputeObjectsPosition(void)
|
||||
{
|
||||
CPA_SuperObject *p_oEdList = M_GetLSTWorld() -> GetRoot();
|
||||
POSITION stPos = p_oEdList -> GetHeadPosition();
|
||||
CPA_SuperObject *p_oEdChild = p_oEdList -> GetSuperObjectFirstChild();
|
||||
short wRow = 0;
|
||||
short wColumn = 0;
|
||||
|
||||
while(p_oEdChild)
|
||||
{
|
||||
POS_tdxHandleToPosition _hMatrix;
|
||||
GLI_tdstSphere *p_stSphere = NULL;
|
||||
MTH3D_tdstVector st3DCenter,st3DPosition;
|
||||
MTH3D_tdstVector stTranslation;
|
||||
|
||||
m_fn_vConvertRowColumnTo3D(wRow, wColumn, &st3DPosition);
|
||||
_hMatrix = HIE_fn_hGetSuperObjectMatrix(p_oEdChild->GetStruct());
|
||||
POS_fn_vSetIdentityMatrix(_hMatrix);
|
||||
|
||||
POS_fn_vGetTranslationVector(_hMatrix, &stTranslation);
|
||||
// First, centred with sphere box center
|
||||
//p_stSphere = HIE_fn_hGetSuperObjectSphere(p_oEdChild->GetStruct());
|
||||
if( m_fn_bGetSphereBoxCenter( p_oEdChild, &st3DCenter ) )
|
||||
{
|
||||
MTH3D_M_vSubVector(&stTranslation, &stTranslation, &st3DCenter);
|
||||
}
|
||||
// Second, place the object
|
||||
MTH3D_M_vAddVector(&stTranslation, &stTranslation, &st3DPosition);
|
||||
|
||||
POS_fn_vSetTranslationVector(_hMatrix, &stTranslation);
|
||||
|
||||
// Force the absolute matrix to be recalculated
|
||||
POS_fn_vNormalizeMatrix(_hMatrix);
|
||||
|
||||
wColumn = (wColumn + 1) % m_wNbOfColumns;
|
||||
if(wColumn == 0)
|
||||
wRow++;
|
||||
|
||||
p_oEdChild = p_oEdList->GetSuperObjectNextChild( p_oEdChild );
|
||||
}
|
||||
}
|
||||
|
||||
//======================================================================================
|
||||
//
|
||||
// SPECIAL METHODS
|
||||
//
|
||||
//======================================================================================
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Reset content
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vResetContent(void)
|
||||
{
|
||||
// No grid
|
||||
m_wNbOfRows = 0; // No rows
|
||||
m_wNbOfColumns = 0; // No columns
|
||||
m_bShowSelection = FALSE; // No current selection
|
||||
m_xMaxSphereBoxRadius = 0; // No object, so no max sphere box radius
|
||||
}
|
||||
|
||||
//======================================================================================
|
||||
//
|
||||
// GRID
|
||||
//
|
||||
//======================================================================================
|
||||
|
||||
//======================================================================================
|
||||
// COMPUTING
|
||||
//======================================================================================
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Convert a row and column to a 3D position. (square center)
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vConvertRowColumnTo3D(short _wRow, short _wColumn, MTH3D_tdstVector *_p_stVxCenter)
|
||||
{
|
||||
MTH3D_M_vSetVectorElements(_p_stVxCenter, - m_xFirstCenterX + MTH_M_xMul(m_xGridSquareSize,_wColumn)
|
||||
, 0
|
||||
, m_xFirstCenterZ - MTH_M_xMul(m_xGridSquareSize,_wRow));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// compute center of square of given SuperObject
|
||||
// ----------------------------------------------------------------------------
|
||||
/*
|
||||
void CPA_Grid::m_fn_vComputeCenterOfSuperObject(CPA_SuperObject *_p_SprObj, MTH3D_tdstVector *_p_stVxCenter)
|
||||
{
|
||||
short wRow, wColumn;
|
||||
|
||||
// Compute row and column of selection
|
||||
m_fn_vComputeGridPosOfSuperObject(_p_SprObj, &wRow, &wColumn);
|
||||
m_fn_vConvertRowColumnTo3D(wRow, wColumn, _p_stVxCenter);
|
||||
}
|
||||
*/
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Compute the m_xMaxSphereBoxRadius that is the maximum sphere box radius of all
|
||||
// the displayed objects. It is used to compute the size of a rectangle of the grid.
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vComputeMaxSphereBoxRadius(void)
|
||||
{
|
||||
CPA_SuperObject *p_oEdList = M_GetLSTWorld()->GetRoot();
|
||||
|
||||
m_xMaxSphereBoxRadius = 0;
|
||||
CPA_SuperObject *p_oEdChild = p_oEdList->GetSuperObjectFirstChild();
|
||||
while(p_oEdChild)
|
||||
{
|
||||
MTH_tdxReal xRadius = m_fn_xGetSphereBoxRadius(p_oEdChild);
|
||||
m_xMaxSphereBoxRadius = MTH_M_xMax( m_xMaxSphereBoxRadius, xRadius);
|
||||
p_oEdChild = p_oEdList->GetSuperObjectNextChild( p_oEdChild );
|
||||
}
|
||||
m_xGridSquareSize = MTH_M_xAdd(m_xMaxSphereBoxRadius,m_xMaxSphereBoxRadius);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Compute the sphere box radius of an object
|
||||
//--------------------------------------------------------------------------------------
|
||||
MTH_tdxReal CPA_Grid::m_fn_xGetSphereBoxRadius(CPA_SuperObject *_p_oSprObj)
|
||||
{
|
||||
MTH_tdxReal xResult = 0;
|
||||
CPA_BaseObject *p_oObject = _p_oSprObj -> GetObject();
|
||||
|
||||
if( p_oObject )
|
||||
{
|
||||
MTH3D_tdstVector stCenter;
|
||||
|
||||
ACP_tdxHandleOfObject hObj = ((CPA_ObjectDLLBase*)p_oObject -> GetEditor()) -> fn_hGetBoundingVolume( p_oObject );
|
||||
if( hObj )
|
||||
//ANNECY TQ 22/06/98{
|
||||
GEO_fn_vGetInfoFromGeometricSphere( &stCenter, &xResult, hObj );
|
||||
//ENDANNECY TQ}
|
||||
|
||||
}
|
||||
return xResult;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Compute the sphere box center of an object
|
||||
//--------------------------------------------------------------------------------------
|
||||
BOOL CPA_Grid::m_fn_bGetSphereBoxCenter(CPA_SuperObject *_p_oSprObj, MTH3D_tdstVector *_p_stCenter)
|
||||
{
|
||||
CPA_BaseObject *p_oObject = _p_oSprObj -> GetObject();
|
||||
|
||||
if( p_oObject )
|
||||
{
|
||||
MTH_tdxReal xResult;
|
||||
|
||||
ACP_tdxHandleOfObject hObj = ((CPA_ObjectDLLBase*)p_oObject -> GetEditor()) -> fn_hGetBoundingVolume( p_oObject );
|
||||
if( hObj )
|
||||
{
|
||||
//ANNECY TQ 22/06/98{
|
||||
GEO_fn_vGetInfoFromGeometricSphere( _p_stCenter, &xResult, hObj );
|
||||
//ENDANNECY TQ}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Compute distances between center of grid and first and last object in grid.
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vComputeFirstAndLastCenters(void)
|
||||
{
|
||||
// First center
|
||||
m_xFirstCenterX = MTH_M_xSub(MTH_M_xDiv(MTH_M_xMul(m_wNbOfColumns, m_xGridSquareSize), 2), m_xMaxSphereBoxRadius);
|
||||
m_xFirstCenterZ = MTH_M_xSub(MTH_M_xDiv(MTH_M_xMul(m_wNbOfRows, m_xGridSquareSize), 2), m_xMaxSphereBoxRadius);
|
||||
|
||||
// Last center
|
||||
m_xLastCenterX = - m_xFirstCenterX + (MTH_M_xMul(m_xGridSquareSize, (m_wNbOfColumns - 1)));
|
||||
m_xLastCenterZ = m_xFirstCenterZ - (MTH_M_xMul(m_xGridSquareSize, (m_wNbOfRows - 1)));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Compute number of row and columns
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vComputeRowColumn(void)
|
||||
{
|
||||
int iCount = M_GetLSTWorld() -> GetRoot() -> GetCount();
|
||||
/*
|
||||
m_wNbOfRows = m_wNbOfColumns = 0;
|
||||
if(iCount)
|
||||
{
|
||||
m_wNbOfRows = ((short) sqrt((double) iCount)) + 1;
|
||||
m_wNbOfColumns = m_wNbOfRows;
|
||||
}
|
||||
*/
|
||||
if( iCount > 0 )
|
||||
{
|
||||
m_wNbOfRows = (short)floor(sqrt((double)iCount));
|
||||
m_wNbOfColumns = iCount / m_wNbOfRows ;
|
||||
|
||||
while( m_wNbOfColumns * m_wNbOfRows < iCount )
|
||||
{
|
||||
if( m_wNbOfRows < m_wNbOfColumns )
|
||||
m_wNbOfRows++;
|
||||
else
|
||||
m_wNbOfColumns++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_wNbOfRows = m_wNbOfColumns = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Reset the selection
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vCompute3DPosOfSuperObject(CPA_SuperObject *_p_SprObj,MTH_tdxReal *_p_xLeftX, MTH_tdxReal *_p_xTopZ,
|
||||
MTH_tdxReal *_p_xRightX, MTH_tdxReal *_p_xBottomZ,
|
||||
MTH_tdxReal *_p_xXL, MTH_tdxReal *_p_xZL)
|
||||
{
|
||||
MTH_tdxReal xLeftX = - m_xFirstCenterX - m_xMaxSphereBoxRadius;
|
||||
MTH_tdxReal xTopZ = m_xFirstCenterZ + m_xMaxSphereBoxRadius;
|
||||
MTH_tdxReal xRightX = m_xLastCenterX + m_xMaxSphereBoxRadius;
|
||||
MTH_tdxReal xBottomZ = m_xLastCenterZ - m_xMaxSphereBoxRadius;
|
||||
short wSelRow, wSelColumn;
|
||||
|
||||
// Compute row and column of selection
|
||||
m_fn_vComputeGridPosOfSuperObject(_p_SprObj, &wSelRow, &wSelColumn);
|
||||
// Compute coordinates of selection box
|
||||
*_p_xLeftX = MTH_M_xAdd(xLeftX, MTH_M_xMul(wSelColumn, m_xGridSquareSize));
|
||||
*_p_xTopZ = MTH_M_xSub(xTopZ, MTH_M_xMul(wSelRow, m_xGridSquareSize));
|
||||
*_p_xRightX = MTH_M_xAdd(*_p_xLeftX, m_xGridSquareSize);
|
||||
*_p_xBottomZ = MTH_M_xSub(*_p_xTopZ, m_xGridSquareSize);
|
||||
|
||||
*_p_xZL = MTH_M_xDiv(m_xGridSquareSize,C_xLineWidth);
|
||||
*_p_xXL = MTH_M_xDiv(m_xGridSquareSize,C_xLineWidth);
|
||||
|
||||
*_p_xLeftX += MTH_M_xMul(*_p_xXL,C_xNbLines);
|
||||
*_p_xTopZ -= MTH_M_xMul(*_p_xZL,C_xNbLines);
|
||||
*_p_xRightX -= MTH_M_xMul(*_p_xXL,C_xNbLines);
|
||||
*_p_xBottomZ += MTH_M_xMul(*_p_xZL,C_xNbLines);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// search column and row of given SuperObject
|
||||
// ----------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vComputeGridPosOfSuperObject(CPA_SuperObject *_p_SprObj,short *_p_wRow,short *_p_wColumn)
|
||||
{
|
||||
CPA_SuperObject *p_oEdList = M_GetLSTWorld()->GetRoot();
|
||||
CPA_SuperObject *p_oChild = p_oEdList->GetSuperObjectFirstChild();
|
||||
BOOL bFound = FALSE;
|
||||
|
||||
*_p_wRow = 0;
|
||||
*_p_wColumn = 0;
|
||||
while(p_oChild && !bFound)
|
||||
{
|
||||
if(p_oChild == _p_SprObj)
|
||||
bFound = TRUE;
|
||||
else
|
||||
{
|
||||
*_p_wColumn = (*_p_wColumn + 1) % m_wNbOfColumns;
|
||||
if(*_p_wColumn == 0)
|
||||
(*_p_wRow)++;
|
||||
}
|
||||
p_oChild = p_oEdList->GetSuperObjectNextChild(p_oChild);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// To see all the grid in the window.
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vCenterOnGrid(void)
|
||||
{
|
||||
CPA_CameraDLLBase *p_oCameraInterface = M_GetLSTCameraInterface();
|
||||
CPA_BaseObject *p_oCamera = M_GetLSTCamera();
|
||||
MTH_tdxReal xRadius = MTH_M_xMul(m_wNbOfColumns, m_xMaxSphereBoxRadius);
|
||||
MTH_tdxReal xAlphaX,xRatio;
|
||||
CPA_CameraCoords CameraCoords;
|
||||
|
||||
GLI_xGetCameraAspectAndRatio((GLI_tdxHandleToCamera)p_oCamera->GetData(),&xAlphaX,&xRatio);
|
||||
|
||||
/*
|
||||
float fD1 = MTH_M_xRealToFloat(MTH_M_xDiv(xRadius, MTH_M_xTan(MTH_M_xDiv(xAlphaX,2))));
|
||||
float fD2 = MTH_M_xRealToFloat(MTH_M_xDiv(xRadius, MTH_M_xTan(MTH_M_xDiv(MTH_M_xMul(xAlphaX,xRatio),2))));
|
||||
|
||||
xRadius = ((fD1 > fD2)? fD1 : fD2);
|
||||
*/
|
||||
// target camera
|
||||
CameraCoords . SetXYZ( 0, 0, 0 );
|
||||
CameraCoords . SetAxisSystem( WorldCoordinates );
|
||||
p_oCameraInterface -> SetTargetPoint( p_oCamera , &CameraCoords );
|
||||
p_oCameraInterface -> SetTargetType (p_oCamera , tPoint );
|
||||
// position camera
|
||||
CameraCoords . SetXYZ( 0, -xRadius, 0 );
|
||||
CameraCoords . SetAxisSystem( WorldCoordinates );
|
||||
p_oCameraInterface -> SetPosition( p_oCamera , &CameraCoords );
|
||||
|
||||
// Free camera
|
||||
p_oCameraInterface -> SetTargetType( p_oCamera , tNone );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Center on current selected object.
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vCenterOnSuperObject(CPA_SuperObject *_p_SprObj)
|
||||
{
|
||||
/*
|
||||
MTH3D_tdstVector stVertex;
|
||||
|
||||
CPA_Camera *p_oCamera = M_GetLSTCamera();
|
||||
MTH_tdxReal xAlphaX,xRatio;
|
||||
|
||||
GLI_xGetCameraAspectAndRatio(p_oCamera->GetEngineCamera(),&xAlphaX,&xRatio);
|
||||
GLI_tdstSphere *p_stSphere = HIE_fn_hGetSuperObjectSphere(_p_SprObj->GetStruct());
|
||||
MTH_tdxReal xRadius = (p_stSphere ? p_stSphere->xRadius : C_xDefaultSphereRadius );
|
||||
float fD1 = MTH_M_xRealToFloat(MTH_M_xDiv(xRadius, MTH_M_xTan(MTH_M_xDiv(xAlphaX,2))));
|
||||
float fD2 = MTH_M_xRealToFloat(MTH_M_xDiv(xRadius, MTH_M_xTan(MTH_M_xDiv(MTH_M_xMul(xAlphaX,xRatio),2))));
|
||||
|
||||
xRadius = ((fD1 > fD2)? fD1 : fD2);
|
||||
|
||||
POS_fn_vGetTranslationVector(HIE_fn_hGetSuperObjectGlobalMatrix(_p_SprObj->GetStruct()), &stVertex);
|
||||
MTH3D_M_vGetVectorElements(&p_oCamera->m_fPosX, &p_oCamera->m_fPosY, &p_oCamera->m_fPosZ, &stVertex);
|
||||
p_oCamera->m_fPosY = -xRadius;
|
||||
p_oCamera->SetMode(p_oCamera->Free);
|
||||
p_oCamera->UpdateAbsolute();
|
||||
*/
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// search square picked
|
||||
// ----------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vComputePickedSquare(GLI_tdst2DVertex *_p_st2DMousePos, short *_p_wRow, short *_p_wColumn)
|
||||
{
|
||||
MTH3D_tdstVector st3DMouse ;
|
||||
MTH_tdxReal xLeftX = - m_xFirstCenterX - m_xMaxSphereBoxRadius;
|
||||
MTH_tdxReal xTopZ = m_xFirstCenterZ + m_xMaxSphereBoxRadius;
|
||||
|
||||
// compute clipping point on grid plane
|
||||
m_fn_vGetPosOnGridPlane(M_GetLSTViewPort()->m_hDisplayDevice,M_GetLSTViewPort()->m_hDisplayViewport,_p_st2DMousePos,&st3DMouse);
|
||||
|
||||
*_p_wRow = 0;
|
||||
*_p_wColumn = 0;
|
||||
|
||||
// compute column
|
||||
while( st3DMouse.xX > xLeftX )
|
||||
{
|
||||
(*_p_wColumn)++;
|
||||
xLeftX += m_xGridSquareSize;
|
||||
}
|
||||
|
||||
(*_p_wColumn)--;
|
||||
|
||||
// compute row
|
||||
while( st3DMouse.xZ < xTopZ )
|
||||
{
|
||||
(*_p_wRow)++;
|
||||
xTopZ -= m_xGridSquareSize;
|
||||
}
|
||||
|
||||
(*_p_wRow)--;
|
||||
|
||||
if( (*_p_wRow <0) || (*_p_wRow>=m_wNbOfRows) || (*_p_wColumn<0) || (*_p_wColumn>=m_wNbOfColumns))
|
||||
// out of grid
|
||||
*_p_wRow = *_p_wColumn = -1;
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// search point picked on grid plane
|
||||
// ----------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vGetPosOnGridPlane(GLD_tdhDevice hDev, GLD_tdhViewport hVp,
|
||||
GLI_tdst2DVertex *_p_st2DMousePos,
|
||||
MTH3D_tdstVector *p_stDstVertex)
|
||||
{
|
||||
GLD_tdstViewportAttributes stViewAttrib;
|
||||
|
||||
if(GLD_bGetViewportAttributes( hDev, hVp, &stViewAttrib ))
|
||||
{
|
||||
GLI_tdstSpecificAttributesFor3D *p_stSpecAttrib3D = (GLI_tdstSpecificAttributesFor3D *)stViewAttrib.p_vSpecificToXD;
|
||||
POS_tdstCompletePosition stMatrix, stInvMatrix ;
|
||||
MTH3D_tdstVector stPosCam,stPosClip;
|
||||
GLI_tdstEqPlan stPlan;
|
||||
|
||||
POS_fn_vSetIdentityMatrix(&stInvMatrix);
|
||||
POS_fn_vSetIdentityMatrix(&stMatrix);
|
||||
// get picked position
|
||||
PIC_vMouse3DScreen(hDev, hVp, _p_st2DMousePos, &stPosClip);
|
||||
|
||||
// get camera position
|
||||
GLI_xGetCameraMatrix ( p_stSpecAttrib3D->p_stCam , &stMatrix );
|
||||
POS_fn_vInvertMatrix( &stInvMatrix , &stMatrix );
|
||||
POS_fn_vGetTranslationVector( &stInvMatrix, &stPosCam );
|
||||
// get grid plane equation
|
||||
GLI_vDefinePlanEquation( &stPlan , MTH_M_xFloatToReal(0.0) ,
|
||||
MTH_M_xFloatToReal(1.0) ,
|
||||
MTH_M_xFloatToReal(0.0) ,
|
||||
MTH_M_xFloatToReal(0.0) );
|
||||
// compute intersection
|
||||
GLI_bIntersectionPlanDroite( &stPlan , &stPosCam, &stPosClip, p_stDstVertex) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//======================================================================================
|
||||
// DISPLAY
|
||||
//======================================================================================
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Display grid and selection
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vDisplay(GLD_tdstViewportAttributes *_p_stViewAttrib)
|
||||
{
|
||||
// There's not gris yet
|
||||
if (!m_wNbOfRows || !m_wNbOfColumns || (!m_bShowGrid && !m_bShowSelection))
|
||||
return;
|
||||
|
||||
// Load camera matrix
|
||||
POS_tdstCompletePosition stMatrix;
|
||||
POS_fn_vSetIdentityMatrix(&stMatrix);
|
||||
|
||||
GLI_xGetCameraMatrix(((GLI_tdstSpecificAttributesFor3D*)(_p_stViewAttrib->p_vSpecificToXD))->p_stCam,&stMatrix);
|
||||
GLI_xLoadMatrix(&stMatrix);
|
||||
|
||||
if(m_bShowGrid)
|
||||
m_fn_vDisplayGrid(_p_stViewAttrib);
|
||||
if(m_bShowSelection)
|
||||
m_fn_vDisplaySelection(_p_stViewAttrib);
|
||||
GLI_xPopMatrix();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Display grid
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vDisplayGrid(GLD_tdstViewportAttributes *_p_stViewAttrib)
|
||||
{
|
||||
MTH_tdxReal xLeftX = - m_xFirstCenterX - m_xMaxSphereBoxRadius;
|
||||
MTH_tdxReal xTopZ = m_xFirstCenterZ + m_xMaxSphereBoxRadius;
|
||||
MTH_tdxReal xRightX = m_xLastCenterX + m_xMaxSphereBoxRadius;
|
||||
MTH_tdxReal xBottomZ = m_xLastCenterZ - m_xMaxSphereBoxRadius;
|
||||
MTH_tdxReal xXL = MTH_M_xDiv(m_xGridSquareSize,C_xLineWidth);
|
||||
MTH_tdxReal xZL = MTH_M_xDiv(m_xGridSquareSize,C_xLineWidth);
|
||||
MTH_tdxReal xTopZE = MTH_M_xSub(xTopZ,MTH_M_xMul(xXL,C_xNbLines));
|
||||
MTH_tdxReal xBottomZE = MTH_M_xAdd(xBottomZ,MTH_M_xMul(xXL,C_xNbLines));
|
||||
MTH_tdxReal xLeftXE = MTH_M_xSub(xLeftX,MTH_M_xMul(xZL,C_xNbLines));
|
||||
MTH_tdxReal xRightXE = MTH_M_xAdd(xRightX,MTH_M_xMul(xZL,C_xNbLines));
|
||||
MTH_tdxReal xX, xZ;
|
||||
MTH3D_tdstVector stVxA, stVxB;
|
||||
MTH3D_tdstVector stDepl;
|
||||
WORD wLine;
|
||||
|
||||
// Vertical lines
|
||||
xX = xLeftXE;
|
||||
MTH3D_M_vNullVector(&stDepl);
|
||||
MTH3D_M_vSetXofVector(&stDepl,xXL);
|
||||
for (wLine = 0; wLine < (m_wNbOfColumns + 1); wLine++)
|
||||
{
|
||||
MTH3D_M_vSetVectorElements(&stVxA, xX, 0.0, xTopZE);
|
||||
MTH3D_M_vSetVectorElements(&stVxB, xX, 0.0, xBottomZE);
|
||||
m_fn_vDrawOneLine(_p_stViewAttrib,C_lGridColor,&stVxA,&stVxB,&stDepl,C_xNbLines<<1);
|
||||
xX += m_xGridSquareSize;
|
||||
}
|
||||
|
||||
// Horizontal lines
|
||||
xZ = xTopZE;
|
||||
MTH3D_M_vNullVector(&stDepl);
|
||||
MTH3D_M_vSetZofVector(&stDepl,xZL);
|
||||
for (wLine = 0; wLine < (m_wNbOfRows + 1); wLine++)
|
||||
{
|
||||
MTH3D_M_vSetVectorElements(&stVxA, xLeftXE, 0.0, xZ);
|
||||
MTH3D_M_vSetVectorElements(&stVxB, xRightXE, 0.0, xZ);
|
||||
m_fn_vDrawOneLine(_p_stViewAttrib,C_lGridColor,&stVxA,&stVxB,&stDepl,C_xNbLines<<1);
|
||||
xZ -= m_xGridSquareSize;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Display selection
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vDisplaySelection(GLD_tdstViewportAttributes *_p_stViewAttrib)
|
||||
{
|
||||
if(M_GetLSTEvtEditor())
|
||||
{
|
||||
CPA_List<CPA_SuperObject> *p_List = M_GetLSTWorld()->GetListSelected();
|
||||
POSITION pos = p_List->GetHeadPosition();
|
||||
while(pos)
|
||||
{
|
||||
CPA_SuperObject *p_Obj = p_List->GetNext(pos);
|
||||
|
||||
MTH3D_tdstVector stVxA, stVxB, stDepl;
|
||||
MTH_tdxReal xLeftX,xTopZ,xRightX,xBottomZ;
|
||||
MTH_tdxReal xXL,xZL;
|
||||
MTH_tdxReal xFront;
|
||||
|
||||
m_fn_vCompute3DPosOfSuperObject(p_Obj,&xLeftX,&xTopZ,&xRightX,&xBottomZ,&xXL,&xZL);
|
||||
xFront = -MTH_M_xMul(xXL,50);
|
||||
// horizontal lines
|
||||
MTH3D_M_vNullVector(&stDepl);
|
||||
MTH3D_M_vSetZofVector(&stDepl,-xZL);
|
||||
MTH3D_M_vSetVectorElements(&stVxA, xLeftX, xFront, xTopZ);
|
||||
MTH3D_M_vSetVectorElements(&stVxB, xRightX, xFront, xTopZ);
|
||||
m_fn_vDrawOneLine(_p_stViewAttrib,C_lSelColor,&stVxA,&stVxB,&stDepl,C_xNbLines);
|
||||
MTH3D_M_vSetZofVector(&stDepl,xZL);
|
||||
MTH3D_M_vSetVectorElements(&stVxA, xLeftX, xFront, xBottomZ);
|
||||
MTH3D_M_vSetVectorElements(&stVxB, xRightX, xFront, xBottomZ);
|
||||
m_fn_vDrawOneLine(_p_stViewAttrib,C_lSelColor,&stVxA,&stVxB,&stDepl,C_xNbLines);
|
||||
|
||||
// vertical lines
|
||||
MTH3D_M_vNullVector(&stDepl);
|
||||
MTH3D_M_vSetXofVector(&stDepl,xXL);
|
||||
MTH3D_M_vSetVectorElements(&stVxA, xLeftX, xFront, xTopZ);
|
||||
MTH3D_M_vSetVectorElements(&stVxB, xLeftX, xFront, xBottomZ);
|
||||
m_fn_vDrawOneLine(_p_stViewAttrib,C_lSelColor,&stVxA,&stVxB,&stDepl,C_xNbLines);
|
||||
MTH3D_M_vSetXofVector(&stDepl,-xXL);
|
||||
MTH3D_M_vSetVectorElements(&stVxA, xRightX, xFront, xBottomZ);
|
||||
MTH3D_M_vSetVectorElements(&stVxB, xRightX, xFront, xTopZ);
|
||||
m_fn_vDrawOneLine(_p_stViewAttrib,C_lSelColor,&stVxA,&stVxB,&stDepl,C_xNbLines);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// draw one line
|
||||
// ----------------------------------------------------------------------------
|
||||
void CPA_Grid::m_fn_vDrawOneLine(GLD_tdstViewportAttributes *_p_stViewAttrib, long lColor,
|
||||
MTH3D_tdstVector *_p_stVxA, MTH3D_tdstVector *_p_stVxB,
|
||||
MTH3D_tdstVector *_p_stDepl, ACP_tdxIndex _xNbLines)
|
||||
{
|
||||
for ( ACP_tdxIndex xLarg=0 ; xLarg<_xNbLines ; xLarg++ )
|
||||
{
|
||||
GLI_xDraw3DLine16((GLD_tdstViewportAttributes_*)_p_stViewAttrib, _p_stVxA, _p_stVxB, lColor);
|
||||
MTH3D_M_vAddVector(_p_stVxA, _p_stVxA, _p_stDepl);
|
||||
MTH3D_M_vAddVector(_p_stVxB, _p_stVxB, _p_stDepl);
|
||||
}
|
||||
}
|
||||
|
||||
//======================================================================================
|
||||
//
|
||||
// MESSAGES FROM THE DEVICE
|
||||
//
|
||||
//======================================================================================
|
||||
|
||||
/*===========================================================================
|
||||
KeyDown
|
||||
=========================================================================*/
|
||||
BOOL CPA_Grid::_OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
|
||||
{
|
||||
unsigned short uwAction = m_p_oKeyboard->mfn_uwKeyToAction(nChar);
|
||||
|
||||
// change mode
|
||||
if (uwAction == KA_ID_NAVMODE)
|
||||
{
|
||||
m_bNavigationMode = !m_bNavigationMode;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// navigation mode
|
||||
if (m_bNavigationMode && (M_GetLSTWorld()->GetCountSelected() == 1))
|
||||
{
|
||||
CPA_SuperObject *pEdList = M_GetLSTWorld()->GetRoot();
|
||||
CPA_SuperObject *pSelected = M_GetLSTWorld()->GetSingleSelection();
|
||||
CPA_SuperObject *pNewSelection;
|
||||
int iColumn;
|
||||
|
||||
switch (uwAction)
|
||||
{
|
||||
case KA_ID_LEFT:
|
||||
pNewSelection = pEdList->GetSuperObjectPrevChild(pSelected);
|
||||
if (pNewSelection)
|
||||
m_p_oDevice->GetInterface()->fn_bSelectObject(pNewSelection, FALSE, FALSE);
|
||||
return TRUE;
|
||||
|
||||
case KA_ID_RIGHT:
|
||||
pNewSelection = pEdList->GetSuperObjectNextChild(pSelected);
|
||||
if (pNewSelection)
|
||||
m_p_oDevice->GetInterface()->fn_bSelectObject(pNewSelection, FALSE, FALSE);
|
||||
return TRUE;
|
||||
|
||||
case KA_ID_UP:
|
||||
iColumn = 0;
|
||||
pNewSelection = pSelected;
|
||||
while (iColumn < m_wNbOfColumns && pNewSelection)
|
||||
{
|
||||
pNewSelection = pEdList->GetSuperObjectPrevChild(pNewSelection);
|
||||
iColumn++;
|
||||
}
|
||||
if (pNewSelection && (pNewSelection != pSelected))
|
||||
m_p_oDevice->GetInterface()->fn_bSelectObject(pNewSelection, FALSE, FALSE);
|
||||
return TRUE;
|
||||
|
||||
case KA_ID_DOWN:
|
||||
iColumn = 0;
|
||||
pNewSelection = pSelected;
|
||||
while (iColumn < m_wNbOfColumns && pNewSelection)
|
||||
{
|
||||
pNewSelection = pEdList->GetSuperObjectNextChild(pNewSelection);
|
||||
iColumn++;
|
||||
}
|
||||
if (pNewSelection && (pNewSelection != pSelected))
|
||||
m_p_oDevice->GetInterface()->fn_bSelectObject(pNewSelection, FALSE, FALSE);
|
||||
return TRUE;
|
||||
|
||||
default :
|
||||
return CPA_Contact::_OnKeyDown(nChar, nRepCnt, nFlags);
|
||||
}
|
||||
}
|
||||
|
||||
//key not processed
|
||||
return CPA_Contact::_OnKeyDown(nChar, nRepCnt, nFlags);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// if no object is picked, search if a square is picked
|
||||
//--------------------------------------------------------------------------------------
|
||||
BOOL CPA_Grid::_OnLButtonDown(UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stObject)
|
||||
{
|
||||
BOOL bResult = CPA_Contact::_OnLButtonDown(nFlags, p_stPos, xIndex, p_stObject);
|
||||
|
||||
// if no picking
|
||||
if(!xIndex && m_bShowGrid)
|
||||
{
|
||||
// search object on grid
|
||||
CPA_SuperObject *p_oEdChild = m_fn_p_oGetSuperObjectFromPos( p_stPos );
|
||||
// select object
|
||||
if(p_oEdChild)
|
||||
m_p_oDevice->GetInterface()->fn_vAddSelectedObject(p_oEdChild);
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : return SO on square under pos
|
||||
// ----------------------------------------------------------------------------
|
||||
CPA_SuperObject *CPA_Grid::m_fn_p_oGetSuperObjectFromPos(tdstMousePos *p_stPos)
|
||||
{
|
||||
CPA_SuperObject *p_oEdChild = NULL;
|
||||
short wRow = 0;
|
||||
short wColumn = 0;
|
||||
short wRowPicked,wColumnPicked;
|
||||
|
||||
m_fn_vComputePickedSquare(&(p_stPos->stPos2D),&wRowPicked,&wColumnPicked);
|
||||
// if picking on a square
|
||||
if( (wRowPicked != -1) && (wColumnPicked != -1) )
|
||||
{
|
||||
CPA_SuperObject *p_oEdList = M_GetLSTWorld()->GetRoot();
|
||||
p_oEdChild = p_oEdList->GetSuperObjectFirstChild();
|
||||
// search object piched
|
||||
while( (p_oEdChild) && !((wColumn == wColumnPicked) && (wRow == wRowPicked)) )
|
||||
{
|
||||
wColumn = (wColumn + 1) % m_wNbOfColumns;
|
||||
if(wColumn == 0)
|
||||
wRow = wRow + 1;
|
||||
p_oEdChild = p_oEdList->GetSuperObjectNextChild(p_oEdChild);
|
||||
}
|
||||
}
|
||||
return p_oEdChild;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Call to draw something in the viewport.
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CPA_Grid::fn_vAddObjectsToDraw( GLD_tdstViewportAttributes *_p_stViewAttrib, GLI_tdxHandleToLight _p_stLight,DEV_ViewPort *p3)
|
||||
{
|
||||
/*
|
||||
MTH_tdxReal xMaxSphereBoxRadiusBackup = m_xMaxSphereBoxRadius;
|
||||
|
||||
// if object size has changed, must compute new size of grid
|
||||
m_fn_vComputeMaxSphereBoxRadius();
|
||||
if(xMaxSphereBoxRadiusBackup != m_xMaxSphereBoxRadius)
|
||||
{
|
||||
m_fn_vComputeFirstAndLastCenters();
|
||||
m_fn_vComputeObjectsPosition();
|
||||
m_fn_vCenterOnGrid();
|
||||
}
|
||||
*/
|
||||
if(_p_stViewAttrib)
|
||||
m_fn_vDisplay(_p_stViewAttrib);
|
||||
CPA_Contact::fn_vAddObjectsToDraw(_p_stViewAttrib,_p_stLight,p3);
|
||||
}
|
||||
|
||||
#endif //ACTIVE_EDITOR
|
627
Rayman_X/cpa/tempgrp/T3D/src/DlgVwCt.cpp
Normal file
@@ -0,0 +1,627 @@
|
||||
// DlgVwCt.h : implementation file
|
||||
//
|
||||
|
||||
//#undef _DEBUG
|
||||
#include "stdafx.h"
|
||||
//#define _DEBUG
|
||||
|
||||
// ALX
|
||||
#include "ACP_Base.h"
|
||||
#define HieFriend
|
||||
#include "incGam.h"
|
||||
#include "Itf.h"
|
||||
/*
|
||||
#include "ACP_Base.h"
|
||||
#include "CPALib.h"
|
||||
*/
|
||||
// End ALX
|
||||
#include "DlgVwCt.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// MACROS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#define M_LBContent() ((CListBox*) GetDlgItem(IDC_LIST_CONTENT) )
|
||||
#define M_LBChoice() ((CListBox*) GetDlgItem(IDC_LIST_CHOICE) )
|
||||
#define M_CBType() ((CComboBox*) GetDlgItem(IDC_COMBO_TYPE) )
|
||||
#define M_CTChoice() ((CTreeCtrl*) GetDlgItem(IDC_TREE_HIERARCHY) )
|
||||
|
||||
#define M_ClientRect( pWnd, poRect ) \
|
||||
(pWnd) -> GetWindowRect( poRect ); \
|
||||
ScreenToClient( poRect );
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// MACROS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#define C_iBorderSize 10
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgViewerContent dialog
|
||||
|
||||
|
||||
CDlgViewerContent::CDlgViewerContent(CPA_MainWorld *_p_oMainWorld, CPA_List<tdst_VW_ObjInfo> *_p_oListOfInitialObjects,CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgViewerContent::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgViewerContent)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
m_p_oMainWorld = _p_oMainWorld;
|
||||
m_p_oListOfInitialObjects = _p_oListOfInitialObjects;
|
||||
m_ocstTreeName = "";
|
||||
m_bTreeUsed = FALSE;
|
||||
//
|
||||
m_oBmpEdNoObject.LoadBitmap( IDB_EDIT_NOOBJECT );
|
||||
m_oBmpEdSupObj.LoadBitmap( IDB_EDIT_SUPOBJ );
|
||||
m_oBmpNoEdNoObject.LoadBitmap( IDB_NOEDIT_NOOBJECT );
|
||||
m_oBmpNoEdSupObj.LoadBitmap( IDB_NOEDIT_SUPOBJ );
|
||||
m_oBmpPEdNoObject.LoadBitmap( IDB_PEDIT_NOOBJECT );
|
||||
m_oBmpPEdSupObj.LoadBitmap( IDB_PEDIT_SUPOBJ );
|
||||
m_oBmpPNoEdNoObject.LoadBitmap( IDB_PNOEDIT_NOOBJECT );
|
||||
m_oBmpPNoEdSupObj.LoadBitmap( IDB_PNOEDIT_SUPOBJ );
|
||||
}
|
||||
|
||||
CDlgViewerContent::~CDlgViewerContent()
|
||||
{
|
||||
m_oBmpEdNoObject.DeleteObject();
|
||||
m_oBmpEdSupObj.DeleteObject();
|
||||
m_oBmpNoEdNoObject.DeleteObject();
|
||||
m_oBmpNoEdSupObj.DeleteObject();
|
||||
m_oBmpPEdNoObject.DeleteObject();
|
||||
m_oBmpPEdSupObj.DeleteObject();
|
||||
m_oBmpPNoEdNoObject.DeleteObject();
|
||||
m_oBmpPNoEdSupObj.DeleteObject();
|
||||
}
|
||||
|
||||
void CDlgViewerContent::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgViewerContent)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgViewerContent, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgViewerContent)
|
||||
ON_WM_SIZE()
|
||||
ON_WM_GETMINMAXINFO()
|
||||
ON_BN_CLICKED(ID_BT_DELETE, OnBtdelete)
|
||||
ON_BN_CLICKED(ID_BT_ADD, OnBtadd)
|
||||
ON_CBN_SELCHANGE(IDC_COMBO_TYPE, OnSelchangeComboType)
|
||||
ON_LBN_DBLCLK(IDC_LIST_CHOICE, OnDblClkListObjects)
|
||||
ON_LBN_DBLCLK(IDC_LIST_CONTENT, OnDblclkListContent)
|
||||
ON_BN_CLICKED(ID_BT_OPEN, OnBtOpen)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgViewerContent message handlers
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description :
|
||||
//--------------------------------------------------------------------------------
|
||||
BOOL CDlgViewerContent::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
CListBox *pLB = M_LBContent();
|
||||
|
||||
pLB -> ResetContent();
|
||||
// fill Content ListBox
|
||||
POSITION stPos = m_p_oListOfInitialObjects -> GetHeadPosition();
|
||||
while ( stPos )
|
||||
{
|
||||
tdst_VW_ObjInfo *p_stVWOI = m_p_oListOfInitialObjects -> GetNext ( stPos );
|
||||
CPA_SuperObject *p_oSprObj = p_stVWOI -> m_p_oSuperObject;
|
||||
CPA_BaseObject *p_oObject = p_oSprObj -> GetObject();
|
||||
|
||||
int iIndex = pLB -> AddString ( p_oObject -> GetName() ) ; // Object Name
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData ( iIndex, (DWORD) p_oSprObj ) ; // Super_Object pointer
|
||||
}
|
||||
GetDlgItem( ID_BT_OPEN ) -> EnableWindow( pLB -> GetCount() );
|
||||
|
||||
// fill Type ComboBox & Choice ListBox
|
||||
M_CBType() -> ResetContent();
|
||||
// add Actor Type
|
||||
mfn_vAddListOfType( "Actor", "Actors" );
|
||||
// add Geometric type
|
||||
mfn_vAddListOfType( "Geometric", "Geometric Objects" );
|
||||
// add Hierarchy Tree
|
||||
mfn_vAddHierarchyTree( "Hierarchy" );
|
||||
|
||||
// select hierarchy
|
||||
if( M_CBType() -> SelectString( -1, "Hierarchy" ) != LB_ERR )
|
||||
mfn_vShowHierarchyTree();
|
||||
else
|
||||
M_CBType() -> SetCurSel( -1 );
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgViewerContent::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
if( pMsg->message == WM_KEYDOWN )
|
||||
{
|
||||
CListBox *pLBChoice = M_LBChoice();
|
||||
CListBox *pLBContent = M_LBContent();
|
||||
CTreeCtrl *pTree = M_CTChoice();
|
||||
HTREEITEM hCurItem = pTree -> GetSelectedItem();
|
||||
|
||||
if( ( ( (int)pMsg -> wParam) == VK_INSERT ) &&
|
||||
( ( ( pLBChoice -> GetSelCount() > 0 ) && ( pMsg->hwnd == pLBChoice -> m_hWnd ) ) ||
|
||||
( ( pTree -> GetSelectedItem() ) && ( pMsg->hwnd == pTree -> m_hWnd ) )
|
||||
)
|
||||
)
|
||||
{
|
||||
OnBtadd();
|
||||
}
|
||||
else if ( ( ((int)pMsg -> wParam) == VK_DELETE ) && ( pLBContent -> GetSelCount() > 0 ) && ( pMsg->hwnd == pLBContent -> m_hWnd ) )
|
||||
{
|
||||
OnBtdelete();
|
||||
}
|
||||
}
|
||||
return CDialog::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_SIZE
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
CDialog::OnSize(nType, cx, cy);
|
||||
|
||||
if(GetDlgItem(IDC_LIST_CHOICE))
|
||||
{
|
||||
CRect oRectDlg, oRectLBContent, oRectLBChoice, oRectCT, oRectCB;
|
||||
CRect oRectBTAdd, oRectBTOK, oRectBTDel, oRectBTCancel, oRectBTOpen;
|
||||
CSize oSize;
|
||||
|
||||
// get size and position
|
||||
GetClientRect( &oRectDlg );
|
||||
|
||||
M_ClientRect( M_LBChoice(), &oRectLBChoice );
|
||||
M_ClientRect( M_CTChoice(), &oRectCT );
|
||||
M_ClientRect( M_LBContent(), &oRectLBContent );
|
||||
M_ClientRect( M_CBType(), &oRectCB );
|
||||
M_ClientRect( GetDlgItem( ID_BT_ADD ), &oRectBTAdd );
|
||||
M_ClientRect( GetDlgItem( ID_BT_DELETE ), &oRectBTDel );
|
||||
M_ClientRect( GetDlgItem( IDOK ), &oRectBTOK );
|
||||
M_ClientRect( GetDlgItem( IDCANCEL ), &oRectBTCancel );
|
||||
M_ClientRect( GetDlgItem( ID_BT_OPEN ), &oRectBTOpen );
|
||||
|
||||
// resize
|
||||
// place BT 'Cancel' 'Delete' & 'OK'
|
||||
oSize = oRectBTCancel . Size();
|
||||
oRectBTCancel . bottom = oRectDlg . bottom - C_iBorderSize;
|
||||
oRectBTCancel . top = oRectBTCancel . bottom - oSize . cy;
|
||||
oRectBTOK . bottom = oRectBTOpen . bottom = oRectBTCancel . bottom;
|
||||
oRectBTOK . top = oRectBTOpen . top = oRectBTCancel . top;
|
||||
oSize = oRectBTCancel . Size();
|
||||
oRectBTCancel . right = oRectDlg . right - C_iBorderSize;
|
||||
oRectBTCancel . left = oRectBTCancel . right - oSize.cx;
|
||||
oSize = oRectBTOpen . Size();
|
||||
oRectBTOpen . left = ( oRectBTCancel . left + oRectBTOK . left ) >> 1;
|
||||
oRectBTOpen . right = oRectBTOpen . left + oSize.cx;
|
||||
// translate LBContent
|
||||
oSize = oRectLBContent . Size();
|
||||
oRectLBContent . right = oRectDlg . right - C_iBorderSize;
|
||||
oRectLBContent . left = oRectLBContent . right - oSize.cx;
|
||||
oRectLBContent . bottom = oRectDlg . bottom - oRectBTOK . Height() - (C_iBorderSize << 1);
|
||||
// place BTAdd
|
||||
oSize = oRectBTAdd . Size();
|
||||
int iHeight = oRectLBContent . Height();
|
||||
oRectBTDel . right = oRectBTAdd . right = oRectLBContent . left - C_iBorderSize;
|
||||
oRectBTDel . left = oRectBTAdd . left = oRectBTAdd . right - oSize.cx;
|
||||
oRectBTAdd . top = oRectLBContent . top + (iHeight>>1) - oSize.cy - C_iBorderSize;
|
||||
oRectBTAdd . bottom = oRectBTAdd . top + oSize.cy;
|
||||
oRectBTDel . top = oRectBTAdd . bottom + (C_iBorderSize>>1);
|
||||
oRectBTDel . bottom = oRectBTDel . top + oSize.cy;
|
||||
// resize LBChoice & CTree
|
||||
oRectLBChoice . right = oRectBTAdd . left - C_iBorderSize;
|
||||
oRectLBChoice . bottom = oRectLBContent . bottom;
|
||||
oRectCT . right = oRectLBChoice . right;
|
||||
oRectCT . bottom = oRectLBChoice . bottom;
|
||||
// resize CB
|
||||
oRectCB . right = oRectCT . right;
|
||||
|
||||
// move windows
|
||||
M_LBChoice() -> MoveWindow ( &oRectLBChoice ) ;
|
||||
M_CTChoice() -> MoveWindow ( &oRectCT ) ;
|
||||
M_LBContent() -> MoveWindow ( &oRectLBContent ) ;
|
||||
M_CBType() -> MoveWindow ( &oRectCB ) ;
|
||||
GetDlgItem( ID_BT_ADD ) -> MoveWindow ( &oRectBTAdd ) ;
|
||||
GetDlgItem( ID_BT_DELETE ) -> MoveWindow ( &oRectBTDel ) ;
|
||||
GetDlgItem( IDOK ) -> MoveWindow ( &oRectBTOK ) ;
|
||||
GetDlgItem( IDCANCEL ) -> MoveWindow ( &oRectBTCancel ) ;
|
||||
GetDlgItem( ID_BT_OPEN ) -> MoveWindow ( &oRectBTOpen ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_GETMINMAXINFO
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI )
|
||||
{
|
||||
// limit min size
|
||||
lpMMI -> ptMinTrackSize . x = 412;
|
||||
lpMMI -> ptMinTrackSize . y = 257;
|
||||
|
||||
CDialog::OnGetMinMaxInfo( lpMMI );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : handle function for msg BN_CLICKED on button OK
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnOK()
|
||||
{
|
||||
mfn_vUpdateList();
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : handle function for msg BN_CLICKED on button OPEN
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnBtOpen()
|
||||
{
|
||||
mfn_vUpdateList();
|
||||
CDialog::EndDialog(C_OPENVIEWER);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : handle function for msg BN_CLICKER on button Delete
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnBtdelete()
|
||||
{
|
||||
// multiple selection list
|
||||
CListBox *pLB = M_LBContent();
|
||||
int iNbSel = pLB -> GetSelCount();
|
||||
|
||||
if ( iNbSel > 0 )
|
||||
{
|
||||
int *pa_iIndexes = (int*)malloc( iNbSel * sizeof(int));
|
||||
|
||||
pLB -> GetSelItems( iNbSel, pa_iIndexes );
|
||||
|
||||
for ( int iIdx=iNbSel-1 ; iIdx>=0 ; iIdx-- )
|
||||
{
|
||||
pLB -> DeleteString ( pa_iIndexes[iIdx] ) ;
|
||||
}
|
||||
free(pa_iIndexes);
|
||||
}
|
||||
GetDlgItem( ID_BT_OPEN ) -> EnableWindow( pLB -> GetCount() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : handle function for msg BN_CLICKER on button Add
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnBtadd()
|
||||
{
|
||||
CComboBox *pCB = M_CBType();
|
||||
int iIndex = pCB -> GetCurSel();
|
||||
|
||||
if( iIndex != CB_ERR )
|
||||
{
|
||||
CString ocstChoiceName;
|
||||
|
||||
pCB -> GetLBText( iIndex , ocstChoiceName );
|
||||
if ( ocstChoiceName == m_ocstTreeName )
|
||||
mfn_vAddSelectionFromTree();
|
||||
else
|
||||
mfn_vAddSelectionFromList();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : handle function for msg CBN_SELCHANGE on combo type
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnSelchangeComboType()
|
||||
{
|
||||
CComboBox *pCB = M_CBType();
|
||||
int iIndex = pCB -> GetCurSel();
|
||||
|
||||
if( iIndex != CB_ERR )
|
||||
{
|
||||
CString ocstChoiceName;
|
||||
|
||||
pCB -> GetLBText( iIndex , ocstChoiceName );
|
||||
if ( ocstChoiceName == m_ocstTreeName )
|
||||
mfn_vShowHierarchyTree();
|
||||
else
|
||||
mfn_vFillChoiceList( (CPA_List<CPA_SuperObject>*) pCB -> GetItemData( iIndex ) );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : handle function for msg LBN_DBLCLK on choice list
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnDblclkListContent()
|
||||
{
|
||||
CListBox *pLBContent = M_LBContent();
|
||||
int iIndex = pLBContent -> GetCurSel();
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
{
|
||||
pLBContent -> DeleteString( iIndex );
|
||||
}
|
||||
GetDlgItem( ID_BT_OPEN ) -> EnableWindow( pLBContent -> GetCount() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : handle function for msg LBN_DBLCLK on choice list
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::OnDblClkListObjects()
|
||||
{
|
||||
CListBox *pLBChoice = M_LBChoice();
|
||||
CListBox *pLBContent = M_LBContent();
|
||||
int iIndex = pLBChoice -> GetCurSel();
|
||||
|
||||
if( iIndex != LB_ERR && (pLBContent -> GetCount() < (MAX_DEVICE-1)) )
|
||||
{
|
||||
CPA_SuperObject *p_oSprObj = (CPA_SuperObject*)pLBChoice -> GetItemData( iIndex );
|
||||
CPA_BaseObject *p_oObject = p_oSprObj -> GetObject();
|
||||
|
||||
int iIdx = pLBContent -> AddString( p_oObject -> GetName() ); // object name
|
||||
if( iIdx != LB_ERR )
|
||||
pLBContent -> SetItemData ( iIdx , (DWORD) p_oSprObj ); // super object pointer
|
||||
}
|
||||
GetDlgItem( ID_BT_OPEN ) -> EnableWindow( pLBContent -> GetCount() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : fill Choice list with selected list on Type Combo
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::mfn_vFillChoiceList(CPA_List<CPA_SuperObject> *_p_oList)
|
||||
{
|
||||
CListBox *pLB = M_LBChoice();
|
||||
CTreeCtrl *pTree = M_CTChoice();
|
||||
|
||||
pTree -> EnableWindow( FALSE );
|
||||
pTree -> ShowWindow( SW_HIDE );
|
||||
|
||||
pLB -> EnableWindow( TRUE );
|
||||
pLB -> ShowWindow( SW_SHOW );
|
||||
pLB -> ResetContent();
|
||||
|
||||
if( _p_oList )
|
||||
{
|
||||
// fill list
|
||||
POSITION stPos = _p_oList -> GetHeadPosition();
|
||||
|
||||
while ( stPos )
|
||||
{
|
||||
CPA_SuperObject *p_oSprObj = _p_oList -> GetNext( stPos );
|
||||
CPA_BaseObject *p_oObj = p_oSprObj -> GetObject() ;
|
||||
|
||||
int iIdx = pLB -> AddString ( p_oObj -> GetName() ); // object name
|
||||
if( iIdx != LB_ERR )
|
||||
pLB -> SetItemData ( iIdx, (DWORD)p_oSprObj ); // super object pointer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : show heirarchy tree
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::mfn_vShowHierarchyTree()
|
||||
{
|
||||
CListBox *pLB = M_LBChoice();
|
||||
CTreeCtrl *pTree = M_CTChoice();
|
||||
|
||||
pLB -> EnableWindow( FALSE );
|
||||
pLB -> ShowWindow( SW_HIDE );
|
||||
|
||||
pTree -> EnableWindow( TRUE );
|
||||
pTree -> ShowWindow( SW_SHOW );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : add a list on Type Combo
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::mfn_vAddListOfType(CString _csTypeName, CString _csListName)
|
||||
{
|
||||
CComboBox *pCB = M_CBType();
|
||||
CPA_List<CPA_SuperObject> *p_oList = m_p_oMainWorld -> GetInterface() -> GetObjectListByType (_csTypeName);
|
||||
|
||||
if( p_oList )
|
||||
{
|
||||
int iIndex = pCB -> AddString ( _csListName ) ;
|
||||
if ( iIndex != CB_ERR )
|
||||
pCB -> SetItemData( iIndex , (DWORD) p_oList ) ;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : add hierarchy on Tree
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::mfn_vAddHierarchyTree(CString _csListName)
|
||||
{
|
||||
CComboBox *pCB = M_CBType();
|
||||
|
||||
// only one tree
|
||||
if( m_bTreeUsed )
|
||||
return ;
|
||||
|
||||
m_ocstTreeName = _csListName ;
|
||||
m_bTreeUsed = TRUE;
|
||||
pCB -> AddString ( _csListName ) ;
|
||||
|
||||
// init icons for hierarchy tree
|
||||
m_stImageList.Create(16, 16, FALSE, 0, 9);
|
||||
/*
|
||||
m_stImageList.Add(M_GetMainApp()->LoadIcon(EDT_IDI_EDIT_NOOBJECT));
|
||||
m_stImageList.Add(M_GetMainApp()->LoadIcon(EDT_IDI_EDIT_SUPOBJ));
|
||||
m_stImageList.Add(M_GetMainApp()->LoadIcon(EDT_IDI_NOEDIT_NOOBJECT));
|
||||
m_stImageList.Add(M_GetMainApp()->LoadIcon(EDT_IDI_NOEDIT_SUPOBJ));
|
||||
m_stImageList.Add(M_GetMainApp()->LoadIcon(EDT_IDI_PEDIT_NOOBJECT));
|
||||
m_stImageList.Add(M_GetMainApp()->LoadIcon(EDT_IDI_PEDIT_SUPOBJ));
|
||||
m_stImageList.Add(M_GetMainApp()->LoadIcon(EDT_IDI_PNOEDIT_NOOBJECT));
|
||||
m_stImageList.Add(M_GetMainApp()->LoadIcon(EDT_IDI_PNOEDIT_SUPOBJ));
|
||||
*/
|
||||
m_stImageList.Add(&m_oBmpEdNoObject,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpEdSupObj,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpNoEdNoObject,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpNoEdSupObj,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpPEdNoObject,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpPEdSupObj,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpPNoEdNoObject,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpPNoEdSupObj,(CBitmap*)NULL);
|
||||
|
||||
M_CTChoice() -> SetImageList(&m_stImageList, TVSIL_NORMAL);
|
||||
|
||||
// fill tree
|
||||
mfn_vFillHierarchyTree( m_p_oMainWorld -> GetWorld() -> GetRoot() , TVI_ROOT);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : add a list on Type Combo
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::mfn_vFillHierarchyTree (CPA_SuperObject *pEdParent, HTREEITEM hTreeParent)
|
||||
{
|
||||
CTreeCtrl *pTree = M_CTChoice();
|
||||
CPA_SuperObject *pEdChild;
|
||||
HTREEITEM hTreeChild;
|
||||
int iNumImage;
|
||||
|
||||
if (!pEdParent)
|
||||
return;
|
||||
|
||||
for (pEdChild = pEdParent->GetSuperObjectFirstChild(); pEdChild;
|
||||
pEdChild = pEdParent->GetSuperObjectNextChild(pEdChild))
|
||||
{
|
||||
// find good icon
|
||||
iNumImage = 0;
|
||||
if (pEdChild->GetSuperObjectOwner())
|
||||
iNumImage += 4;
|
||||
if (pEdChild->fn_bIsEditProtected())
|
||||
iNumImage += 2;
|
||||
if (pEdChild->GetObjectType() != HIE_C_ulSuperObject)
|
||||
iNumImage += 1;
|
||||
// create item
|
||||
if( pEdChild->GetObject() )
|
||||
hTreeChild = pTree -> InsertItem( pEdChild->GetObject()->GetName(), iNumImage, iNumImage, hTreeParent, TVI_LAST ); // object name
|
||||
else
|
||||
hTreeChild = pTree -> InsertItem( pEdChild->GetName(), iNumImage, iNumImage, hTreeParent, TVI_LAST ); // object name
|
||||
pTree -> SetItemData( hTreeChild, (DWORD) pEdChild ); // super object pointer
|
||||
// next level
|
||||
mfn_vFillHierarchyTree( pEdChild, hTreeChild );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : add selection from list
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::mfn_vAddSelectionFromList()
|
||||
{
|
||||
// multiple selection
|
||||
CListBox *pLBChoice = M_LBChoice();
|
||||
CListBox *pLBContent = M_LBContent();
|
||||
int iNbSel = pLBChoice -> GetSelCount();
|
||||
|
||||
if ( iNbSel != LB_ERR )
|
||||
{
|
||||
int *pa_iIndexes = (int*)malloc( iNbSel * sizeof(int));
|
||||
pLBChoice -> GetSelItems( iNbSel, pa_iIndexes );
|
||||
for ( int iIndex=0 ; (iIndex<iNbSel && (pLBContent -> GetCount() < (MAX_DEVICE-1)) ) ; iIndex++ )
|
||||
{
|
||||
CPA_SuperObject *p_oSprObj = (CPA_SuperObject*)pLBChoice -> GetItemData( pa_iIndexes[iIndex] );
|
||||
CPA_BaseObject *p_oObject = p_oSprObj -> GetObject();
|
||||
|
||||
int iIdxCnt = pLBContent -> FindStringExact( -1, p_oObject -> GetName() );
|
||||
if( iIdxCnt == LB_ERR )
|
||||
{
|
||||
// new object
|
||||
int iIdx = pLBContent -> AddString( p_oObject -> GetName() ); // object name
|
||||
if( iIdx != LB_ERR )
|
||||
pLBContent -> SetItemData ( iIdx , (DWORD) p_oSprObj ); // super object pointer
|
||||
}
|
||||
}
|
||||
free(pa_iIndexes);
|
||||
}
|
||||
GetDlgItem( ID_BT_OPEN ) -> EnableWindow( pLBContent -> GetCount() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : add selection from tree
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::mfn_vAddSelectionFromTree()
|
||||
{
|
||||
CTreeCtrl *pTree = M_CTChoice();
|
||||
HTREEITEM hCurItem = pTree -> GetSelectedItem();
|
||||
|
||||
if( hCurItem )
|
||||
{
|
||||
CPA_SuperObject *p_oSprObj = (CPA_SuperObject *) pTree -> GetItemData(hCurItem);
|
||||
CPA_BaseObject *p_oObject = p_oSprObj -> GetObject();
|
||||
|
||||
CListBox *pLBContent = M_LBContent();
|
||||
if(p_oObject && (pLBContent -> GetCount() < (MAX_DEVICE-1)) )
|
||||
{
|
||||
int iIdxCnt = pLBContent -> FindStringExact( -1, p_oObject -> GetName() );
|
||||
if( iIdxCnt == LB_ERR )
|
||||
{
|
||||
// new object
|
||||
int iIdx = pLBContent -> AddString( p_oObject -> GetName() ); // object name
|
||||
if( iIdx != LB_ERR )
|
||||
pLBContent -> SetItemData ( iIdx , (DWORD) p_oSprObj ); // super object pointer
|
||||
}
|
||||
}
|
||||
GetDlgItem( ID_BT_OPEN ) -> EnableWindow( pLBContent -> GetCount() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : update global list with selected objects
|
||||
//--------------------------------------------------------------------------------
|
||||
void CDlgViewerContent::mfn_vUpdateList()
|
||||
{
|
||||
CListBox *pLB = M_LBContent();
|
||||
|
||||
CList<DWORD,DWORD> m_oListOfWord;
|
||||
for( int iIndex = 0 ; iIndex < pLB -> GetCount() ; iIndex++ )
|
||||
{
|
||||
DWORD dwValue = pLB->GetItemData( iIndex );
|
||||
if ( dwValue != LB_ERR )
|
||||
{
|
||||
m_oListOfWord . AddTail ( dwValue );
|
||||
}
|
||||
}
|
||||
//
|
||||
POSITION stPos = m_p_oListOfInitialObjects -> GetHeadPosition();
|
||||
while( stPos )
|
||||
{
|
||||
POSITION stCurPos = stPos;
|
||||
tdst_VW_ObjInfo *p_stObjInfo = m_p_oListOfInitialObjects -> GetNext( stPos );
|
||||
|
||||
DWORD dwValue = (DWORD) p_stObjInfo -> m_p_oSuperObject;
|
||||
|
||||
POSITION stP = m_oListOfWord . Find( dwValue );
|
||||
|
||||
if( stP )
|
||||
m_oListOfWord . RemoveAt( stP );
|
||||
else
|
||||
{
|
||||
free( p_stObjInfo );
|
||||
m_p_oListOfInitialObjects -> RemoveAt( stCurPos );
|
||||
}
|
||||
}
|
||||
//
|
||||
stPos = m_oListOfWord . GetHeadPosition();
|
||||
while( stPos )
|
||||
{
|
||||
tdst_VW_ObjInfo *p_stObjInfo = (tdst_VW_ObjInfo*) malloc( sizeof (tdst_VW_ObjInfo ) );
|
||||
p_stObjInfo -> m_p_oSuperObject = (CPA_SuperObject*) m_oListOfWord . GetNext( stPos );
|
||||
p_stObjInfo -> m_bUsePos = FALSE;
|
||||
POS_fn_vSetIdentityMatrix(&p_stObjInfo -> stMatrix);
|
||||
m_p_oListOfInitialObjects -> AddTail( p_stObjInfo );
|
||||
}
|
||||
}
|
6
Rayman_X/cpa/tempgrp/T3D/src/StdAfx.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// ACPProject.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
104
Rayman_X/cpa/tempgrp/T3D/src/T3DFRMBs.cpp
Normal file
@@ -0,0 +1,104 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
#include "stdafx.h"
|
||||
// ALX
|
||||
#include "ACP_Base.h"
|
||||
#define HieFriend
|
||||
#include "incGam.h"
|
||||
#include "Itf.h"
|
||||
|
||||
#include "T3DFRMBs.hpp"
|
||||
#include "T3DInterf.hpp"
|
||||
|
||||
#define M_PosMenuOption 4
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Tool3D_FRMBaseMenu
|
||||
|
||||
IMPLEMENT_DYNCREATE(Tool3D_FRMBaseMenu, FRMBaseMenu)
|
||||
|
||||
BEGIN_MESSAGE_MAP(Tool3D_FRMBaseMenu, FRMBaseMenu)
|
||||
//{{AFX_MSG_MAP(Tool3D_FRMBaseMenu)
|
||||
ON_WM_INITMENUPOPUP()
|
||||
ON_WM_SYSCOMMAND()
|
||||
ON_WM_SIZE()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Tool3D_FRMBaseMenu construction/destruction
|
||||
|
||||
Tool3D_FRMBaseMenu::Tool3D_FRMBaseMenu()
|
||||
{
|
||||
//statement
|
||||
m_p_oTool3D = NULL;
|
||||
}
|
||||
|
||||
Tool3D_FRMBaseMenu::~Tool3D_FRMBaseMenu()
|
||||
{
|
||||
//statement
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Tool3D_FRMBaseMenu Message
|
||||
|
||||
////
|
||||
void Tool3D_FRMBaseMenu::OnSysCommand( UINT nID, LPARAM lParam )
|
||||
{
|
||||
switch (nID)
|
||||
{
|
||||
case SC_CLOSE:
|
||||
case SC_MINIMIZE:
|
||||
M_GetMainWnd()->SendMessage(WM_SYSCOMMAND,(WORD)nID,MAKELPARAM(0,-1));
|
||||
break;
|
||||
default:
|
||||
FRMBaseMenu::OnSysCommand(nID, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
////
|
||||
void Tool3D_FRMBaseMenu::OnSize( UINT nType, int cx, int cy )
|
||||
{
|
||||
FRMBaseMenu::OnSize(nType,cx,cy);
|
||||
}
|
||||
|
||||
void Tool3D_FRMBaseMenu::fn_vInitGeneralMenuWithContext(void)
|
||||
{
|
||||
FRMBaseMenu::fn_vInitGeneralMenuWithContext();
|
||||
|
||||
m_oGeneralMenu.GetSubMenu(M_PosMenuOption)->EnableMenuItem(CPA_IDCB_DISPLAYWORLD, MF_BYCOMMAND|MF_GRAYED);
|
||||
m_oGeneralMenu.GetSubMenu(M_PosMenuOption)->EnableMenuItem(CPA_IDCB_DISPLAYVISIBLE, MF_BYCOMMAND|MF_GRAYED);
|
||||
m_oGeneralMenu.GetSubMenu(M_PosMenuOption)->EnableMenuItem(CPA_IDCB_DISPLAYSECTOR, MF_BYCOMMAND|MF_GRAYED);
|
||||
|
||||
m_oGeneralMenu.GetSubMenu(M_PosMenuOption)->EnableMenuItem(CPA_IDCB_VIEWBOUND, MF_BYCOMMAND|MF_GRAYED);
|
||||
m_oGeneralMenu.GetSubMenu(M_PosMenuOption)->EnableMenuItem(CPA_IDCB_WORLDTEXTURED, MF_BYCOMMAND|MF_GRAYED);
|
||||
m_oGeneralMenu.GetSubMenu(M_PosMenuOption)->EnableMenuItem(CPA_IDCB_WORLDGRID, MF_BYCOMMAND|MF_GRAYED);
|
||||
m_oGeneralMenu.GetSubMenu(M_PosMenuOption)->EnableMenuItem(CPA_IDCB_WORLDWIRED, MF_BYCOMMAND|MF_GRAYED);
|
||||
}
|
||||
|
||||
void Tool3D_FRMBaseMenu::mfn_vUpdateDeviceToolBar(void)
|
||||
{
|
||||
//FRMBaseMenu::mfn_vUpdateDeviceToolBar();
|
||||
//m_oGeneralDialogBar.m_oDeviceToolbar.ShowWindow( SW_HIDE );
|
||||
m_oGeneralDialogBar.m_oDisplayToolbar.ShowWindow( SW_HIDE );
|
||||
m_oGeneralDialogBar.GetDlgItem(CPA_IDCB_CURRENTSECTOR) -> EnableWindow( FALSE );
|
||||
m_oGeneralDialogBar.GetDlgItem(CPA_IDCB_SELECTMODE) -> EnableWindow( FALSE );
|
||||
}
|
||||
|
||||
void Tool3D_FRMBaseMenu::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
|
||||
{
|
||||
FRMBaseMenu::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu) ;
|
||||
|
||||
// grayed Reinit the map !!
|
||||
if ( nIndex == 0 )
|
||||
pPopupMenu->EnableMenuItem (0, MF_BYPOSITION | MF_GRAYED ) ;
|
||||
// grayed the other
|
||||
m_p_oToolSubMenu->fn_cGrayedItem (pPopupMenu, "Recompute all bounding volumes" ) ;
|
||||
m_p_o3DViewSubMenu->fn_cGrayedItem (pPopupMenu, "Display" ) ;
|
||||
m_p_o3DViewSubMenu->fn_cGrayedItem (pPopupMenu, "Bounding Volume" ) ;
|
||||
m_p_o3DViewSubMenu->fn_cGrayedItem (pPopupMenu, "Axis" ) ;
|
||||
}
|
||||
|
||||
#endif //ACTIVE_EDITOR
|
58
Rayman_X/cpa/tempgrp/T3D/src/T3DFrame.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
// T3DFrame.cpp: implementation of the Tool3D_Frame class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#include "stdafx.h"
|
||||
#include "ACP_Base.h"
|
||||
|
||||
#include "Itf.h"
|
||||
#include "animview.h"
|
||||
#include "T3DFrame.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[]=__FILE__;
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" CPA_DLLBase *fn_p_oGetDLL(long lKey);
|
||||
extern tdstDLLIdentity g_stTool3DIdentity;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Tool3D_Frame::Tool3D_Frame()
|
||||
{
|
||||
m_p_clBaseObjectList = new CPA_BaseObjectList();
|
||||
m_p_clDialogList = new CPA_DialogList();
|
||||
m_bDisplayAllFam = TRUE;
|
||||
}
|
||||
|
||||
Tool3D_Frame::~Tool3D_Frame()
|
||||
{
|
||||
delete m_p_clBaseObjectList;
|
||||
delete m_p_clDialogList;
|
||||
}
|
||||
|
||||
BOOL Tool3D_Frame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext * pContext)
|
||||
{
|
||||
|
||||
if (!(CreateSplitter(C_cHorizontalSplitter,2)))
|
||||
return FALSE;
|
||||
|
||||
//Creates Dialog List View
|
||||
|
||||
m_p_clDialogList->fn_vInitDialog( fn_p_oGetDLL(0), this );
|
||||
SetPaneView( 0, m_p_clDialogList,"Selection", 200);
|
||||
|
||||
HINSTANCE hOldInst = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle( g_stTool3DIdentity.hModule );
|
||||
|
||||
//Creates other views
|
||||
if ( !CreateView( 1,RUNTIME_CLASS(CAnimationView),"Animation control", 800 ) )
|
||||
return FALSE;
|
||||
AfxSetResourceHandle( hOldInst );
|
||||
|
||||
return TRUE;
|
||||
}
|
830
Rayman_X/cpa/tempgrp/T3D/src/T3DWorld.cpp
Normal file
@@ -0,0 +1,830 @@
|
||||
// implementation of special world class for the 3DTool Dll
|
||||
|
||||
|
||||
//// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
//// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
//// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
//// WARNING WARNING
|
||||
//// WARNING WARNING
|
||||
//// WARNING SuperObjects are not destroyed !!!!! WARNING
|
||||
//// WARNING WARNING
|
||||
//// WARNING WARNING
|
||||
//// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
//// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
//// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#define D_State_Define
|
||||
#define HieFriend
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "incGam.h"
|
||||
#include "Itf.h"
|
||||
//#include "HIE.h"
|
||||
|
||||
#include "T3DWorld.hpp"
|
||||
|
||||
inline POS_tdxHandleToPosition M_AllocMatrix()
|
||||
{
|
||||
POS_tdxHandleToPosition hPos = (POS_tdxHandleToPosition) malloc (sizeof (POS_tdstCompletePosition) );
|
||||
POS_fn_vSetIdentityMatrix(hPos);
|
||||
|
||||
return hPos;
|
||||
}
|
||||
|
||||
//#define M_AllocMatrix() ((POS_tdxHandleToPosition) malloc (sizeof (POS_tdstCompletePosition)))
|
||||
|
||||
//#define M_AllocMatrix() POS_fn_hCreateMatrix(POS_C_xCompletePosition);
|
||||
|
||||
#define M_GetCopyOfSuperObject(p_oSprObj) (p_oSprObj) -> GetMainWorld() -> GetInterface() -> GetCopyOfSuperObject(p_oSprObj)
|
||||
|
||||
#define M_ForEachSuperObjectChild( p_oSprObjFather, p_oSprObjChild ) \
|
||||
for( p_oSprObjChild = p_oSprObjFather -> GetSuperObjectFirstChild() ; \
|
||||
p_oSprObjChild ; \
|
||||
p_oSprObjChild = p_oSprObjFather -> GetSuperObjectNextChild( p_oSprObjChild ) )
|
||||
|
||||
#define M_T3DDeleteSuperObject( p_oSO, bWithEngine )\
|
||||
{ \
|
||||
if( p_oSO ) \
|
||||
{ \
|
||||
if( p_oSO -> GetStruct() ) \
|
||||
p_oSO -> SetObject( NULL ); \
|
||||
if( ! bWithEngine ) \
|
||||
p_oSO -> SetSuperObjectStruct( NULL ); \
|
||||
p_oSO -> fn_bUnValidate(); \
|
||||
/*delete p_oSO;*/ \
|
||||
} \
|
||||
}
|
||||
|
||||
#define M_T3DStepSize 10
|
||||
#define M_T3DInitSize 50
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// constructor :
|
||||
//--------------------------------------------------------------------------------
|
||||
Tool3D_World::Tool3D_World(CPA_MainWorld *_p_oMainWorld)
|
||||
:CPA_World(_p_oMainWorld, TRUE)
|
||||
|
||||
{
|
||||
CPA_SuperObject *p_Root = _p_oMainWorld -> GetInterface() -> GetCopyOfSuperObject( _p_oMainWorld -> GetWorld() -> GetRoot() );
|
||||
POS_tdxHandleToPosition hMatrix;
|
||||
// fbolefeysot - 01/07/98{
|
||||
// CHN_tdxHandleToChannelArray hChannelArray;
|
||||
//END fbolefeysot}
|
||||
//CHN_tdxHandleToCASList hCAList;
|
||||
//CHN_tdxHandleToUCCList hUCCList;
|
||||
|
||||
p_Root -> SetObject(_p_oMainWorld -> GetWorld() -> GetRoot() -> GetObject());
|
||||
hMatrix = HIE_fn_hGetSuperObjectMatrix(p_Root -> GetStruct());
|
||||
POS_fn_vSetIdentityMatrix(hMatrix);
|
||||
|
||||
p_Root -> SetEditProtected( TRUE );
|
||||
fn_vSetRoot(p_Root);
|
||||
|
||||
// init values
|
||||
m_eWorldType = C_eNone;
|
||||
m_p_oRootFromAnim = NULL;
|
||||
//
|
||||
m_oListOfSO . RemoveAll();
|
||||
m_xLastSOUsedPosition = NULL;
|
||||
|
||||
m_p_oBaseFromAnim = NULL;
|
||||
m_p_oDLLPO = NULL;
|
||||
m_p_oInterface = NULL;
|
||||
|
||||
m_p_stEngineObject = (tdstEngineObject *) malloc( sizeof( struct tdstEngineObject_ ) );
|
||||
memset( m_p_stEngineObject, 0, sizeof(struct tdstEngineObject_) );
|
||||
fn_v3dDataAlloc( m_p_stEngineObject );
|
||||
//
|
||||
// fbolefeysot - 01/07/98{
|
||||
// fn_vInitCSOList( & hCSOList, );
|
||||
//END fbolefeysot}
|
||||
// fn_vInitCASList( & hCAList );
|
||||
//fn_vInitUCCList( & hUCCList );
|
||||
//
|
||||
// fbolefeysot - 01/07/98{
|
||||
fn_v3dDataSetChannelSOList( m_p_stEngineObject -> h_3dData, NULL );
|
||||
fn_v3dDataSetFirstActiveChannel(m_p_stEngineObject -> h_3dData, NULL );
|
||||
m_stState.p_stAnim = NULL;
|
||||
//END fbolefeysot}
|
||||
// fn_v3dDataSetChannelActivationList( m_p_stEngineObject -> h_3dData, hCAList );
|
||||
//fn_v3dDataSetChannelUnderControlList( m_p_stEngineObject -> h_3dData, hUCCList );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Destructor :
|
||||
//--------------------------------------------------------------------------------
|
||||
Tool3D_World::~Tool3D_World()
|
||||
{
|
||||
CPA_SuperObject *p_oSO;
|
||||
|
||||
M_T3DDeleteSuperObject( GetRoot(), TRUE );
|
||||
|
||||
fn_vSetRoot( NULL );
|
||||
while( ! m_oListOfSO . IsEmpty() )
|
||||
{
|
||||
p_oSO = m_oListOfSO . RemoveHead();
|
||||
if( p_oSO )
|
||||
M_T3DDeleteSuperObject( p_oSO, FALSE );
|
||||
}
|
||||
|
||||
free(m_p_stEngineObject);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description :
|
||||
//--------------------------------------------------------------------------------
|
||||
BOOL Tool3D_World::mfn_bAcceptModif(CPA_ObjectDLLBase *pDLLBase)
|
||||
{
|
||||
if( (m_eWorldType == C_eGridActor) || (m_eWorldType == C_eGridList) )
|
||||
return ( pDLLBase && ( ( pDLLBase -> GetName() == C_szDLLZDxName ) ||
|
||||
( pDLLBase -> GetName() == C_szDLLGeometryName )
|
||||
)
|
||||
);
|
||||
else
|
||||
return ( pDLLBase && pDLLBase -> GetName() == C_szDLLZDxName );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : create a new hierarchy from an actor
|
||||
//--------------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vCreateHierarchyFromActor(CPA_SuperObject *_p_oSprObj)
|
||||
{
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : create a new hierarchy from a superobject
|
||||
//--------------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vCreateHierarchyFromSuperObject(CPA_SuperObject *_p_oSprObj)
|
||||
{
|
||||
mfn_vCreateHierarchyFromObject( _p_oSprObj -> GetObject() );
|
||||
//
|
||||
m_eWorldType = C_eSuperObject;
|
||||
m_p_oRootFromAnim = NULL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : create a new hierarchy from an object
|
||||
//--------------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vCreateHierarchyFromObject(CPA_BaseObject *_p_oObject)
|
||||
{
|
||||
POS_tdxHandleToPosition hMatrix;
|
||||
MTH3D_tdstVector stCenter;
|
||||
|
||||
m_eWorldType = C_eObject;
|
||||
m_p_oRootFromAnim = NULL;
|
||||
// create new SuperObject
|
||||
CPA_SuperObject *p_oNewSprObj = M_GetCopyOfSuperObject( GetRoot() );
|
||||
// set object of new SuperObject
|
||||
p_oNewSprObj -> SetObject( _p_oObject );
|
||||
//
|
||||
p_oNewSprObj -> SetEditProtected( FALSE );
|
||||
// add new SuperObject to Hierarchy
|
||||
fn_vInsertSuperObjectInNewWorld( p_oNewSprObj, GetRoot(), FALSE );
|
||||
// center object
|
||||
hMatrix = HIE_fn_hGetSuperObjectMatrix(p_oNewSprObj -> GetStruct());
|
||||
POS_fn_vSetIdentityMatrix(hMatrix);
|
||||
if( mfn_bComputeCenterAndRadiusBoundingBox( p_oNewSprObj, &stCenter ) )
|
||||
{
|
||||
MTH3D_tdstVector stTranslation;
|
||||
|
||||
POS_fn_vGetTranslationVector( hMatrix, &stTranslation );
|
||||
MTH3D_M_vSubVector(&stTranslation, &stTranslation, &stCenter);
|
||||
POS_fn_vSetTranslationVector( hMatrix, &stTranslation );
|
||||
}
|
||||
POS_fn_vNormalizeMatrix(hMatrix);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : create a new hierarchy from an actor to a grid view
|
||||
//--------------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vCreateGridHierarchyFromActor(CPA_SuperObject *_p_oSprObj)
|
||||
{
|
||||
m_eWorldType = C_eGridActor;
|
||||
m_p_oRootFromAnim = NULL;
|
||||
// create new hierarchy
|
||||
mfn_vLinearizeHierarchy( GetRoot(), _p_oSprObj);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : create a new hierarchy from a list of objects to a grid view
|
||||
//--------------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vCreateGridHierarchyFromList(CPA_List<CPA_BaseObject> *_p_oList, CPA_MainWorld *_p_oMainWorld)
|
||||
{
|
||||
m_eWorldType = C_eGridList;
|
||||
m_p_oRootFromAnim = NULL;
|
||||
// create new hierarchy
|
||||
POSITION stPos = _p_oList -> GetHeadPosition();
|
||||
while(stPos)
|
||||
{
|
||||
CPA_BaseObject *p_Object = _p_oList -> GetNext( stPos );
|
||||
//??? CPA_SuperObject *pLastSprObj = p_Object -> GetSuperObject();
|
||||
CPA_SuperObject *pSuper_Object = _p_oMainWorld -> GetInterface() -> GetNewSuperObject(E_ss_NoSave);
|
||||
// save link
|
||||
// create the matrix of the super object
|
||||
POS_tdstCompletePosition *p_stPos;
|
||||
|
||||
p_stPos = M_AllocMatrix();
|
||||
POS_fn_vSetIdentityMatrix(p_stPos);
|
||||
HIE_fn_vSetSuperObjectMatrix(pSuper_Object -> GetStruct () , p_stPos);
|
||||
|
||||
p_stPos = M_AllocMatrix();
|
||||
POS_fn_vSetIdentityMatrix(p_stPos);
|
||||
pSuper_Object -> GetStruct () -> hGlobalMatrix = p_stPos;
|
||||
|
||||
POS_fn_vSetIdentityMatrix(HIE_fn_hGetSuperObjectMatrix (pSuper_Object -> GetStruct ()));
|
||||
POS_fn_vSetIdentityMatrix(HIE_fn_hGetSuperObjectGlobalMatrix (pSuper_Object -> GetStruct ()));
|
||||
//
|
||||
pSuper_Object->SetObject(p_Object);
|
||||
// add superobject to new world
|
||||
fn_vInsertSuperObjectInNewWorld( pSuper_Object, GetRoot(), FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Description : create a new hierarchy from an objects Table
|
||||
//--------------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vCreateGridHierarchyFromTable(CPA_BaseObject *_p_oTable, CPA_MainWorld *_p_oMainWorld)
|
||||
{
|
||||
CPA_List<CPA_BaseObject> oList;
|
||||
long lNbObjects;
|
||||
|
||||
lNbObjects = _p_oMainWorld -> fn_lFindObjects( &oList, "", C_szPhysicalObjectTypeName, _p_oTable );
|
||||
if( lNbObjects )
|
||||
mfn_vCreateGridHierarchyFromList( &oList, _p_oMainWorld );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Fill world with VWOI (NEW)
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vCreateViewerHierarchyFromVWOIList(CPA_List<tdst_VW_ObjInfo> *_p_oListOfVWOI, CPA_MainWorld *_p_oMainWorld)
|
||||
{
|
||||
m_p_oRootFromAnim = NULL;
|
||||
m_eWorldType = C_eViewer;
|
||||
// create new hierarchy
|
||||
POSITION stPos = _p_oListOfVWOI -> GetHeadPosition();
|
||||
while(stPos)
|
||||
{
|
||||
CPA_SuperObject *p_oLastFather = _p_oListOfVWOI -> GetNext(stPos) -> m_p_oSuperObject;
|
||||
CPA_BaseObject *p_oObject = p_oLastFather -> GetObject();
|
||||
CPA_SuperObject *p_oNewFather = _p_oMainWorld -> GetInterface() -> GetNewSuperObject(E_ss_NoSave);
|
||||
// add super object
|
||||
// create the matrix of the super object
|
||||
|
||||
POS_tdstCompletePosition *p_stPos;
|
||||
|
||||
p_stPos = M_AllocMatrix();
|
||||
POS_fn_vSetIdentityMatrix(p_stPos);
|
||||
HIE_fn_vSetSuperObjectMatrix(p_oNewFather -> GetStruct () , p_stPos);
|
||||
|
||||
p_stPos = M_AllocMatrix();
|
||||
POS_fn_vSetIdentityMatrix(p_stPos);
|
||||
p_oNewFather -> GetStruct () -> hGlobalMatrix = p_stPos;
|
||||
|
||||
POS_fn_vSetIdentityMatrix(HIE_fn_hGetSuperObjectMatrix (p_oNewFather -> GetStruct ()));
|
||||
POS_fn_vSetIdentityMatrix(HIE_fn_hGetSuperObjectGlobalMatrix (p_oNewFather -> GetStruct ()));
|
||||
p_oNewFather -> SetObject(p_oObject);
|
||||
// add SuperObject to new hierarchy
|
||||
fn_vInsertSuperObjectInNewWorld( p_oNewFather, GetRoot(), FALSE );
|
||||
// duplicate child hierarchy
|
||||
mfn_vDuplicateHierarchy( p_oNewFather, p_oLastFather);
|
||||
}
|
||||
// compute position of objects
|
||||
mfn_vComputeSuperObjectPosFromViewer();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : create hierarchy (SO+O) using anim, frame and objects table
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_SuperObject *Tool3D_World::mfn_p_oCreateHierarchyFromAnim(CPA_SuperObject *_p_oSprObjActor)
|
||||
{
|
||||
HIE_tdxHandleToSuperObject hSO = _p_oSprObjActor -> GetStruct();
|
||||
MS_tdxHandleTo3dData h3dData = M_GetMSHandle( hSO, 3dData );
|
||||
MS_tdxHandleTo3dData h3dDataCopy = m_p_stEngineObject -> h_3dData;
|
||||
tdxHandleToState hState = fn_h3dDataGetCurrentState( h3dData ) ? fn_h3dDataGetCurrentState( h3dData )
|
||||
: fn_h3dDataGetInitialState( h3dData );
|
||||
struct tdstAnim3d_ *p_stAnim = hState ? fn_p_stGetAnimInState( hState ) : NULL;
|
||||
unsigned short uwFrame = fn_uw3dDataGetCurrentFrame( h3dData );
|
||||
POS_tdxHandleToPosition hMatrix;
|
||||
MTH3D_tdstVector stCenter;
|
||||
// fbolefeysot - 01/07/98{
|
||||
CHN_tdxHandleToChannelArray hChannelArray;
|
||||
//END fbolefeysot}
|
||||
//CHN_tdxHandleToCASList hCAList;
|
||||
//CHN_tdxHandleToUCCList hUCCList;
|
||||
|
||||
//Stefan Dumitrean 1-06-98
|
||||
if( !p_stAnim )
|
||||
return NULL;
|
||||
//End Stefan Dumitrean 1-06-98
|
||||
|
||||
m_eWorldType = C_eAnimOK;
|
||||
|
||||
// create new SuperObject that will be put in T3D world
|
||||
CPA_SuperObject *p_oNewSprObj = M_GetCopyOfSuperObject( _p_oSprObjActor );
|
||||
// T3D world actor object is the same as the main world actor object
|
||||
p_oNewSprObj -> SetObject( _p_oSprObjActor -> GetObject() );
|
||||
// duplicate 3dData structure in a safe variable
|
||||
memcpy(h3dDataCopy,h3dData,fn_ul3dDataSizeOf());
|
||||
// fn_v3dDataCopyClone( m_p_stEngineObject, (tdstEngineObject *)HIE_fn_hGetSuperObjectObject( hSO ) );
|
||||
|
||||
// clear channel array
|
||||
// fn_vInitCSOList(&hChannelArray,fn_ul3dDataGetNumberOfChannels(h3dData));
|
||||
// copy the original channel array and first active channel in the safe structure
|
||||
// fn_v3dDataSetChannelSOList( h3dDataCopy, fn_h3dDataGetChannelSOList(h3dData) );
|
||||
// fn_v3dDataSetFirstActiveChannel(h3dDataCopy,fn_h3dDataGetFirstActiveChannel(h3dData));
|
||||
// fn_p_st3dDataGetCurrentFrame(h3dDataCopy)->p_stArrayOfElts3d = fn_p_st3dDataGetCurrentFrame(h3dData)->p_stArrayOfElts3d;
|
||||
|
||||
// reset dynamic datas
|
||||
fn_v3dDataSetChannelSOList(h3dData,NULL);
|
||||
fn_v3dDataSetFirstActiveChannel(h3dData,NULL);
|
||||
fn_p_st3dDataGetCurrentFrame(h3dData)->p_stArrayOfElts3d = NULL;
|
||||
fn_p_st3dDataGetCurrentFrame(h3dData)->stHierarchy.ulNbOfCouples = 0;
|
||||
fn_p_st3dDataGetCurrentFrame(h3dData)->stHierarchy.d_stCouples= NULL;
|
||||
fn_v3dDataSetSizeOfArrayOfElts3d(h3dData,0);
|
||||
fn_v3dDataSetCurrentState(h3dData,&m_stState);
|
||||
|
||||
// put the new SuperObject into T3D world
|
||||
fn_vInsertSuperObjectInNewWorld( p_oNewSprObj, GetRoot(), FALSE );
|
||||
|
||||
// save SO tht is in the T3D world
|
||||
m_p_oRootFromAnim = p_oNewSprObj;
|
||||
// save SO that is in the real world
|
||||
m_p_oBaseFromAnim = _p_oSprObjActor;
|
||||
// init used values
|
||||
m_p_oDLLPO = GetRoot() -> GetMainWorld() -> GetObjectDLLWithName( C_szDLLPhysicalObjectName );
|
||||
m_p_oInterface = GetRoot() -> GetMainWorld() -> GetInterface();
|
||||
|
||||
// center object
|
||||
hMatrix = HIE_fn_hGetSuperObjectMatrix(p_oNewSprObj -> GetStruct());
|
||||
POS_fn_vSetIdentityMatrix(hMatrix);
|
||||
if( mfn_bComputeCenterAndRadiusBoundingBox( p_oNewSprObj, &stCenter ) )
|
||||
{
|
||||
MTH3D_tdstVector stTranslation;
|
||||
|
||||
POS_fn_vGetTranslationVector( hMatrix, &stTranslation );
|
||||
MTH3D_M_vSubVector(&stTranslation, &stTranslation, &stCenter);
|
||||
POS_fn_vSetTranslationVector( hMatrix, &stTranslation );
|
||||
}
|
||||
POS_fn_vNormalizeMatrix(hMatrix);
|
||||
|
||||
// uwFrame %= p_stAnim -> uwNumberOfFrames;
|
||||
// fn_v3dDataSetCurrentFrame( h3dData, uwFrame );
|
||||
|
||||
mfn_vUpdateHierarchyFromAnim(p_stAnim,fn_uw3dDataGetCurrentFrame(M_GetMSHandle(hSO,3dData)));
|
||||
|
||||
return p_oNewSprObj;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : update hierarchy (SO+O) using anim, frame and objects table
|
||||
*---------------------------------------------------------------------------*/
|
||||
void Tool3D_World::mfn_vUpdateHierarchyFromAnim(struct tdstAnim3d_* _p_stAnim, unsigned short _uwFrame)
|
||||
{
|
||||
//
|
||||
HIE_tdxHandleToSuperObject hSO = m_p_oRootFromAnim -> GetStruct();
|
||||
|
||||
m_eWorldType = C_eAnimTemp;
|
||||
// clear editor hierarchy
|
||||
mfn_vClearHierarchy( m_p_oRootFromAnim );
|
||||
// construct engine hierarchy
|
||||
fn_v3dDataSetCurrentFrame( M_GetMSHandle( hSO, 3dData ), _uwFrame );
|
||||
fn_p_st3dDataGetCurrentFrame(M_GetMSHandle(hSO,3dData))->p_stAnim = NULL;
|
||||
fn_v3dDataSetFlagModifState(M_GetMSHandle(hSO,3dData),TRUE);
|
||||
if (fn_h3dDataGetCurrentState(M_GetMSHandle(hSO,3dData))->p_stAnim == NULL)
|
||||
fn_h3dDataGetCurrentState(M_GetMSHandle(hSO,3dData))->p_stAnim = _p_stAnim;
|
||||
PLA_fn_bDoFirstInitOfAnimPlayerForCharacter(hSO, _p_stAnim);
|
||||
// encapsulate with editor object
|
||||
mfn_vFillHierarchyWithEngineAnim( m_p_oRootFromAnim, TRUE );
|
||||
//
|
||||
m_p_oInterface -> fn_vChangeWorld();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : update hierarchy (SO) using anim, frame and objects table
|
||||
*---------------------------------------------------------------------------*/
|
||||
void Tool3D_World::mfn_vPlayAnim(struct tdstAnim3d_* _p_stAnim, unsigned short _uwFrame)
|
||||
{
|
||||
HIE_tdxHandleToSuperObject hSO = m_p_oRootFromAnim -> GetStruct();
|
||||
//
|
||||
m_eWorldType = C_eAnimTemp;
|
||||
// clear editor hierarchy
|
||||
mfn_vClearHierarchy( m_p_oRootFromAnim );
|
||||
// construct engine hierarchy
|
||||
fn_v3dDataSetCurrentFrame( M_GetMSHandle( hSO, 3dData ), _uwFrame );
|
||||
fn_p_st3dDataGetCurrentFrame(M_GetMSHandle(hSO,3dData))->p_stAnim = NULL;
|
||||
PLA_fn_vInitAllChildInHeapNewAnim( hSO, _p_stAnim, _uwFrame );
|
||||
PLA_fn_vDoFrame( _p_stAnim, _uwFrame, hSO );
|
||||
// encapsulate with editor object
|
||||
mfn_vFillHierarchyWithEngineAnim( m_p_oRootFromAnim, FALSE );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Remove world and delete all SuperObjects created
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vResetWorld(void)
|
||||
{
|
||||
if( (m_eWorldType == C_eAnimTemp) || (m_eWorldType == C_eAnimOK) )
|
||||
{
|
||||
//
|
||||
HIE_tdxHandleToSuperObject hSO = m_p_oRootFromAnim -> GetStruct();
|
||||
MS_tdxHandleTo3dData h3dData = M_GetMSHandle( hSO, 3dData );
|
||||
MS_tdxHandleTo3dData h3dDataCopy = m_p_stEngineObject -> h_3dData;
|
||||
// fbolefeysot - 01/07/98{
|
||||
CHN_tdxHandleToChannelArray hChannelArray;
|
||||
//END fbolefeysot}
|
||||
//CHN_tdxHandleToCASList hCAList;
|
||||
//CHN_tdxHandleToUCCList hUCCList;
|
||||
// PLA_fn_vDesInitAllChildOfCharacter(hSO,(struct tdstEngineObject_*)HIE_fn_hGetSuperObjectObject(hSO));
|
||||
|
||||
// hChannelArray = fn_h3dDataGetChannelSOList( h3dData );
|
||||
// fn_vFreeCSOList( & hChannelArray/*, fn_ul3dDataGetNumberOfChannels(h3dData)*/);
|
||||
|
||||
// fn_v3dDataSetChannelSOList( h3dData, NULL );
|
||||
// fn_v3dDataSetFirstActiveChannel( h3dData, NULL );
|
||||
|
||||
fn_v3dDataCopyClone( (tdstEngineObject *)HIE_fn_hGetSuperObjectObject( hSO ), m_p_stEngineObject );
|
||||
memcpy(h3dData,h3dDataCopy,fn_ul3dDataSizeOf());
|
||||
|
||||
// fbolefeysot - 01/07/98{
|
||||
//END fbolefeysot}
|
||||
// hCAList = fn_h3dDataGetChannelActivationList(h3dData);
|
||||
//hUCCList = fn_h3dDataGetChannelUnderControlList(h3dData);
|
||||
// restore list on Real Actor
|
||||
// fn_v3dDataSetChannelSOList( h3dData, fn_h3dDataGetChannelSOList(h3dDataCopy) );
|
||||
// fn_v3dDataSetFirstActiveChannel(h3dData,fn_h3dDataGetFirstActiveChannel(h3dDataCopy ));
|
||||
// fn_p_st3dDataGetCurrentFrame(h3dData)->p_stArrayOfElts3d = fn_p_st3dDataGetCurrentFrame(h3dDataCopy)->p_stArrayOfElts3d;
|
||||
//fn_v3dDataSetChannelActivationList( h3dData, fn_h3dDataGetChannelActivationList(h3dDataCopy) );
|
||||
//fn_v3dDataSetChannelUnderControlList( h3dData, fn_h3dDataGetChannelUnderControlList(h3dDataCopy) );
|
||||
// reinit list on local backup structure
|
||||
// fbolefeysot - 01/07/98{
|
||||
//END fbolefeysot}
|
||||
// fn_vFreeCASList( & hCAList );
|
||||
//fn_vFreeUCCList( & hUCCList );
|
||||
//
|
||||
// fbolefeysot - 01/07/98{
|
||||
// fn_vInitCSOList( & hCSOList );
|
||||
//END fbolefeysot}
|
||||
// fn_vInitCASList( & hCAList );
|
||||
//fn_vInitUCCList( & hUCCList );
|
||||
//
|
||||
// fbolefeysot - 01/07/98{
|
||||
// fn_v3dDataSetChannelSOList( h3dDataCopy, NULL );
|
||||
// fn_v3dDataSetFirstActiveChannel( h3dDataCopy, NULL );
|
||||
// fn_p_st3dDataGetCurrentFrame(h3dDataCopy)->p_stArrayOfElts3d = NULL;
|
||||
//END fbolefeysot}
|
||||
// fn_v3dDataSetChannelActivationList( h3dDataCopy, hCAList );
|
||||
//fn_v3dDataSetChannelUnderControlList( h3dDataCopy, hUCCList );
|
||||
//
|
||||
|
||||
mfn_vClearHierarchy( m_p_oRootFromAnim, TRUE );
|
||||
m_p_oRootFromAnim -> Isolate( FALSE );
|
||||
fn_vUpdateListObjects(m_p_oRootFromAnim, E_lum_Delete, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// delete New Hierarchy
|
||||
mfn_vResetHierarchy( GetRoot() );
|
||||
}
|
||||
m_p_oRootFromAnim = NULL;
|
||||
m_eWorldType = C_eNone;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// protected functions
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Duplicate Hierarchy from _p_oPreviousFather to _p_oNewFather
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vDuplicateHierarchy(CPA_SuperObject *_p_oNewFather, CPA_SuperObject *_p_oPreviousFather)
|
||||
{
|
||||
CPA_SuperObject *p_oEdChild;
|
||||
|
||||
M_ForEachSuperObjectChild( _p_oPreviousFather, p_oEdChild )
|
||||
{
|
||||
// create new SuperObject
|
||||
CPA_SuperObject *p_oNewSprObj = M_GetCopyOfSuperObject(p_oEdChild);
|
||||
// set object of new SuperObject
|
||||
p_oNewSprObj -> SetObject( p_oEdChild -> GetObject() );
|
||||
// add new SuperObject to Hierarchy
|
||||
fn_vInsertSuperObjectInNewWorld( p_oNewSprObj, _p_oNewFather, FALSE );
|
||||
// Duplicate child Hierarchy
|
||||
mfn_vDuplicateHierarchy( p_oNewSprObj, p_oEdChild );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Duplicate Hierarchy from _p_oPreviousFather to _p_oNewFather
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vLinearizeHierarchy(CPA_SuperObject *_p_oNewFather, CPA_SuperObject *_p_oPreviousFather)
|
||||
{
|
||||
CPA_SuperObject *p_oEdChild;
|
||||
|
||||
M_ForEachSuperObjectChild( _p_oPreviousFather, p_oEdChild )
|
||||
{
|
||||
|
||||
// jt 19/8/97
|
||||
// Pour <20>viter de traiter les super-objets correspondant <20> des canaux
|
||||
// J'ai un cas ou les matrices du super objet ne sont pas correctement allou<6F>es -> plantage
|
||||
// Il y a surement mieux <20> faire.
|
||||
if (p_oEdChild->GetObject())
|
||||
{
|
||||
// end jt 19/8/97
|
||||
|
||||
// create new SuperObject
|
||||
CPA_SuperObject *p_oNewSprObj = M_GetCopyOfSuperObject(p_oEdChild);
|
||||
// unprotect SuperObject
|
||||
p_oNewSprObj -> SetEditProtected( FALSE );
|
||||
// set object of new SuperObject
|
||||
p_oNewSprObj -> SetObject( p_oEdChild -> GetObject() );
|
||||
// add new SuperObject to Hierarchy
|
||||
fn_vInsertSuperObjectInNewWorld( p_oNewSprObj, _p_oNewFather, FALSE );
|
||||
// Duplicate child Hierarchy
|
||||
mfn_vLinearizeHierarchy( _p_oNewFather, p_oEdChild );
|
||||
|
||||
|
||||
// jt 19/8/97
|
||||
}
|
||||
// end jt 19/8/97
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Delete all SuperObjects from hierarchy
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vDeleteHierarchy( CPA_SuperObject *_p_oFather )
|
||||
{
|
||||
// delete child
|
||||
CPA_SuperObject *p_oEdChild = _p_oFather -> GetSuperObjectFirstChild();
|
||||
while ( p_oEdChild )
|
||||
{
|
||||
CPA_SuperObject *p_oChild = p_oEdChild;
|
||||
// next child
|
||||
p_oEdChild = _p_oFather -> GetSuperObjectNextChild( p_oEdChild );
|
||||
// delete
|
||||
mfn_vDeleteHierarchy( p_oChild );
|
||||
}
|
||||
// remove from hierarchy
|
||||
fn_vDeleteSuperObjectInNewWorld( _p_oFather, FALSE ) ;
|
||||
// delete father
|
||||
M_T3DDeleteSuperObject( _p_oFather, TRUE );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : compute max sphere box
|
||||
// ----------------------------------------------------------------------------
|
||||
MTH_tdxReal Tool3D_World::m_fn_vComputeMaxSphereBoxRadius(void)
|
||||
{
|
||||
MTH_tdxReal xMaxSphereBoxRadius = 0;
|
||||
|
||||
CPA_SuperObject *p_oEdChild;
|
||||
M_ForEachSuperObjectChild( GetRoot(), p_oEdChild )
|
||||
{
|
||||
MTH_tdxReal xRadius = m_fn_xGetSphereBoxRadius( p_oEdChild );
|
||||
xMaxSphereBoxRadius = MTH_M_xMax( xMaxSphereBoxRadius, xRadius );
|
||||
}
|
||||
|
||||
return xMaxSphereBoxRadius;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : compute radius of object sphere box (with his child)
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vComputeSuperObjectPosFromViewer(void)
|
||||
{
|
||||
// compute max sphere box radius
|
||||
MTH_tdxReal xRadius = MTH_M_xMul(m_fn_vComputeMaxSphereBoxRadius() , 100 );
|
||||
short wIndex = 0;
|
||||
|
||||
CPA_SuperObject *p_oEdChild;
|
||||
M_ForEachSuperObjectChild( GetRoot(), p_oEdChild )
|
||||
{
|
||||
POS_tdxHandleToPosition hMatrix;
|
||||
MTH3D_tdstVector st3DCenter,st3DPosition;
|
||||
MTH3D_tdstVector stTranslation;
|
||||
|
||||
MTH3D_M_vSetVectorElements(&st3DPosition, MTH_M_xMul(xRadius,wIndex) , 0 , 0 );
|
||||
hMatrix = HIE_fn_hGetSuperObjectMatrix(p_oEdChild->GetStruct());
|
||||
POS_fn_vSetIdentityMatrix(hMatrix);
|
||||
|
||||
// get translation vector
|
||||
POS_fn_vGetTranslationVector( hMatrix, &stTranslation );
|
||||
|
||||
// First, centred with sphere box center
|
||||
if( m_fn_bGetSphereBoxCenter( p_oEdChild, &st3DCenter ) )
|
||||
{
|
||||
MTH3D_M_vSubVector(&stTranslation, &stTranslation, &st3DCenter);
|
||||
}
|
||||
// Second, place the object
|
||||
MTH3D_M_vAddVector(&stTranslation, &stTranslation, &st3DPosition);
|
||||
|
||||
// set translation vector
|
||||
POS_fn_vSetTranslationVector( hMatrix, &stTranslation );
|
||||
|
||||
// Force the absolute matrix to be recalculated
|
||||
POS_fn_vNormalizeMatrix(hMatrix);
|
||||
|
||||
wIndex++;
|
||||
}
|
||||
HIE_fn_vInvalidateAllGlobalMatrices();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Compute the sphere box radius of an object
|
||||
//--------------------------------------------------------------------------------------
|
||||
MTH_tdxReal Tool3D_World::m_fn_xGetSphereBoxRadius(CPA_SuperObject *_p_oSprObj)
|
||||
{
|
||||
MTH_tdxReal xResult;
|
||||
|
||||
if( mfn_bComputeCenterAndRadiusBoundingBox( _p_oSprObj, NULL, &xResult ) )
|
||||
return xResult;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Compute the sphere box center of an object
|
||||
//--------------------------------------------------------------------------------------
|
||||
BOOL Tool3D_World::m_fn_bGetSphereBoxCenter(CPA_SuperObject *_p_oSprObj, MTH3D_tdstVector *_p_stCenter)
|
||||
{
|
||||
CPA_BaseObject *p_oObject = _p_oSprObj -> GetObject();
|
||||
|
||||
if( p_oObject )
|
||||
{
|
||||
MTH_tdxReal xResult;
|
||||
|
||||
ACP_tdxHandleOfObject hObj = ((CPA_ObjectDLLBase*)p_oObject -> GetEditor()) -> fn_hGetBoundingVolume( p_oObject );
|
||||
if( hObj )
|
||||
{
|
||||
GEO_fn_vGetInfoFromGeometricSphere( _p_stCenter, &xResult, hObj );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Compute center of Bounding Box from geometric object
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BOOL Tool3D_World::mfn_bComputeCenterAndRadiusBoundingBox(CPA_SuperObject *_p_oSprObj, MTH3D_tdstVector *_p_stCenter /*=NULL*/, MTH_tdxReal *_xRadius /*=NULL*/)
|
||||
{
|
||||
CPA_BaseObject *p_oObject = (_p_oSprObj) ? _p_oSprObj -> GetObject() : NULL;
|
||||
|
||||
|
||||
|
||||
if( p_oObject )
|
||||
{
|
||||
MTH_tdxReal xResult;
|
||||
MTH3D_tdstVector stCenter;
|
||||
|
||||
ACP_tdxHandleOfObject hObj = ((CPA_ObjectDLLBase*)p_oObject -> GetEditor()) -> fn_hGetBoundingVolume( p_oObject );
|
||||
if( hObj )
|
||||
{
|
||||
GEO_fn_vGetInfoFromGeometricSphere( &stCenter, &xResult, hObj );
|
||||
|
||||
if( _p_stCenter )
|
||||
{
|
||||
POS_tdxHandleToPosition hMatrix;
|
||||
MTH3D_M_vNullVector( _p_stCenter );
|
||||
hMatrix = HIE_fn_hGetSuperObjectMatrix(_p_oSprObj->GetStruct());
|
||||
POS_fn_vMulMatrixVertex( _p_stCenter, hMatrix, &stCenter );
|
||||
}
|
||||
if( _xRadius )
|
||||
*_xRadius = xResult;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Author : MT
|
||||
// Creation : 20/08/97
|
||||
//
|
||||
// Description : reset hierarchy from given root
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vResetHierarchy(CPA_SuperObject *_p_oRootSO)
|
||||
{
|
||||
// delete New Hierarchy
|
||||
CPA_SuperObject *p_oEdChild = _p_oRootSO -> GetSuperObjectFirstChild();
|
||||
while ( p_oEdChild )
|
||||
{
|
||||
CPA_SuperObject *_p_oChild = p_oEdChild;
|
||||
p_oEdChild = _p_oRootSO -> GetSuperObjectNextChild( p_oEdChild );
|
||||
// delete child hierarchy
|
||||
mfn_vDeleteHierarchy( _p_oChild );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Author : MT
|
||||
// Creation : 20/08/97
|
||||
//
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vFillHierarchyWithEngineAnim( CPA_SuperObject *_p_oRootSO, BOOL _bWithObject /*=TRUE*/ )
|
||||
{
|
||||
m_xLastSOUsedPosition = m_oListOfSO . GetHeadPosition();
|
||||
//
|
||||
if( _p_oRootSO && _p_oRootSO -> GetStruct() )
|
||||
mfn_vFillHierarchy( _p_oRootSO, _bWithObject );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Author : MT
|
||||
// Creation : 20/08/97
|
||||
//
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vFillHierarchy( CPA_SuperObject *_p_oRootSO, BOOL _bWithObject /*=TRUE*/ )
|
||||
{
|
||||
HIE_tdxHandleToSuperObject hSO;
|
||||
HIE_tdxHandleToSuperObject hSOChild;
|
||||
long lIndex;
|
||||
tdxHandleToVoid hObject;
|
||||
CPA_BaseObject *p_oObject;
|
||||
CPA_SuperObject *p_oSO;
|
||||
|
||||
ASSERT( _p_oRootSO && _p_oRootSO -> GetStruct() );
|
||||
|
||||
hSO = _p_oRootSO -> GetStruct();
|
||||
lIndex = 0;
|
||||
HIE_M_ForEachChildOf( hSO, hSOChild, lIndex )
|
||||
{
|
||||
// SO
|
||||
if( m_xLastSOUsedPosition )
|
||||
{
|
||||
p_oSO = m_oListOfSO . GetNext( m_xLastSOUsedPosition );
|
||||
p_oSO -> SetSuperObjectStruct( hSOChild );
|
||||
}
|
||||
else
|
||||
{
|
||||
p_oSO = m_p_oInterface -> GetNewSuperObject( hSOChild, E_ss_NoSave );
|
||||
m_oListOfSO . AddTail( p_oSO );
|
||||
}
|
||||
ASSERT( p_oSO );
|
||||
_p_oRootSO -> AddANewChild( p_oSO, FALSE );
|
||||
fn_vUpdateListObjects( p_oSO, E_lum_Insert, FALSE);
|
||||
// Object
|
||||
if ( _bWithObject )
|
||||
{
|
||||
if( HIE_fn_ulGetSuperObjectType( hSOChild ) == HIE_C_ulPO )
|
||||
{
|
||||
hObject = HIE_fn_hGetSuperObjectObject( hSOChild );
|
||||
p_oObject = hObject ? m_p_oDLLPO -> GetBaseObject( hObject, C_szPhysicalObjectTypeName ) : NULL;
|
||||
p_oSO -> SetObject( p_oObject );
|
||||
}
|
||||
}
|
||||
// hierarchy
|
||||
if( p_oSO && p_oSO -> GetStruct() )
|
||||
mfn_vFillHierarchy( p_oSO, _bWithObject );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Author : MT
|
||||
// Creation : 21/08/97
|
||||
//
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void Tool3D_World::mfn_vClearHierarchy( CPA_SuperObject *_p_oRootSO, BOOL _bDelete /*=FALSE*/ )
|
||||
{
|
||||
CPA_SuperObject *p_oSO;
|
||||
POSITION xPos;
|
||||
|
||||
xPos = m_oListOfSO . GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
p_oSO = m_oListOfSO . GetNext( xPos );
|
||||
p_oSO -> Isolate( FALSE );
|
||||
fn_vUpdateListObjects( p_oSO, E_lum_Delete, FALSE);
|
||||
if( _bDelete )
|
||||
{
|
||||
M_T3DDeleteSuperObject( p_oSO , FALSE );
|
||||
}
|
||||
}
|
||||
m_xLastSOUsedPosition = m_oListOfSO . GetHeadPosition();
|
||||
}
|
||||
|
||||
#endif //ACTIVE_EDITOR
|
1698
Rayman_X/cpa/tempgrp/T3D/src/T3Dinterf.cpp
Normal file
10
Rayman_X/cpa/tempgrp/T3D/src/_T3d.def
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
LIBRARY
|
||||
EXPORTS
|
||||
fn_p_szGetCPAVersion
|
||||
fn_p_stGetDLLIdentity
|
||||
fn_p_oGetDLL
|
||||
fn_vInitDll
|
||||
SECTIONS
|
||||
.data READ WRITE
|
1324
Rayman_X/cpa/tempgrp/T3D/src/animview.cpp
Normal file
116
Rayman_X/cpa/tempgrp/T3D/src/dllcom.cpp
Normal file
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// Common functions for Object DLL capabilities
|
||||
// C. Beaudet
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#define HieFriend
|
||||
#include "incGam.h"
|
||||
#include "Itf.h"
|
||||
|
||||
#include "T3Dinterf.hpp"
|
||||
#include "X:\Cpa\Main\inc\_EditID.h"
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Global vars
|
||||
static char *gs_p_szCPAVersion = C_szCPAVersion;
|
||||
static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
|
||||
|
||||
#ifdef DLL_ONLY_ONE_INSTANCE
|
||||
static Tool3D_Interface *gs_p_oTool3DInterface = NULL;
|
||||
#endif
|
||||
|
||||
static CList<CPA_DLLBase*,CPA_DLLBase*> g_oListOfInstances; //private internal
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in all DLL :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//========================================================================
|
||||
// Get current CPA version
|
||||
//========================================================================
|
||||
extern "C" char __declspec(dllexport) *fn_p_szGetCPAVersion(void)
|
||||
{
|
||||
return gs_p_szCPAVersion;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Get type of this DLL
|
||||
//========================================================================
|
||||
extern "C" tdstDLLIdentity __declspec(dllexport) *fn_p_stGetDLLIdentity(void)
|
||||
{
|
||||
g_stTool3DIdentity . eType = TOOL_DLL;
|
||||
g_stTool3DIdentity . csName = C_szDLLTool3DName;
|
||||
g_stTool3DIdentity . hModule = NULL;
|
||||
g_stTool3DIdentity . p_oListOfInstances = &g_oListOfInstances;
|
||||
|
||||
return &g_stTool3DIdentity;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// DLL int function
|
||||
//========================================================================
|
||||
extern "C" void __declspec(dllexport) fn_vInitDll(void)
|
||||
{
|
||||
new CDynLinkLibrary(extensionDLL);
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// DLL entry point
|
||||
//========================================================================
|
||||
extern "C" int __stdcall DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
if (dwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
if (!AfxInitExtensionModule(extensionDLL, hInstance))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Get the DLL
|
||||
//========================================================================
|
||||
extern "C" CPA_DLLBase __declspec(dllexport) *fn_p_oGetDLL(long lKey)
|
||||
{
|
||||
#ifdef DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
if (gs_p_oTool3DInterface == NULL)
|
||||
{
|
||||
gs_p_oTool3DInterface = new Tool3D_Interface();
|
||||
ASSERT(gs_p_oTool3DInterface != NULL);
|
||||
}
|
||||
return gs_p_oTool3DInterface;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else //DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
return new Tool3D_Interface();
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif //DLL_ONLY_ONE_INSTANCE
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in this type of DLL only :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#undef DLL_ONLY_ONE_INSTANCE
|