This list is closed, nobody may subscribe to it.
| 2004 |
Jan
(6) |
Feb
(2) |
Mar
(1) |
Apr
(38) |
May
(35) |
Jun
(122) |
Jul
(64) |
Aug
(14) |
Sep
(1) |
Oct
(26) |
Nov
(38) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(290) |
Feb
(234) |
Mar
(2) |
Apr
(5) |
May
(198) |
Jun
(8) |
Jul
(230) |
Aug
(154) |
Sep
(4) |
Oct
(29) |
Nov
(1) |
Dec
|
| 2006 |
Jan
(1) |
Feb
(3) |
Mar
(5) |
Apr
(174) |
May
(2) |
Jun
(6) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
(31) |
Dec
(4) |
| 2007 |
Jan
(56) |
Feb
(151) |
Mar
(108) |
Apr
(101) |
May
(88) |
Jun
(79) |
Jul
(115) |
Aug
(1) |
Sep
(16) |
Oct
(72) |
Nov
(15) |
Dec
(33) |
| 2008 |
Jan
(221) |
Feb
(47) |
Mar
(8) |
Apr
(9) |
May
(151) |
Jun
(14) |
Jul
(13) |
Aug
(32) |
Sep
(25) |
Oct
(11) |
Nov
(19) |
Dec
(13) |
| 2009 |
Jan
(14) |
Feb
(49) |
Mar
(11) |
Apr
(80) |
May
(11) |
Jun
(3) |
Jul
(7) |
Aug
(4) |
Sep
(3) |
Oct
(6) |
Nov
(7) |
Dec
(2) |
| 2010 |
Jan
(5) |
Feb
(6) |
Mar
(2) |
Apr
(1) |
May
(4) |
Jun
(28) |
Jul
(1) |
Aug
(5) |
Sep
(6) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
| 2011 |
Jan
(2) |
Feb
(8) |
Mar
(30) |
Apr
(3) |
May
(3) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(2) |
Oct
(6) |
Nov
(6) |
Dec
(9) |
| 2012 |
Jan
(3) |
Feb
(3) |
Mar
(4) |
Apr
(5) |
May
(17) |
Jun
(22) |
Jul
(17) |
Aug
(5) |
Sep
(4) |
Oct
(1) |
Nov
(3) |
Dec
|
| 2013 |
Jan
(2) |
Feb
(2) |
Mar
(11) |
Apr
(5) |
May
(5) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2014 |
Jan
(2) |
Feb
(1) |
Mar
(12) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
|
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
| 2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
|
From: <jww...@us...> - 2018-11-02 20:31:28
|
Revision: 3360
http://sourceforge.net/p/quesa/code/3360
Author: jwwalker
Date: 2018-11-02 20:31:26 +0000 (Fri, 02 Nov 2018)
Log Message:
-----------
VRML-Reader: update projects, improve generation of vertex normals, fix compiler warnings.
Modified Paths:
--------------
trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader Visual Studio/CommonProperties.props
trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader Visual Studio/VRML-Reader.vcxproj
trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader.xcodeproj/project.pbxproj
trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-reader.xcconfig
trunk/quesa/SDK/Extras/VRML Reader/Resources/Info.plist
trunk/quesa/SDK/Extras/VRML Reader/Source/CVRMLReader.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/CreatePixelTexture.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/GetArrayFromNodeField.h
trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/PolyValue.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/IndexedLineSetV1ToObject.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/MatrixTransformV1ToObject.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/PointSetV1ToObject.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/ScaleV1ToObject.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/TranslationV1ToObject.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/AppearanceV2ToObject.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/IndexedLineSetV2ToObject.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/PointSetV2ToObject.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/quesa-methods.cpp
Modified: trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader Visual Studio/CommonProperties.props
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader Visual Studio/CommonProperties.props 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader Visual Studio/CommonProperties.props 2018-11-02 20:31:26 UTC (rev 3360)
@@ -17,6 +17,8 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
+ <AdditionalLibraryDirectories>$(BoostDir)\products</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libboost_thread-vc141-mt-s-1_65_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
Modified: trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader Visual Studio/VRML-Reader.vcxproj
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader Visual Studio/VRML-Reader.vcxproj 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader Visual Studio/VRML-Reader.vcxproj 2018-11-02 20:31:26 UTC (rev 3360)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -14,6 +14,7 @@
<ProjectGuid>{E2C46A5C-4434-46A7-8BFF-A3F4B1AA08F9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>VRMLReader</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -20,6 +21,7 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -26,6 +28,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Modified: trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader.xcodeproj/project.pbxproj
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader.xcodeproj/project.pbxproj 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-Reader.xcodeproj/project.pbxproj 2018-11-02 20:31:26 UTC (rev 3360)
@@ -66,6 +66,7 @@
BE8D826E1328AC41009324C6 /* TransformV2ToObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE8D82611328AC41009324C6 /* TransformV2ToObject.cpp */; };
BE8D82731328AC55009324C6 /* NodeV2ToObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE8D82711328AC55009324C6 /* NodeV2ToObject.cpp */; };
BE8D82741328AC55009324C6 /* ParseVRML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE8D82721328AC55009324C6 /* ParseVRML.cpp */; };
+ BE90AD3A1D9ADB7F00FF3CF4 /* error_code.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE90AD391D9ADB7F00FF3CF4 /* error_code.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
@@ -168,6 +169,7 @@
BE8D82611328AC41009324C6 /* TransformV2ToObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformV2ToObject.cpp; sourceTree = "<group>"; };
BE8D82711328AC55009324C6 /* NodeV2ToObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeV2ToObject.cpp; sourceTree = "<group>"; };
BE8D82721328AC55009324C6 /* ParseVRML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParseVRML.cpp; sourceTree = "<group>"; };
+ BE90AD391D9ADB7F00FF3CF4 /* error_code.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = error_code.cpp; path = libs/system/src/error_code.cpp; sourceTree = Boost; };
BE90C99F0AFBCC0F00976226 /* VRML-reader-prefix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = "VRML-reader-prefix.h"; path = "../Source/VRML-reader-prefix.h"; sourceTree = SOURCE_ROOT; };
BE90C9B80AFBD2AC00976226 /* VRML-reader.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "VRML-reader.xcconfig"; sourceTree = "<group>"; };
BEB01A2708EF72B000A982F8 /* IndexedFaceSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndexedFaceSet.h; sourceTree = "<group>"; };
@@ -262,6 +264,7 @@
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
+ BE90AD391D9ADB7F00FF3CF4 /* error_code.cpp */,
BE775A3109F809A5006C1ED3 /* Quesa.framework */,
);
name = "External Frameworks and Libraries";
@@ -633,6 +636,7 @@
BE8D826E1328AC41009324C6 /* TransformV2ToObject.cpp in Sources */,
BE8D82731328AC55009324C6 /* NodeV2ToObject.cpp in Sources */,
BE8D82741328AC55009324C6 /* ParseVRML.cpp in Sources */,
+ BE90AD3A1D9ADB7F00FF3CF4 /* error_code.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-reader.xcconfig
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-reader.xcconfig 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Projects/VRML-reader.xcconfig 2018-11-02 20:31:26 UTC (rev 3360)
@@ -1,11 +1,7 @@
// Architectures
-//ARCHS = ppc i386
-ARCHS = i386 x86_64
+ARCHS = x86_64
// Compiler version
-// This has implications for other settings.
-// If you use GCC 4.2 or later, you cannot use the 10.4u SDK, and PowerPC
-// code will not run on G3s.
GCC_VERSION =
//GCC_VERSION[arch=ppc] = 4.0
@@ -16,7 +12,7 @@
// Search Paths
HEADER_SEARCH_PATHS = $(Boost) $(PROJECT_DIR)/../Resources
-FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../Libraries/Mac/Framework_Universal/$(CONFIGURATION)"
+FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../Libraries/Mac/Framework_Modern/$(CONFIGURATION)"
// Build Options
DEBUG_INFORMATION_FORMAT = dwarf
@@ -35,12 +31,15 @@
INFOPLIST_PREFIX_HEADER = ../Resources/version.h
// Deployment
-MACOSX_DEPLOYMENT_TARGET = 10.6
+MACOSX_DEPLOYMENT_TARGET = 10.7
// Language
GCC_PREFIX_HEADER = ../Source/Precompiled Headers/VRML-Reader_Prefix.pch
GCC_PRECOMPILE_PREFIX_HEADER = YES
-GCC_PFE_FILE_C_DIALECTS = c++
+GCC_C_LANGUAGE_STANDARD = gnu11
+CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
+CLANG_CXX_LIBRARY = libc++
+CLANG_ENABLE_OBJC_WEAK = YES
// Code Generation
GCC_ENABLE_SYMBOL_SEPARATION = NO
@@ -47,11 +46,33 @@
GCC_FAST_MATH = YES
GCC_SYMBOLS_PRIVATE_EXTERN = YES
GCC_INLINES_ARE_PRIVATE_EXTERN = YES
+GCC_NO_COMMON_BLOCKS = YES
// Warnings
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
+CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
+CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
+CLANG_WARN_EMPTY_BODY = YES
+CLANG_WARN_BOOL_CONVERSION = YES
+CLANG_WARN_CONSTANT_CONVERSION = YES
+GCC_WARN_64_TO_32_BIT_CONVERSION = YES
+CLANG_WARN_ENUM_CONVERSION = YES
+CLANG_WARN_INT_CONVERSION = YES
+CLANG_WARN_INFINITE_RECURSION = YES
+CLANG_WARN_STRICT_PROTOTYPES = YES
+CLANG_WARN_COMMA = YES
+CLANG_WARN_UNREACHABLE_CODE = YES
+GCC_WARN_UNUSED_FUNCTION = YES
+GCC_WARN_UNUSED_VARIABLE = YES
+CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
+CLANG_WARN_SUSPICIOUS_MOVE = YES
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
+CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
// Preprocessing
-GCC_PREPROCESSOR_DEFINITIONS = QUESA_OS_MACINTOSH=1 TARGET_API_MAC_OSX=1 BOOST_SPIRIT_USE_OLD_NAMESPACE
+GCC_PREPROCESSOR_DEFINITIONS = QUESA_OS_COCOA=1 QUESA_SUPPORT_QUICKTIME=0 TARGET_API_MAC_OSX=1 BOOST_SPIRIT_USE_OLD_NAMESPACE
+ENABLE_STRICT_OBJC_MSGSEND = YES
Modified: trunk/quesa/SDK/Extras/VRML Reader/Resources/Info.plist
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Resources/Info.plist 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Resources/Info.plist 2018-11-02 20:31:26 UTC (rev 3360)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
@@ -20,5 +20,7 @@
<string>English</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
+ <key>CFBundleExecutable</key>
+ <string>VRML-Reader</string>
</dict>
</plist>
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/CVRMLReader.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/CVRMLReader.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/CVRMLReader.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -120,7 +120,7 @@
static bool StringStartsWith( const char* inMain, const char* inPrefix )
{
using namespace std;
- int preLen = strlen( inPrefix );
+ size_t preLen = strlen( inPrefix );
return 0 == memcmp( inMain, inPrefix, preLen );
}
@@ -318,7 +318,7 @@
}
*mDebugStream << "===========" << std::endl;
std::string debugText( mDebugStream->str() );
- Q3Object_SetProperty( mBaseData->storage, kDebugTextProperty, debugText.size(),
+ Q3Object_SetProperty( mBaseData->storage, kDebugTextProperty, static_cast<TQ3Uns32>(debugText.size()),
debugText.data() );
}
}
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/CreatePixelTexture.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/CreatePixelTexture.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/CreatePixelTexture.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -136,14 +136,14 @@
}
CQ3ObjectRef imageStorage( Q3MemoryStorage_New( &theImage[0],
- theImage.size() ) );
+ static_cast<TQ3Uns32>(theImage.size()) ) );
ThrowIfNullQuesaOb_( imageStorage );
TQ3StoragePixmap pixmap = {
imageStorage.get(),
- imageWidth,
- imageHeight,
- rowBytes,
+ static_cast<TQ3Uns32>(imageWidth),
+ static_cast<TQ3Uns32>(imageHeight),
+ static_cast<TQ3Uns32>(rowBytes),
32,
(componentCount == 3)? kQ3PixelTypeRGB32 : kQ3PixelTypeARGB32,
kQ3EndianBig,
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/GetArrayFromNodeField.h
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/GetArrayFromNodeField.h 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/GetArrayFromNodeField.h 2018-11-02 20:31:26 UTC (rev 3360)
@@ -122,7 +122,7 @@
void FloatVecToStructureVec( const PolyValue::FloatVec& inFloats,
std::vector<T>& outArray )
{
- const int kFloatCount = inFloats.size();
+ const size_t kFloatCount = inFloats.size();
const int kFloatsInStruct = sizeof(T) / sizeof(float);
if ( (kFloatCount % kFloatsInStruct) != 0 )
{
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -5,7 +5,7 @@
Code to handle IndexedFaceSet nodes in both VRML 1 and 2.
COPYRIGHT:
- Copyright (c) 2005-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 2005-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -76,9 +76,9 @@
*/
void CIndexedFaceSet::ReverseFaceOrientations()
{
- for (std::vector<SFace>::iterator i = mFaces.begin(); i != mFaces.end(); ++i)
+ for (SFace& aFace : mFaces)
{
- std::vector<VertIndex>& faceVerts( i->mVertices );
+ std::vector<VertIndex>& faceVerts( aFace.mVertices );
std::reverse( faceVerts.begin(), faceVerts.end() );
}
}
@@ -98,9 +98,9 @@
TQ3Vector3D theNormal;
bool hasDegenerateFaces = false;
- for (std::vector<SFace>::iterator i = mFaces.begin(); i != mFaces.end(); ++i)
+ for (SFace& aFace : mFaces)
{
- std::vector<VertIndex>& faceVerts( i->mVertices );
+ std::vector<VertIndex>& faceVerts( aFace.mVertices );
const VertIndex faceSize = faceVerts.size();
if (faceSize == 3)
{
@@ -116,7 +116,7 @@
{
len = sqrt( lenSq );
theNormal *= 1.0f/len;
- i->mNormal = mFaceNormals.size();
+ aFace.mNormal = mFaceNormals.size();
mFaceNormals.push_back( theNormal );
}
else
@@ -136,7 +136,7 @@
{
len = sqrt( lenSq );
theNormal *= 1.0f/len;
- i->mNormal = mFaceNormals.size();
+ aFace.mNormal = mFaceNormals.size();
mFaceNormals.push_back( theNormal );
}
else
@@ -223,12 +223,12 @@
}
theNormal = (1.0f/bestLen) * bestCross;
- i->mNormal = mFaceNormals.size();
+ aFace.mNormal = mFaceNormals.size();
mFaceNormals.push_back( theNormal );
if (isSomeAnglePositive and isSomeAngleNegative)
{
- i->mIsConvex = false;
+ aFace.mIsConvex = false;
}
}
else
@@ -337,6 +337,7 @@
}
}
+
/*!
@function CalcAngleAtVertex
@abstract Compute the angle that a face makes at a vertex,
@@ -350,22 +351,23 @@
const SVertex& theVert( mVertices[ inVertIndex ] );
PositionIndex cornerPos = theVert.mPosition;
const SFace& theFace( mFaces[ theVert.mFace ] );
- VertIndex legIndex1 = kNoIndex;
- VertIndex legIndex2 = kNoIndex;
- for (unsigned int i = 0; i < theFace.mVertices.size(); ++i)
+
+ // Find the given vertex among the vertices of this face.
+ size_t vertOnFace = SIZE_MAX;
+ const size_t kVertCount = theFace.mVertices.size();
+ size_t i;
+ for (i = 0; i < kVertCount; ++i)
{
- if (theFace.mVertices[i] != inVertIndex)
+ if (theFace.mVertices[i] == inVertIndex)
{
- if (legIndex1 == kNoIndex)
- {
- legIndex1 = theFace.mVertices[i];
- }
- else if (legIndex2 == kNoIndex)
- {
- legIndex2 = theFace.mVertices[i];
- }
+ vertOnFace = i;
+ break;
}
}
+
+ // Find the adjacent vertices
+ VertIndex legIndex1 = theFace.mVertices[ (vertOnFace + kVertCount - 1) % kVertCount ];
+ VertIndex legIndex2 = theFace.mVertices[ (vertOnFace + 1) % kVertCount ];
PositionIndex leg1pos = mVertices[ legIndex1 ].mPosition;
PositionIndex leg2pos = mVertices[ legIndex2 ].mPosition;
TQ3Vector3D leg1 = mPositions[ leg1pos ] - mPositions[ cornerPos ];
@@ -372,6 +374,16 @@
TQ3Vector3D leg2 = mPositions[ leg2pos ] - mPositions[ cornerPos ];
float angle = atan2f( Q3Length3D( Q3Cross3D( leg1, leg2 ) ),
Q3Dot3D( leg1, leg2 ) );
+
+ if (fabsf( angle ) < FLT_EPSILON)
+ {
+ // The angle could be zero if one of the edges adjacent to our vertex is degenerate,
+ // which does not necessarily mean that the face as a whole is degenerate.
+ // We do not want to return zero, which could result in a zero vertex normal.
+ // Better an inaccurate vertex normal than a zero one.
+ angle = 0.01f;
+ }
+
return angle;
}
@@ -438,7 +450,9 @@
for (VertIndex j = mFirstVertWithNormal[i]; j != kNoIndex;
j = mNextVertSharingNormal[j])
{
- normSum += CalcAngleAtVertex( j ) * mFaceNormals[ mVertices[j].mFace ];
+ TQ3Vector3D& theFaceNorm( mFaceNormals[ mVertices[j].mFace ] );
+ float theAngle = CalcAngleAtVertex( j );
+ normSum += theAngle * theFaceNorm;
}
vertNorm = Q3Normalize3D( normSum );
mVertexNormals.push_back( vertNorm );
@@ -528,9 +542,9 @@
{
// Make a triangle from the instances 0, i-1, and i
TQ3TriMeshTriangleData aTri;
- aTri.pointIndices[0] = mVertToPoint[ inFace.mVertices[0] ];
- aTri.pointIndices[1] = mVertToPoint[ inFace.mVertices[i-1] ];
- aTri.pointIndices[2] = mVertToPoint[ inFace.mVertices[i] ];
+ aTri.pointIndices[0] = static_cast<TQ3Uns32>(mVertToPoint[ inFace.mVertices[0] ]);
+ aTri.pointIndices[1] = static_cast<TQ3Uns32>(mVertToPoint[ inFace.mVertices[i-1] ]);
+ aTri.pointIndices[2] = static_cast<TQ3Uns32>(mVertToPoint[ inFace.mVertices[i] ]);
outTriangles.push_back( aTri );
}
}
@@ -549,7 +563,7 @@
// and split off a triangle there.
while (verts.size() > 3)
{
- int numVerts = verts.size();
+ VertIndex numVerts = verts.size();
VertIndex i;
for (i = 0; i < kNumVerts; ++i)
{
@@ -589,9 +603,9 @@
if (not isSomethingInside)
{
TQ3TriMeshTriangleData aTri = {
- mVertToPoint[ verts[i] ],
- mVertToPoint[ verts[ (i+1) % kNumVerts ] ],
- mVertToPoint[ verts[ (i+2) % kNumVerts ] ]
+ static_cast<TQ3Uns32>(mVertToPoint[ verts[i] ]),
+ static_cast<TQ3Uns32>(mVertToPoint[ verts[ (i+1) % kNumVerts ] ]),
+ static_cast<TQ3Uns32>(mVertToPoint[ verts[ (i+2) % kNumVerts ] ])
};
outTriangles.push_back( aTri );
@@ -609,9 +623,9 @@
if (verts.size() == 3)
{
TQ3TriMeshTriangleData lastTri = {
- mVertToPoint[ verts[0] ],
- mVertToPoint[ verts[ 1 ] ],
- mVertToPoint[ verts[ 2 ] ]
+ static_cast<TQ3Uns32>(mVertToPoint[ verts[0] ]),
+ static_cast<TQ3Uns32>(mVertToPoint[ verts[ 1 ] ]),
+ static_cast<TQ3Uns32>(mVertToPoint[ verts[ 2 ] ])
};
outTriangles.push_back( lastTri );
}
@@ -848,7 +862,7 @@
}
ComputeTriMeshVertexNormals( vertexNormals );
ComputeTriMeshVertexColors( vertexColors );
- Q3BoundingBox_SetFromPoints3D( &bounds, &thePoints[0], thePoints.size(),
+ Q3BoundingBox_SetFromPoints3D( &bounds, &thePoints[0], static_cast<TQ3Uns32>(thePoints.size()),
sizeof(TQ3Point3D) );
ComputeTriMeshTexCoords( thePoints, bounds, vertexUVs );
@@ -896,17 +910,17 @@
TQ3TriMeshData triMeshData =
{
NULL, // triMeshAttributeSet
- theTriangles.size(), // numTriangles
+ static_cast<TQ3Uns32>(theTriangles.size()), // numTriangles
&theTriangles[0], // triangles
- faceAttNum + 1, // numTriangleAttributeTypes
+ static_cast<TQ3Uns32>(faceAttNum + 1), // numTriangleAttributeTypes
faceAtts, // triangleAttributeTypes
0, // numEdges
NULL, // edges
0, // numEdgeAttributeTypes
NULL, // edgeAttributeTypes
- thePoints.size(), // numPoints
+ static_cast<TQ3Uns32>(thePoints.size()), // numPoints
&thePoints[0], // points
- vertAttNum + 1, // numVertexAttributeTypes
+ static_cast<TQ3Uns32>(vertAttNum + 1), // numVertexAttributeTypes
vertAtts, // vertexAttributeTypes
bounds // bBox
};
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/PolyValue.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/PolyValue.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/PolyValue.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -5,7 +5,7 @@
Class to hold polymorphic values.
COPYRIGHT:
- Copyright (c) 2005-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 2005-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -52,13 +52,6 @@
using namespace std; // sometimes lround is in std, sometimes not
-#ifdef _MSC_VER
-// Unaccountably, lround is not in math.h in Visual Studio.
-static int lround( double x )
-{
- return (x > 0.0)? static_cast<int>(x+0.5) : static_cast<int>(x-0.5);
-}
-#endif
#pragma mark struct XPolyValueImp
struct XPolyValueImp
@@ -227,7 +220,8 @@
switch (inType)
{
- default:
+ case kDataTypeUndefined:
+ // should not happen, just here to silence a warning
break;
case kDataTypeBool:
@@ -306,7 +300,7 @@
}
else if (GetType() == kDataTypeFloat)
{
- theVal = ::lround( GetFloat() );
+ theVal = static_cast<int>(::lround( GetFloat() ));
}
return theVal;
}
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/IndexedLineSetV1ToObject.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/IndexedLineSetV1ToObject.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/IndexedLineSetV1ToObject.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -130,7 +130,7 @@
{
// FInish a PolyLine
TQ3PolyLineData polyData;
- polyData.numVertices = vertices.size();
+ polyData.numVertices = static_cast<TQ3Uns32>(vertices.size());
polyData.vertices = &vertices[0];
polyData.segmentAttributeSet = NULL;
CQ3ObjectRef polyAtts;
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/MatrixTransformV1ToObject.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/MatrixTransformV1ToObject.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/MatrixTransformV1ToObject.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -78,10 +78,10 @@
if (matVec.size() == 16)
{
TQ3Matrix4x4 theMatrix = {{
- matVec[0], matVec[1], matVec[2], matVec[3],
- matVec[4], matVec[5], matVec[6], matVec[7],
- matVec[8], matVec[9], matVec[10], matVec[11],
- matVec[12], matVec[13], matVec[14], matVec[15]
+ static_cast<float>(matVec[0]), static_cast<float>(matVec[1]), static_cast<float>(matVec[2]), static_cast<float>(matVec[3]),
+ static_cast<float>(matVec[4]), static_cast<float>(matVec[5]), static_cast<float>(matVec[6]), static_cast<float>(matVec[7]),
+ static_cast<float>(matVec[8]), static_cast<float>(matVec[9]), static_cast<float>(matVec[10]), static_cast<float>(matVec[11]),
+ static_cast<float>(matVec[12]), static_cast<float>(matVec[13]), static_cast<float>(matVec[14]), static_cast<float>(matVec[15])
}};
theTransform = CQ3ObjectRef( Q3MatrixTransform_New( &theMatrix ) );
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/PointSetV1ToObject.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/PointSetV1ToObject.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/PointSetV1ToObject.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -100,8 +100,8 @@
theObject = CQ3ObjectRef( Q3DisplayGroup_New() );
ThrowIfNullQuesaOb_( theObject );
- int endIndex = (numPoints < 0)? thePoints.size() :
- std::min<int>( startIndex + numPoints, thePoints.size() );
+ int endIndex = (numPoints < 0)? static_cast<int>(thePoints.size()) :
+ std::min<int>( startIndex + numPoints, static_cast<int>(thePoints.size()) );
// In VRML 2, points are not lit. I will take that easy way
// instead of worrying about normals.
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/ScaleV1ToObject.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/ScaleV1ToObject.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/ScaleV1ToObject.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -78,7 +78,7 @@
if (transVec.size() == 3)
{
TQ3Vector3D scale = {
- transVec[0], transVec[1], transVec[2]
+ static_cast<float>(transVec[0]), static_cast<float>(transVec[1]), static_cast<float>(transVec[2])
};
theTransform = CQ3ObjectRef( Q3ScaleTransform_New( &scale ) );
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/TranslationV1ToObject.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/TranslationV1ToObject.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 1/VRML1 node handlers/TranslationV1ToObject.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -78,7 +78,7 @@
if (transVec.size() == 3)
{
TQ3Vector3D translate = {
- transVec[0], transVec[1], transVec[2]
+ static_cast<float>(transVec[0]), static_cast<float>(transVec[1]), static_cast<float>(transVec[2])
};
theTransform = CQ3ObjectRef( Q3TranslateTransform_New( &translate ) );
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/AppearanceV2ToObject.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/AppearanceV2ToObject.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/AppearanceV2ToObject.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -120,7 +120,7 @@
if (diffColorVec.size() == 3)
{
TQ3ColorRGB diffColor = {
- diffColorVec[0], diffColorVec[1], diffColorVec[2]
+ static_cast<float>(diffColorVec[0]), static_cast<float>(diffColorVec[1]), static_cast<float>(diffColorVec[2])
};
ValidateColor( diffColor, "diffuse", inReader );
Q3AttributeSet_Add( ioAttSet.get(), kQ3AttributeTypeDiffuseColor, &diffColor );
@@ -143,7 +143,7 @@
if (emissiveColorVec.size() == 3)
{
TQ3ColorRGB emissiveColor = {
- emissiveColorVec[0], emissiveColorVec[1], emissiveColorVec[2]
+ static_cast<float>(emissiveColorVec[0]), static_cast<float>(emissiveColorVec[1]), static_cast<float>(emissiveColorVec[2])
};
ValidateColor( emissiveColor, "emissive", inReader );
Q3AttributeSet_Add( ioAttSet.get(), kQ3AttributeTypeEmissiveColor, &emissiveColor );
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/IndexedLineSetV2ToObject.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/IndexedLineSetV2ToObject.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/IndexedLineSetV2ToObject.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -129,7 +129,7 @@
{
// FInish a PolyLine
TQ3PolyLineData polyData;
- polyData.numVertices = vertices.size();
+ polyData.numVertices = static_cast<TQ3Uns32>( vertices.size() );
polyData.vertices = &vertices[0];
polyData.segmentAttributeSet = NULL;
CQ3ObjectRef polyAtts;
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/PointSetV2ToObject.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/PointSetV2ToObject.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/VRML 2/VRML2 node handlers/PointSetV2ToObject.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -88,8 +88,8 @@
std::vector<TQ3ColorRGB> theColors;
GetNodeArray( theDict, "color", "Color", "color", theColors );
- unsigned int i;
- const unsigned int kNumPoints = thePoints.size();
+ size_t i;
+ const size_t kNumPoints = thePoints.size();
if (theColors.size() >= kNumPoints)
{
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/quesa-methods.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/quesa-methods.cpp 2018-10-22 00:46:42 UTC (rev 3359)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/quesa-methods.cpp 2018-11-02 20:31:26 UTC (rev 3360)
@@ -305,7 +305,7 @@
*/
static TQ3Status GetNickname( char* dataBuffer, TQ3Uns32 bufferSize, TQ3Uns32* outActualSize )
{
- *outActualSize = strlen( kFormatNickname ) + 1;
+ *outActualSize = static_cast<TQ3Uns32>( strlen( kFormatNickname ) + 1 );
if (dataBuffer != NULL)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2018-10-22 00:46:45
|
Revision: 3359
http://sourceforge.net/p/quesa/code/3359
Author: jwwalker
Date: 2018-10-22 00:46:42 +0000 (Mon, 22 Oct 2018)
Log Message:
-----------
Add clang nullability markup to pointers in public functions and structures, and fix resulting warnings.
Modified Paths:
--------------
trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig
trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryDisk.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipse.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipsoid.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryGeneralPolygon.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryLine.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryMarker.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryMesh.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBCurve.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBPatch.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPixmapMarker.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPoint.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyLine.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolygon.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyhedron.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTorus.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriGrid.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.cpp
trunk/quesa/Development/Source/Core/Support/E3Tessellate.cpp
trunk/quesa/Development/Source/Core/Support/E3Utils.cpp
trunk/quesa/Development/Source/Core/System/E3CustomElements.cpp
trunk/quesa/Development/Source/Core/System/E3IOData.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRGeometry.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOGeometry.cpp
trunk/quesa/SDK/Includes/Quesa/Quesa.h
trunk/quesa/SDK/Includes/Quesa/QuesaCamera.h
trunk/quesa/SDK/Includes/Quesa/QuesaCustomElements.h
trunk/quesa/SDK/Includes/Quesa/QuesaDrawContext.h
trunk/quesa/SDK/Includes/Quesa/QuesaErrors.h
trunk/quesa/SDK/Includes/Quesa/QuesaExtension.h
trunk/quesa/SDK/Includes/Quesa/QuesaGeometry.h
trunk/quesa/SDK/Includes/Quesa/QuesaGroup.h
trunk/quesa/SDK/Includes/Quesa/QuesaIO.h
trunk/quesa/SDK/Includes/Quesa/QuesaLight.h
trunk/quesa/SDK/Includes/Quesa/QuesaMath.h
trunk/quesa/SDK/Includes/Quesa/QuesaMathOperators.hpp
trunk/quesa/SDK/Includes/Quesa/QuesaMemory.h
trunk/quesa/SDK/Includes/Quesa/QuesaPick.h
trunk/quesa/SDK/Includes/Quesa/QuesaRenderer.h
trunk/quesa/SDK/Includes/Quesa/QuesaSet.h
trunk/quesa/SDK/Includes/Quesa/QuesaShader.h
trunk/quesa/SDK/Includes/Quesa/QuesaStorage.h
trunk/quesa/SDK/Includes/Quesa/QuesaString.h
trunk/quesa/SDK/Includes/Quesa/QuesaStyle.h
trunk/quesa/SDK/Includes/Quesa/QuesaTransform.h
trunk/quesa/SDK/Includes/Quesa/QuesaView.h
Modified: trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
===================================================================
--- trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-10-22 00:46:42 UTC (rev 3359)
@@ -1691,6 +1691,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BE499C9A0F145E950060DF4E /* Quesa-framework.xcconfig */;
buildSettings = {
+ CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
@@ -1706,6 +1708,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BE499C9A0F145E950060DF4E /* Quesa-framework.xcconfig */;
buildSettings = {
+ CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.Quesa.Quesa;
};
Modified: trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig
===================================================================
--- trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig 2018-10-22 00:46:42 UTC (rev 3359)
@@ -57,7 +57,7 @@
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
-CLANG_WARN_SUSPICIOUS_MOVE = YESå
+CLANG_WARN_SUSPICIOUS_MOVE = YES
QUESA_WARNINGS_ONLY_CXX = -Wabi -Wsign-promo
// Objective C-only.
@@ -69,7 +69,7 @@
QUESA_WARNINGS_ONLY_OBJC = -Wstrict-selector-match -Wundeclared-selector
// Other warnings for which Xcode has no explicit setting.
-WARNING_CFLAGS = -Wzero-as-null-pointer-constant -Wendif-labels -Wlarger-than-30000 -Wpointer-arith -Wcast-align -Wwrite-strings -Wpacked -Winvalid-pch -Wdisabled-optimization $(QUESA_WARNINGS_ONLY_CXX) $(QUESA_WARNINGS_ONLY_OBJC)
+WARNING_CFLAGS = -Wzero-as-null-pointer-constant -Wendif-labels -Wlarger-than-30000 -Wpointer-arith -Wcast-align -Wwrite-strings -Wpacked -Winvalid-pch -Wdisabled-optimization $(QUESA_WARNINGS_ONLY_CXX) $(QUESA_WARNINGS_ONLY_OBJC) -Wnullable-to-nonnull-conversion
// These generate many warnings (and so are off), but the warnings are mostly harmless.
GCC_WARN_UNUSED_VARIABLE = NO
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Box geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -186,6 +186,7 @@
{
#pragma unused(fromPrivateData)
#pragma unused(toPrivateData)
+ TQ3AttributeSet atts;
@@ -205,8 +206,9 @@
// Duplicate the attribute sets
- if ( fromBox->instanceData.boxAttributeSet != nullptr )
- toBox->instanceData.boxAttributeSet = Q3Object_Duplicate ( fromBox->instanceData.boxAttributeSet ) ;
+ atts = fromBox->instanceData.boxAttributeSet;
+ if ( atts != nullptr )
+ toBox->instanceData.boxAttributeSet = Q3Object_Duplicate( atts );
if ( fromBox->instanceData.faceAttributeSet != nullptr )
{
@@ -217,12 +219,15 @@
{
// duplicate the face attributes
for ( TQ3Uns32 n = 0 ; n < 6 ; ++n )
- if ( fromBox->instanceData.faceAttributeSet [ n ] != nullptr )
- toBox->instanceData.faceAttributeSet [ n ] = Q3Object_Duplicate ( fromBox->instanceData.faceAttributeSet [ n ] ) ;
+ {
+ atts = fromBox->instanceData.faceAttributeSet[ n ];
+ if ( atts != nullptr )
+ toBox->instanceData.faceAttributeSet [ n ] = Q3Object_Duplicate( atts );
else
toBox->instanceData.faceAttributeSet [ n ] = nullptr ;
}
}
+ }
return kQ3Success ;
}
@@ -515,8 +520,9 @@
// Add the box attributes
- if (inBoxData->boxAttributeSet != nullptr)
- Q3Group_AddObject( theGroup, inBoxData->boxAttributeSet );
+ TQ3AttributeSet atts = inBoxData->boxAttributeSet;
+ if (atts != nullptr)
+ Q3Group_AddObject( theGroup, atts );
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Cone geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -83,6 +83,7 @@
e3geom_cone_copydata(const TQ3ConeData *src, TQ3ConeData *dst, TQ3Boolean isDuplicate)
{
TQ3Status qd3dStatus = kQ3Success;
+ TQ3AttributeSet atts;
// copy raw data
const TQ3Uns32 theSize = sizeof(TQ3Point3D) // origin
@@ -94,27 +95,31 @@
// copy or shared-replace the attributes
if (isDuplicate)
{
- if (src->interiorAttributeSet != nullptr)
+ atts = src->interiorAttributeSet;
+ if (atts != nullptr)
{
- dst->interiorAttributeSet = Q3Object_Duplicate(src->interiorAttributeSet);
+ dst->interiorAttributeSet = Q3Object_Duplicate( atts );
if (dst->interiorAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->interiorAttributeSet = nullptr;
- if (src->faceAttributeSet != nullptr)
+ atts = src->faceAttributeSet;
+ if (atts != nullptr)
{
- dst->faceAttributeSet = Q3Object_Duplicate(src->faceAttributeSet);
+ dst->faceAttributeSet = Q3Object_Duplicate(atts);
if (dst->faceAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->faceAttributeSet = nullptr;
+ atts = src->bottomAttributeSet;
if (src->bottomAttributeSet != nullptr)
{
- dst->bottomAttributeSet = Q3Object_Duplicate(src->bottomAttributeSet);
+ dst->bottomAttributeSet = Q3Object_Duplicate( atts );
if (dst->bottomAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->bottomAttributeSet = nullptr;
- if (src->coneAttributeSet != nullptr)
+ atts = src->coneAttributeSet;
+ if (atts != nullptr)
{
- dst->coneAttributeSet = Q3Object_Duplicate(src->coneAttributeSet);
+ dst->coneAttributeSet = Q3Object_Duplicate(atts);
if (dst->coneAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->coneAttributeSet = nullptr;
}
@@ -745,8 +750,9 @@
// Add the cone attributes
- if (geomData->coneAttributeSet != nullptr)
- Q3Group_AddObject( theGroup, geomData->coneAttributeSet );
+ TQ3AttributeSet atts = geomData->coneAttributeSet;
+ if (atts != nullptr)
+ Q3Group_AddObject( theGroup, atts );
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Cylinder geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -83,6 +83,7 @@
e3geom_cylinder_copydata(const TQ3CylinderData *src, TQ3CylinderData *dst, TQ3Boolean isDuplicate)
{
TQ3Status qd3dStatus = kQ3Success;
+ TQ3AttributeSet atts;
// copy raw data
const TQ3Uns32 theSize = sizeof(TQ3Point3D) // origin
@@ -94,33 +95,38 @@
// copy or shared-replace the attributes
if (isDuplicate)
{
- if (src->interiorAttributeSet != nullptr)
+ atts = src->interiorAttributeSet;
+ if (atts != nullptr)
{
- dst->interiorAttributeSet = Q3Object_Duplicate(src->interiorAttributeSet);
+ dst->interiorAttributeSet = Q3Object_Duplicate(atts);
if (dst->interiorAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->interiorAttributeSet = nullptr;
- if (src->faceAttributeSet != nullptr)
+ atts = src->faceAttributeSet;
+ if (atts != nullptr)
{
- dst->faceAttributeSet = Q3Object_Duplicate(src->faceAttributeSet);
+ dst->faceAttributeSet = Q3Object_Duplicate(atts);
if (dst->faceAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->faceAttributeSet = nullptr;
- if (src->topAttributeSet != nullptr)
+ atts = src->topAttributeSet;
+ if (atts != nullptr)
{
- dst->topAttributeSet = Q3Object_Duplicate(src->topAttributeSet);
+ dst->topAttributeSet = Q3Object_Duplicate(atts);
if (dst->topAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->topAttributeSet = nullptr;
- if (src->bottomAttributeSet != nullptr)
+ atts = src->bottomAttributeSet;
+ if (atts != nullptr)
{
- dst->bottomAttributeSet = Q3Object_Duplicate(src->bottomAttributeSet);
+ dst->bottomAttributeSet = Q3Object_Duplicate(atts);
if (dst->bottomAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->bottomAttributeSet = nullptr;
- if (src->cylinderAttributeSet != nullptr)
+ atts = src->cylinderAttributeSet;
+ if (atts != nullptr)
{
- dst->cylinderAttributeSet = Q3Object_Duplicate(src->cylinderAttributeSet);
+ dst->cylinderAttributeSet = Q3Object_Duplicate(atts);
if (dst->cylinderAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->cylinderAttributeSet = nullptr;
}
@@ -360,8 +366,9 @@
// Add the cone attributes
- if (geomData->cylinderAttributeSet != nullptr)
- Q3Group_AddObject( theGroup, geomData->cylinderAttributeSet );
+ TQ3AttributeSet atts = geomData->cylinderAttributeSet;
+ if (atts != nullptr)
+ Q3Group_AddObject( theGroup, atts );
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryDisk.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryDisk.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryDisk.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Pixmap Marker geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -140,8 +140,9 @@
if ( (qd3dStatus == kQ3Success) &&
(toInstanceData->diskAttributeSet != nullptr) )
{
- dupSet = Q3Object_Duplicate( toInstanceData->diskAttributeSet );
- Q3Object_Dispose( toInstanceData->diskAttributeSet );
+ TQ3AttributeSet srcAtts = toInstanceData->diskAttributeSet;
+ dupSet = Q3Object_Duplicate( srcAtts );
+ Q3Object_Dispose( srcAtts );
toInstanceData->diskAttributeSet = dupSet;
if (dupSet == nullptr)
{
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipse.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipse.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipse.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -139,8 +139,9 @@
if ( (qd3dStatus == kQ3Success) &&
(toInstanceData->ellipseAttributeSet != nullptr) )
{
- dupSet = Q3Object_Duplicate( toInstanceData->ellipseAttributeSet );
- Q3Object_Dispose( toInstanceData->ellipseAttributeSet );
+ TQ3AttributeSet srcAtts = toInstanceData->ellipseAttributeSet;
+ dupSet = Q3Object_Duplicate( srcAtts );
+ Q3Object_Dispose( srcAtts );
toInstanceData->ellipseAttributeSet = dupSet;
if (dupSet == nullptr)
{
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipsoid.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipsoid.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipsoid.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Ellipsoid geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -86,6 +86,7 @@
e3geom_ellipsoid_copydata(const TQ3EllipsoidData *src, TQ3EllipsoidData *dst, TQ3Boolean isDuplicate)
{
TQ3Status qd3dStatus = kQ3Success;
+ TQ3AttributeSet srcAtts;
// copy raw data
const TQ3Uns32 theSize = sizeof(TQ3Point3D) // origin
@@ -99,13 +100,15 @@
{
if (src->interiorAttributeSet != nullptr)
{
- dst->interiorAttributeSet = Q3Object_Duplicate(src->interiorAttributeSet);
+ srcAtts = src->interiorAttributeSet;
+ dst->interiorAttributeSet = Q3Object_Duplicate(srcAtts);
if (dst->interiorAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->interiorAttributeSet = nullptr;
if (src->ellipsoidAttributeSet != nullptr)
{
- dst->ellipsoidAttributeSet = Q3Object_Duplicate(src->ellipsoidAttributeSet);
+ srcAtts = src->ellipsoidAttributeSet;
+ dst->ellipsoidAttributeSet = Q3Object_Duplicate(srcAtts);
if (dst->ellipsoidAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->ellipsoidAttributeSet = nullptr;
}
@@ -917,9 +920,10 @@
// necessary to do this, instead of putting it in the main TriMesh, so
// that these attributes can be inherited by caps even if there is also
// an interiorAttributeSet.
- if (geomData->ellipsoidAttributeSet != nullptr)
+ TQ3AttributeSet atts = geomData->ellipsoidAttributeSet;
+ if (atts != nullptr)
{
- Q3Group_AddObject( resultGroup.get(), geomData->ellipsoidAttributeSet );
+ Q3Group_AddObject( resultGroup.get(), atts );
}
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryGeneralPolygon.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryGeneralPolygon.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryGeneralPolygon.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Pixmap Marker geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -146,7 +146,8 @@
}
else if (isDuplicate)
{
- dst->generalPolygonAttributeSet = Q3Object_Duplicate( src->generalPolygonAttributeSet );
+ TQ3AttributeSet srcAtts = src->generalPolygonAttributeSet; // silence a nullability warning
+ dst->generalPolygonAttributeSet = Q3Object_Duplicate( srcAtts );
if (dst->generalPolygonAttributeSet == nullptr)
qd3dStatus = kQ3Failure;
}
@@ -175,7 +176,9 @@
dst->contours[ contourIndex ].vertices[vertexIndex].point =
src->contours[ contourIndex ].vertices[vertexIndex].point;
- if (src->contours[ contourIndex ].vertices[vertexIndex].attributeSet == nullptr)
+ TQ3AttributeSet srcAtts = src->contours[ contourIndex ].vertices[vertexIndex].attributeSet;
+
+ if (srcAtts == nullptr)
{
dst->contours[ contourIndex ].vertices[vertexIndex].attributeSet = nullptr;
}
@@ -182,8 +185,7 @@
else if (isDuplicate)
{
dst->contours[ contourIndex ].vertices[vertexIndex].attributeSet =
- Q3Object_Duplicate(
- src->contours[ contourIndex ].vertices[vertexIndex].attributeSet );
+ Q3Object_Duplicate( srcAtts );
if (dst->contours[ contourIndex ].vertices[vertexIndex].attributeSet == nullptr)
qd3dStatus = kQ3Failure;
@@ -219,7 +221,7 @@
e3geom_generalpolygon_duplicate(TQ3Object fromObject, const void *fromPrivateData,
TQ3Object toObject, void *toPrivateData)
{ TQ3GeneralPolygonData *toInstanceData = (TQ3GeneralPolygonData *) toPrivateData;
- TQ3GeneralPolygonData *fromInstanceData = (TQ3GeneralPolygonData *) fromPrivateData;
+ const TQ3GeneralPolygonData *fromInstanceData = (const TQ3GeneralPolygonData *) fromPrivateData;
TQ3Status qd3dStatus;
#pragma unused(toObject)
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryLine.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryLine.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryLine.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Line geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -48,6 +48,7 @@
#include "E3Pick.h"
#include "E3Geometry.h"
#include "E3GeometryLine.h"
+#include "QuesaMathOperators.hpp"
@@ -232,41 +233,43 @@
{
TQ3Uns32 n;
TQ3Status q3status = kQ3Success;
+ TQ3AttributeSet atts;
for (n = 0; n < 2; ++n)
{
dst->vertices[n].point = src->vertices[n].point;
-
- if (src->vertices[n].attributeSet == nullptr)
+ atts = src->vertices[n].attributeSet;
+ if (atts == nullptr)
{
dst->vertices[n].attributeSet = nullptr;
}
else if (isDuplicate)
{
- dst->vertices[n].attributeSet = Q3Object_Duplicate( src->vertices[n].attributeSet );
+ dst->vertices[n].attributeSet = Q3Object_Duplicate( atts );
if (dst->vertices[n].attributeSet == nullptr)
q3status = kQ3Failure;
}
else
{
- E3Shared_Acquire( &dst->vertices[n].attributeSet, src->vertices[n].attributeSet );
+ E3Shared_Acquire( &dst->vertices[n].attributeSet, atts );
}
}
- if (src->lineAttributeSet == nullptr)
+ atts = src->lineAttributeSet;
+ if (atts == nullptr)
{
dst->lineAttributeSet = nullptr;
}
else if (isDuplicate)
{
- dst->lineAttributeSet = Q3Object_Duplicate( src->lineAttributeSet );
+ dst->lineAttributeSet = Q3Object_Duplicate( atts );
if (dst->lineAttributeSet == nullptr)
q3status = kQ3Failure;
}
else
{
- E3Shared_Acquire( &dst->lineAttributeSet, src->lineAttributeSet );
+ E3Shared_Acquire( &dst->lineAttributeSet, atts );
}
@@ -291,7 +294,7 @@
e3geom_line_duplicate(TQ3Object fromObject, const void *fromPrivateData,
TQ3Object toObject, void *toPrivateData)
{ TQ3LineData *toInstanceData = (TQ3LineData *) toPrivateData;
- TQ3LineData *fromInstanceData = (TQ3LineData *) fromPrivateData;
+ const TQ3LineData *fromInstanceData = (const TQ3LineData *) fromPrivateData;
TQ3Status qd3dStatus;
#pragma unused(toObject)
@@ -334,13 +337,13 @@
// Get the pick data
- Q3WindowPointPick_GetData(thePick, &pickData);
+ E3WindowPointPick_GetData(thePick, &pickData);
// Transform our points
- Q3View_TransformLocalToWindow(theView, &instanceData->vertices[0].point, &windowPoints[0]);
- Q3View_TransformLocalToWindow(theView, &instanceData->vertices[1].point, &windowPoints[1]);
+ E3View_TransformLocalToWindow(theView, &instanceData->vertices[0].point, &windowPoints[0]);
+ E3View_TransformLocalToWindow(theView, &instanceData->vertices[1].point, &windowPoints[1]);
@@ -347,16 +350,16 @@
// Calculate the distance d along the line to its closest point to the pick point.
// If it's outside the range 0-1 then the closest point is before or after the
// bounds of the line and so we know we can't possibly have a hit.
- Q3FastPoint2D_Subtract(&pickData.point, &windowPoints[0], &windowStartToPick);
- Q3FastPoint2D_Subtract(&windowPoints[1], &windowPoints[0], &windowStartToEnd);
+ windowStartToPick = pickData.point - windowPoints[0];
+ windowStartToEnd = windowPoints[1] - windowPoints[0];
- float windowLineLenSq = Q3FastVector2D_LengthSquared(&windowStartToEnd);
+ float windowLineLenSq = Q3LengthSquared2D( windowStartToEnd );
if (windowLineLenSq < kQ3RealZero)
{
// Line is edge-on; we do not want to divide by 0, let's say there is no hit.
return(kQ3Success);
}
- d = Q3FastVector2D_Dot(&windowStartToPick, &windowStartToEnd) / windowLineLenSq;
+ d = Q3Dot2D( windowStartToPick, windowStartToEnd ) / windowLineLenSq;
if (d < 0.0f || d > 1.0f)
return(kQ3Success);
@@ -363,14 +366,13 @@
// Scale the line vector by d to obtain its closest point to the pick point
- Q3Vector2D_Scale(&windowStartToEnd, d, &windowStartToEnd);
- Q3Point2D_Vector2D_Add(&windowPoints[0], &windowStartToEnd, &hitXY);
+ hitXY = windowPoints[0] + d * windowStartToEnd;
// Get the distance between that point and the pick point
- Q3Point2D_Subtract(&pickData.point, &hitXY, &windowHitToPick);
- d = Q3Vector2D_Length(&windowHitToPick);
+ windowHitToPick = pickData.point - hitXY;
+ d = Q3Length2D( windowHitToPick );
@@ -380,52 +382,67 @@
if (d <= pickData.edgeTolerance)
{
// Create a world to window matrix
- Q3View_GetWorldToFrustumMatrixState(theView, &worldToFrustum);
- Q3View_GetFrustumToWindowMatrixState(theView, &frustumToWindow);
- Q3Matrix4x4_Multiply(&worldToFrustum, &frustumToWindow, &worldToWindow);
+ E3View_GetWorldToFrustumMatrixState(theView, &worldToFrustum);
+ E3View_GetFrustumToWindowMatrixState(theView, &frustumToWindow);
+ worldToWindow = worldToFrustum * frustumToWindow;
// Calculate the intersection point on the 3D line
- Q3View_TransformLocalToWorld(theView, &instanceData->vertices[0].point, &worldPoints[0]);
- Q3View_TransformLocalToWorld(theView, &instanceData->vertices[1].point, &worldPoints[1]);
+ const TQ3Matrix4x4* localToWorld = E3View_State_GetMatrixLocalToWorld(theView);
+ worldPoints[0] = instanceData->vertices[0].point * *localToWorld;
+ worldPoints[1] = instanceData->vertices[1].point * *localToWorld;
- Q3Point3D_Subtract(&worldPoints[1], &worldPoints[0], &worldStartToEnd);
+ worldStartToEnd = worldPoints[1] - worldPoints[0];
+
+ // We want to find a scalar t such that
+ // (worldPoints[0] + t * worldStartToEnd) * worldToWindow,
+ // when projected into 2D window space, is hitXY. You do that
+ // projection by dividing the x coordinate by the w coordinate:
+ // hitXY.x = ((worldPoints[0] + t * worldStartToEnd) * worldToWindow).x
+ // ----------------------------------------------------------
+ // ((worldPoints[0] + t * worldStartToEnd) * worldToWindow).w
+ // =
+ // (worldPoints[0] * worldToWindow).x + t * (worldStartToEnd * worldToWindow).x
+ // ----------------------------------------------------------------------------
+ // (worldPoints[0] * worldToWindow).w + t * (worldStartToEnd * worldToWindow).w
+ // and there is a similar equation
+ // hitXY.y =
+ // (worldPoints[0] * worldToWindow).x + t * (worldStartToEnd * worldToWindow).y
+ // ----------------------------------------------------------------------------
+ // (worldPoints[0] * worldToWindow).w + t * (worldStartToEnd * worldToWindow).w
+
+ // Let's do the matrix multiplications.
+ TQ3RationalPoint4D winStart = Q3ToRational4D(worldPoints[0]) * worldToWindow;
+ TQ3RationalPoint4D winVec = Q3ToRational4D(worldStartToEnd) * worldToWindow;
+
+ // Now our equations become
+ // hitXY.x = (winStart.x + t * winVec.x) / (winStart.w + t * winVec.w)
+ // and
+ // hitXY.y = (winStart.y + t * winVec.y) / (winStart.w + t * winVec.w) .
+ // These can be transformed into linear equations and solved for t.
+ // winStart.x + t * winVec.x = hitXY.x * (winStart.w + t * winVec.w)
+ // t * (hitXY.x * winVec.w - winVec.x) = winStart.x - hitXY.x * winStart.w
+ // t = (winStart.x - hitXY.x * winStart.w) / (hitXY.x * winVec.w - winVec.x)
+ // and similarly
+ // t = (winStart.y - hitXY.y * winStart.w) / (hitXY.y * winVec.w - winVec.y) .
+ // In general, either equation would suffice, but we do not want to divide
+ // by 0, and we expect a more accurate result if the denominator is
+ // larger in magnitude.
+
+ divisorX = hitXY.x * winVec.w - winVec.x;
+ divisorY = hitXY.y * winVec.w - winVec.y;
+ float t;
- divisorX = ( worldToWindow.value[0][3] * worldStartToEnd.x +
- worldToWindow.value[1][3] * worldStartToEnd.y +
- worldToWindow.value[2][3] * worldStartToEnd.z ) * hitXY.x -
- worldToWindow.value[0][0] * worldStartToEnd.x -
- worldToWindow.value[1][0] * worldStartToEnd.y -
- worldToWindow.value[2][0] * worldStartToEnd.z;
-
- divisorY = ( worldToWindow.value[0][3] * worldStartToEnd.x +
- worldToWindow.value[1][3] * worldStartToEnd.y +
- worldToWindow.value[2][3] * worldStartToEnd.z ) * hitXY.y -
- worldToWindow.value[0][1] * worldStartToEnd.x -
- worldToWindow.value[1][1] * worldStartToEnd.y -
- worldToWindow.value[2][1] * worldStartToEnd.z;
-
- if ( divisorX * divisorX >= divisorY * divisorY )
- d = ( ( worldToWindow.value[0][3] * worldPoints[0].x +
- worldToWindow.value[1][3] * worldPoints[0].y +
- worldToWindow.value[2][3] * worldPoints[0].z +
- worldToWindow.value[3][3] ) * hitXY.x -
- worldToWindow.value[0][0] * worldPoints[0].x -
- worldToWindow.value[1][0] * worldPoints[0].y -
- worldToWindow.value[2][0] * worldPoints[0].z -
- worldToWindow.value[3][0] ) / -divisorX;
+ if (fabsf( divisorX ) >= fabsf( divisorY ))
+ {
+ t = (winStart.x - hitXY.x * winStart.w) / divisorX;
+ }
else
- d = ( ( worldToWindow.value[0][3] * worldPoints[0].x +
- worldToWindow.value[1][3] * worldPoints[0].y +
- worldToWindow.value[2][3] * worldPoints[0].z +
- worldToWindow.value[3][3] ) * hitXY.y -
- worldToWindow.value[0][1] * worldPoints[0].x -
- worldToWindow.value[1][1] * worldPoints[0].y -
- worldToWindow.value[2][1] * worldPoints[0].z -
- worldToWindow.value[3][1] ) / -divisorY;
+ {
+ t = (winStart.y - hitXY.y * winStart.w) / divisorY;
+ }
- Q3Vector3D_Scale(&worldStartToEnd, d, &worldStartToEnd);
- Q3Point3D_Vector3D_Add(&worldPoints[0], &worldStartToEnd, &hitXYZ);
+ hitXYZ = worldPoints[0] + t * worldStartToEnd;
// Record the hit
@@ -488,7 +505,6 @@
TQ3Status qd3dStatus = kQ3Success;
TQ3Point3D worldSegment[2];
TQ3Point3D worldPoints[2];
- TQ3Vector3D theVector;
TQ3WorldRayPickData pickData;
float d;
@@ -495,13 +511,13 @@
// Get the pick data
- Q3WorldRayPick_GetData(thePick, &pickData);
+ E3WorldRayPick_GetData(thePick, &pickData);
// Transform our points
- Q3View_TransformLocalToWorld(theView, &instanceData->vertices[0].point, &worldPoints[0]);
- Q3View_TransformLocalToWorld(theView, &instanceData->vertices[1].point, &worldPoints[1]);
+ E3View_TransformLocalToWorld(theView, &instanceData->vertices[0].point, &worldPoints[0]);
+ E3View_TransformLocalToWorld(theView, &instanceData->vertices[1].point, &worldPoints[1]);
@@ -512,8 +528,7 @@
// Calculate the distance between the closest point and the ray
- Q3Point3D_Subtract(&worldSegment[1], &worldSegment[0], &theVector);
- d = Q3Vector3D_Length(&theVector);
+ d = Q3Length3D( worldSegment[1] - worldSegment[0] );
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryMarker.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryMarker.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryMarker.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Marker geometry class.
COPYRIGHT:
- Copyright (c) 1999-2013, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -188,11 +188,12 @@
// Copy the data from fromObject to toObject
qd3dStatus = Q3Marker_GetData(fromObject, toInstanceData);
+ TQ3AttributeSet srcAtts = toInstanceData->markerAttributeSet;
if ( (qd3dStatus == kQ3Success) &&
- (toInstanceData->markerAttributeSet != nullptr) )
+ (srcAtts != nullptr) )
{
- dupSet = Q3Object_Duplicate( toInstanceData->markerAttributeSet );
- Q3Object_Dispose( toInstanceData->markerAttributeSet );
+ dupSet = Q3Object_Duplicate( srcAtts );
+ Q3Object_Dispose( srcAtts );
toInstanceData->markerAttributeSet = dupSet;
if (dupSet == nullptr)
{
@@ -237,8 +238,9 @@
// behaviour was the same for both geometries (or only for bitmaps).
Q3ColorRGB_Set(&theColour, 1.0f, 1.0f, 1.0f);
- if (geomData->markerAttributeSet != nullptr)
- Q3AttributeSet_Get(geomData->markerAttributeSet, kQ3AttributeTypeDiffuseColor, &theColour);
+ TQ3AttributeSet atts = geomData->markerAttributeSet;
+ if (atts != nullptr)
+ Q3AttributeSet_Get(atts, kQ3AttributeTypeDiffuseColor, &theColour);
thePixel = ( 0x0001 << 15) |
(((TQ3Uns16) (theColour.r * 31)) << 10) |
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryMesh.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryMesh.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryMesh.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Mesh geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -2472,10 +2472,10 @@
return(kQ3Success);
//failure_5:
- while (iSave > 0)
- e3meshContour_Destroy(&contours[--iSave]);
+// while (iSave > 0)
+// e3meshContour_Destroy(&contours[--iSave]);
- e3meshContourArray_Destroy(&facePtr->contourArrayOrList.array, nullptr);
+// e3meshContourArray_Destroy(&facePtr->contourArrayOrList.array, nullptr);
failure_4:
failure_3:
@@ -3917,6 +3917,7 @@
}
else
{
+ TQ3AttributeSet curVertAtts = currentVertex->attributeSet;
if((1 + numObjectsToDelete) > allocatedObjectsToDelete)
{
if(Q3Memory_Reallocate(&objectsToDelete, (allocatedObjectsToDelete + _MESH_AS_POLYS_OBJECTS_TO_DELETE_GROW)*sizeof(TQ3Object)) != kQ3Success)
@@ -3928,7 +3929,7 @@
objectsToDelete[numObjectsToDelete] = currentVertex->attributeSet;
numObjectsToDelete++;
- Q3AttributeSet_Inherit((*vertexHdl)->attributeSet, cornerPtr->attributeSet, currentVertex->attributeSet);
+ Q3AttributeSet_Inherit((*vertexHdl)->attributeSet, cornerPtr->attributeSet, curVertAtts);
}
}
else
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBCurve.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBCurve.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBCurve.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa NURB Curve geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -102,9 +102,10 @@
// copy or shared-replace the attributes
if (isDuplicate)
{
- if (src->curveAttributeSet != nullptr)
+ TQ3AttributeSet srcAtts = src->curveAttributeSet;
+ if (srcAtts != nullptr)
{
- dst->curveAttributeSet = Q3Object_Duplicate(src->curveAttributeSet);
+ dst->curveAttributeSet = Q3Object_Duplicate( srcAtts );
if (dst->curveAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->curveAttributeSet = nullptr;
@@ -760,20 +761,14 @@
switch( subdivisionData.method ) {
case kQ3SubdivisionMethodScreenSpace:
e3geom_nurbcurve_screen_subdiv( &theVertices, &numPoints, subdivU, geomData, theView ) ;
- if( theVertices == nullptr )
- return(nullptr);
break ;
case kQ3SubdivisionMethodWorldSpace:
e3geom_nurbcurve_world_subdiv( &theVertices, &numPoints, subdivU, geomData, theView ) ;
- if( theVertices == nullptr )
- return(nullptr);
break ;
case kQ3SubdivisionMethodConstant:
e3geom_nurbcurve_constant_subdiv( &theVertices, &numPoints, subdivU, geomData ) ;
- if( theVertices == nullptr )
- return(nullptr);
break ;
default:
@@ -782,8 +777,11 @@
}
}
+ if ( theVertices == nullptr )
+ return(nullptr);
+
// Create the PolyLine
polyLineData.numVertices = numPoints;
polyLineData.vertices = theVertices;
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBPatch.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBPatch.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBPatch.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa NURB Patch geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -117,12 +117,13 @@
// Copy all trim loops.
// This is complicated because we have several layers of nested arrays.
dst->numTrimLoops = src->numTrimLoops;
- if (src->numTrimLoops)
+ TQ3NURBPatchTrimLoopData* srcLoops = src->trimLoops;
+ if ( (src->numTrimLoops > 0) && (srcLoops != nullptr) )
{
// Copy TrimLoops, basic data.
theSize = static_cast<TQ3Uns32>(sizeof(TQ3NURBPatchTrimLoopData) * src->numTrimLoops);
- dst->trimLoops = (TQ3NURBPatchTrimLoopData *) Q3Memory_Allocate( theSize );
- Q3Memory_Copy( src->trimLoops, dst->trimLoops, theSize );
+ TQ3NURBPatchTrimLoopData * dstLoops = dst->trimLoops = (TQ3NURBPatchTrimLoopData *) Q3Memory_Allocate( theSize );
+ Q3Memory_Copy( srcLoops, dstLoops, theSize );
// Now iterate over trim loop curves, copy them.
for (i=0; i < src->numTrimLoops; i++) {
@@ -162,7 +163,8 @@
{
if (src->patchAttributeSet != nullptr)
{
- dst->patchAttributeSet = Q3Object_Duplicate(src->patchAttributeSet);
+ TQ3AttributeSet srcAtts = src->patchAttributeSet;
+ dst->patchAttributeSet = Q3Object_Duplicate(srcAtts);
if (dst->patchAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->patchAttributeSet = nullptr;
@@ -1240,9 +1242,9 @@
break;
}
}
+ Q3_ASSERT( normals != nullptr );
-
// set up the attributes
E3AttributeSet_Combine(geomData->patchAttributeSet, nullptr, &triMeshData.triMeshAttributeSet);
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryPixmapMarker.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryPixmapMarker.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryPixmapMarker.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -400,8 +400,9 @@
if ( (qd3dStatus == kQ3Success) &&
(toInstanceData->pixmapMarkerAttributeSet != nullptr) )
{
- dupSet = Q3Object_Duplicate( toInstanceData->pixmapMarkerAttributeSet );
- Q3Object_Dispose( toInstanceData->pixmapMarkerAttributeSet );
+ TQ3AttributeSet srcAtts = toInstanceData->pixmapMarkerAttributeSet;
+ dupSet = Q3Object_Duplicate( srcAtts );
+ Q3Object_Dispose( srcAtts );
toInstanceData->pixmapMarkerAttributeSet = dupSet;
if (dupSet == nullptr)
{
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryPoint.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryPoint.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryPoint.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Point geometry class.
COPYRIGHT:
- Copyright (c) 1999-2012, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -141,8 +141,9 @@
if ( (qd3dStatus == kQ3Success) &&
(toInstanceData->pointAttributeSet != nullptr) )
{
- dupSet = Q3Object_Duplicate( toInstanceData->pointAttributeSet );
- Q3Object_Dispose( toInstanceData->pointAttributeSet );
+ TQ3AttributeSet srcAtts = toInstanceData->pointAttributeSet;
+ dupSet = Q3Object_Duplicate( srcAtts );
+ Q3Object_Dispose( srcAtts );
toInstanceData->pointAttributeSet = dupSet;
if (dupSet == nullptr)
{
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyLine.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyLine.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyLine.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa PolyLine geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -161,14 +161,15 @@
for (n = 0; n < dst->numVertices; ++n)
{
dst->vertices[n].point = src->vertices[n].point;
+ TQ3AttributeSet srcVAtts = src->vertices[n].attributeSet;
- if (src->vertices[n].attributeSet == nullptr)
+ if (srcVAtts == nullptr)
{
dst->vertices[n].attributeSet = nullptr;
}
else if (isDuplicate)
{
- dst->vertices[n].attributeSet = Q3Object_Duplicate( src->vertices[n].attributeSet );
+ dst->vertices[n].attributeSet = Q3Object_Duplicate( srcVAtts );
if (dst->vertices[n].attributeSet == nullptr)
q3Status = kQ3Failure;
}
@@ -190,7 +191,8 @@
}
else if (isDuplicate)
{
- dst->segmentAttributeSet[n] = Q3Object_Duplicate( src->segmentAttributeSet[n] );
+ TQ3AttributeSet srcAtts = src->segmentAttributeSet[n];
+ dst->segmentAttributeSet[n] = Q3Object_Duplicate( srcAtts );
if (dst->segmentAttributeSet[n] == nullptr)
q3Status = kQ3Failure;
}
@@ -209,7 +211,8 @@
}
else if (isDuplicate)
{
- dst->polyLineAttributeSet = Q3Object_Duplicate( src->polyLineAttributeSet );
+ TQ3AttributeSet srcAt = src->polyLineAttributeSet;
+ dst->polyLineAttributeSet = Q3Object_Duplicate( srcAt );
if (dst->polyLineAttributeSet == nullptr)
q3Status = kQ3Failure;
}
@@ -241,7 +244,7 @@
e3geom_polyline_duplicate(TQ3Object fromObject, const void *fromPrivateData,
TQ3Object toObject, void *toPrivateData)
{ TQ3PolyLineData *toInstanceData = (TQ3PolyLineData *) toPrivateData;
- TQ3PolyLineData *fromInstanceData = (TQ3PolyLineData *) fromPrivateData;
+ const TQ3PolyLineData *fromInstanceData = (const TQ3PolyLineData *) fromPrivateData;
TQ3Status qd3dStatus;
#pragma unused(toObject)
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolygon.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolygon.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolygon.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Pixmap Marker geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -160,8 +160,9 @@
if ( (qd3dStatus == kQ3Success) &&
(toInstanceData->polygonAttributeSet != nullptr) )
{
- dupSet = Q3Object_Duplicate( toInstanceData->polygonAttributeSet );
- Q3Object_Dispose( toInstanceData->polygonAttributeSet );
+ TQ3AttributeSet srcSet = toInstanceData->polygonAttributeSet;
+ dupSet = Q3Object_Duplicate( srcSet );
+ Q3Object_Dispose( srcSet );
toInstanceData->polygonAttributeSet = dupSet;
if (dupSet == nullptr)
{
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyhedron.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyhedron.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyhedron.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Pixmap Marker geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -221,6 +221,7 @@
{
TQ3Status q3status = kQ3Success;
TQ3Uns32 n;
+ TQ3AttributeSet atts;
@@ -265,19 +266,20 @@
dst->numVertices = src->numVertices;
dst->numEdges = src->numEdges;
dst->numTriangles = src->numTriangles;
- if (src->polyhedronAttributeSet == nullptr)
+ atts = src->polyhedronAttributeSet;
+ if (atts == nullptr)
{
dst->polyhedronAttributeSet = nullptr;
}
else if (isDuplicate)
{
- dst->polyhedronAttributeSet = Q3Object_Duplicate( src->polyhedronAttributeSet );
+ dst->polyhedronAttributeSet = Q3Object_Duplicate( atts );
if (dst->polyhedronAttributeSet == nullptr)
q3status = kQ3Failure;
}
else
{
- E3Shared_Acquire( &dst->polyhedronAttributeSet, src->polyhedronAttributeSet );
+ E3Shared_Acquire( &dst->polyhedronAttributeSet, atts );
}
@@ -286,13 +288,14 @@
for (n = 0; n < dst->numVertices; ++n)
{
dst->vertices[n].point = src->vertices[n].point;
- if (src->vertices[n].attributeSet == nullptr)
+ atts = src->vertices[n].attributeSet;
+ if (atts == nullptr)
{
dst->vertices[n].attributeSet = nullptr;
}
else if (isDuplicate)
{
- dst->vertices[n].attributeSet = Q3Object_Duplicate( src->vertices[n].attributeSet );
+ dst->vertices[n].attributeSet = Q3Object_Duplicate( atts );
if (dst->vertices[n].attributeSet == nullptr)
q3status = kQ3Failure;
}
@@ -313,19 +316,20 @@
dst->edges[n].vertexIndices[1] = src->edges[n].vertexIndices[1];
dst->edges[n].triangleIndices[0] = src->edges[n].triangleIndices[0];
dst->edges[n].triangleIndices[1] = src->edges[n].triangleIndices[1];
- if (src->edges[n].edgeAttributeSet == nullptr)
+ atts = src->edges[n].edgeAttributeSet;
+ if (atts == nullptr)
{
dst->edges[n].edgeAttributeSet = nullptr;
}
else if (isDuplicate)
{
- dst->edges[n].edgeAttributeSet = Q3Object_Duplicate( src->edges[n].edgeAttributeSet );
+ dst->edges[n].edgeAttributeSet = Q3Object_Duplicate( atts );
if (dst->edges[n].edgeAttributeSet == nullptr)
q3status = kQ3Failure;
}
else
{
- E3Shared_Acquire( &dst->edges[n].edgeAttributeSet, src->edges[n].edgeAttributeSet );
+ E3Shared_Acquire( &dst->edges[n].edgeAttributeSet, atts );
}
}
}
@@ -339,21 +343,20 @@
dst->triangles[n].vertexIndices[1] = src->triangles[n].vertexIndices[1];
dst->triangles[n].vertexIndices[2] = src->triangles[n].vertexIndices[2];
dst->triangles[n].edgeFlag = src->triangles[n].edgeFlag;
- if (src->triangles[n].triangleAttributeSet == nullptr)
+ atts = src->triangles[n].triangleAttributeSet;
+ if (atts == nullptr)
{
dst->triangles[n].triangleAttributeSet = nullptr;
}
else if (isDuplicate)
{
- dst->triangles[n].triangleAttributeSet = Q3Object_Duplicate(
- src->triangles[n].triangleAttributeSet );
+ dst->triangles[n].triangleAttributeSet = Q3Object_Duplicate( atts );
if (dst->triangles[n].triangleAttributeSet == nullptr)
q3status = kQ3Failure;
}
else
{
- E3Shared_Acquire( &dst->triangles[n].triangleAttributeSet,
- src->triangles[n].triangleAttributeSet );
+ E3Shared_Acquire( &dst->triangles[n].triangleAttributeSet, atts );
}
}
@@ -380,7 +383,7 @@
e3geom_polyhedron_duplicate(TQ3Object fromObject, const void *fromPrivateData,
TQ3Object toObject, void *toPrivateData)
{ TQ3PolyhedronData *toInstanceData = (TQ3PolyhedronData *) toPrivateData;
- TQ3PolyhedronData *fromInstanceData = (TQ3PolyhedronData *) fromPrivateData;
+ const TQ3PolyhedronData *fromInstanceData = (const TQ3PolyhedronData *) fromPrivateData;
TQ3Status qd3dStatus;
#pragma unused(toObject)
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryTorus.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryTorus.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryTorus.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Torus geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -86,6 +86,7 @@
e3geom_torus_copydata(const TQ3TorusData *src, TQ3TorusData *dst, TQ3Boolean isDuplicate)
{
TQ3Status qd3dStatus = kQ3Success;
+ TQ3AttributeSet atts;
// copy raw data
const TQ3Uns32 theSize = sizeof(TQ3Point3D) // origin
@@ -97,15 +98,17 @@
// copy or shared-replace the attributes
if (isDuplicate)
{
- if (src->interiorAttributeSet != nullptr)
+ atts = src->interiorAttributeSet;
+ if (atts != nullptr)
{
- dst->interiorAttributeSet = Q3Object_Duplicate(src->interiorAttributeSet);
+ dst->interiorAttributeSet = Q3Object_Duplicate( atts );
if (dst->interiorAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->interiorAttributeSet = nullptr;
- if (src->torusAttributeSet != nullptr)
+ atts = src->torusAttributeSet;
+ if (atts != nullptr)
{
- dst->torusAttributeSet = Q3Object_Duplicate(src->torusAttributeSet);
+ dst->torusAttributeSet = Q3Object_Duplicate( atts );
if (dst->torusAttributeSet == nullptr) qd3dStatus = kQ3Failure;
} else dst->torusAttributeSet = nullptr;
}
@@ -551,9 +554,10 @@
// If there is an overall attribute set, add it to the group.
- if (geomData->torusAttributeSet != nullptr)
+ TQ3AttributeSet atts = geomData->torusAttributeSet;
+ if (atts != nullptr)
{
- Q3Group_AddObject( resultGroup.get(), geomData->torusAttributeSet );
+ Q3Group_AddObject( resultGroup.get(), atts );
}
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriGrid.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriGrid.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriGrid.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa TriGrid geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -87,6 +87,7 @@
TQ3Uns32 qtyFacets; // how many triangles we have
TQ3Uns32 theSize;
TQ3Uns32 i;
+ TQ3AttributeSet atts;
qtyVerts = src->numRows * src->numColumns;
qtyFacets = 2 * (src->numRows-1) * (src->numColumns-1);
@@ -113,9 +114,11 @@
if (isDuplicate)
{
- for(i=0; i< qtyVerts; i++){
- if(src->vertices[i].attributeSet != nullptr)
- dst->vertices[i].attributeSet = Q3Object_Duplicate(src->vertices[i].attributeSet);
+ for (i=0; i< qtyVerts; i++)
+ {
+ atts = src->vertices[i].attributeSet;
+ if (atts != nullptr)
+ dst->vertices[i].attributeSet = Q3Object_Duplicate( atts );
}
if (src->facetAttributeSet != nullptr)
@@ -122,11 +125,16 @@
{
// facetAttributeSet is actually an array of attribute sets
dst->facetAttributeSet = (TQ3AttributeSet *) Q3Memory_AllocateClear( static_cast<TQ3Uns32>(sizeof(TQ3AttributeSet) * qtyFacets) );
- if (dst->facetAttributeSet != nullptr) {
- for (i=0; i<qtyFacets; i++) {
- if(src->facetAttributeSet[i] != nullptr){
- dst->facetAttributeSet[i] = Q3Object_Duplicate(src->facetAttributeSet[i]);
- if (dst->facetAttributeSet[i] == nullptr){
+ if (dst->facetAttributeSet != nullptr)
+ {
+ for (i=0; i<qtyFacets; i++)
+ {
+ atts = src->facetAttributeSet[i];
+ if (atts != nullptr)
+ {
+ dst->facetAttributeSet[i] = Q3Object_Duplicate( atts );
+ if (dst->facetAttributeSet[i] == nullptr)
+ {
qd3dStatus = kQ3Failure;
break;
}
@@ -135,9 +143,10 @@
}
}
- if (src->triGridAttributeSet != nullptr)
+ atts = src->triGridAttributeSet;
+ if (atts != nullptr)
{
- dst->triGridAttributeSet = Q3Object_Duplicate(src->triGridAttributeSet);
+ dst->triGridAttributeSet = Q3Object_Duplicate( atts );
if (dst->triGridAttributeSet == nullptr) qd3dStatus = kQ3Failure;
}
}
@@ -306,14 +315,28 @@
//
// We ensure there is a triangle normal for each face, to allow efficient
// culling even if no normal has been defined.
- if (geomData->facetAttributeSet != nullptr && geomData->facetAttributeSet[tnum] != nullptr)
- triangleData.triangleAttributeSet = Q3Shared_GetReference( geomData->facetAttributeSet[tnum] );
+ if (geomData->facetAttributeSet != nullptr)
+ {
+ TQ3AttributeSet facetAtts = geomData->facetAttributeSet[tnum];
+
+ if (facetAtts != nullptr)
+ {
+ triangleData.triangleAttributeSet = Q3Shared_GetReference( facetAtts );
+ }
+ else
+ {
+ triangleData.triangleAttributeSet = Q3AttributeSet_New();
+ }
+ }
else
+ {
triangleData.triangleAttributeSet = Q3AttributeSet_New();
+ }
- if (triangleData.triangleAttributeSet != nullptr)
+ TQ3AttributeSet triAtts = triangleData.triangleAttributeSet;
+ if (triAtts != nullptr)
{
- if (!Q3AttributeSet_Contains(triangleData.triangleAttributeSet, kQ3AttributeTypeNormal))
+ if (!Q3AttributeSet_Contains(triAtts, kQ3AttributeTypeNormal))
{
// Calculate the triangle normal
//
@@ -331,7 +354,7 @@
if (theOrientation == kQ3OrientationStyleClockwise)
Q3Vector3D_Negate(&theNormal, &theNormal);
- Q3AttributeSet_Add(triangleData.triangleAttributeSet, kQ3AttributeTypeNormal, &theNormal);
+ Q3AttributeSet_Add(triAtts, kQ3AttributeTypeNormal, &theNormal);
}
}
@@ -408,8 +431,9 @@
if (theGroup == nullptr)
return(nullptr);
- if (geomData->triGridAttributeSet != nullptr)
- Q3Group_AddObject( theGroup, geomData->triGridAttributeSet );
+ TQ3AttributeSet atts = geomData->triGridAttributeSet;
+ if (atts != nullptr)
+ Q3Group_AddObject( theGroup, atts );
// Add a bunch of triangles to the group
for (row=0; row < geomData->numRows-1; row++) {
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Pixmap Marker geometry class.
COPYRIGHT:
- Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -54,6 +54,7 @@
#include "E3ErrorManager.h"
#include "QuesaMathOperators.hpp"
+#include <cstring>
@@ -320,9 +321,10 @@
// 1. triMeshAttributeSet
if (isDuplicate)
{
- if (src->triMeshAttributeSet != nullptr)
+ TQ3AttributeSet srcAtts = src->triMeshAttributeSet;
+ if (srcAtts != nullptr)
{
- dst->triMeshAttributeSet = Q3Object_Duplicate(src->triMeshAttributeSet);
+ dst->triMeshAttributeSet = Q3Object_Duplicate(srcAtts);
if (dst->triMeshAttributeSet == nullptr)
qd3dStatus = kQ3Failure;
}
@@ -771,16 +773,18 @@
// a triangle normal for better performance when backface culling is on.
theTriangle->triangleAttributeSet = Q3AttributeSet_New();
- if (theTriangle->triangleAttributeSet != nullptr)
+ TQ3AttributeSet triAtts = theTriangle->triangleAttributeSet;
+ if (triAtts != nullptr)
{
// Copy overall TriMesh attributes to the triangle.
// If the TriMesh has a texture shader, the triangle will get a
// reference to that, not a duplicate.
- if (theTriMesh->triMeshAttributeSet != nullptr)
+ TQ3AttributeSet meshAtts = theTriMesh->triMeshAttributeSet;
+ if (meshAtts != nullptr)
{
- Q3AttributeSet_Inherit( theTriMesh->triMeshAttributeSet,
- theTriangle->triangleAttributeSet,
- theTriangle->triangleAttributeSet );
+ Q3AttributeSet_Inherit( meshAtts,
+ triAtts,
+ triAtts );
}
// Add the attributes
@@ -792,7 +796,7 @@
if (theClass != nullptr)
{
attrSize = theClass->GetInstanceSize () ;
- Q3AttributeSet_Add(theTriangle->triangleAttributeSet, attrType,
+ Q3AttributeSet_Add(triAtts, attrType,
(TQ3Uns8 *) theTriMesh->triangleAttributeTypes[n].data + (theIndex * attrSize));
}
}
@@ -800,7 +804,7 @@
// Add the triangle normal
- if (!Q3AttributeSet_Contains(theTriangle->triangleAttributeSet, kQ3AttributeTypeNormal))
+ if (!Q3AttributeSet_Contains(triAtts, kQ3AttributeTypeNormal))
{
// Calculate the triangle normal
//
@@ -826,7 +830,7 @@
// Add the normal
- Q3AttributeSet_Add(theTriangle->triangleAttributeSet, kQ3AttributeTypeNormal, &theNormal);
+ Q3AttributeSet_Add(triAtts, kQ3AttributeTypeNormal, &theNormal);
}
}
@@ -844,8 +848,8 @@
if (theTriMesh->numVertexAttributeTypes != 0)
{
Q3_ASSERT(Q3_VALID_PTR(theTriMesh->vertexAttributeTypes));
- theTriangle->vertices[n].attributeSet = Q3AttributeSet_New();
- if (theTriangle->vertices[n].attributeSet != nullptr)
+ TQ3AttributeSet vertAtts = theTriangle->vertices[n].attributeSet = Q3AttributeSet_New();
+ if (vertAtts != nullptr)
{
for (m = 0; m < theTriMesh->numVertexAttributeTypes; m++)
{
@@ -855,7 +859,7 @@
if (theClass != nullptr)
{
attrSize = theClass->GetInstanceSize () ;
- Q3AttributeSet_Add(theTriangle->vertices[n].attributeSet, attrType,
+ Q3AttributeSet_Add(vertAtts, attrType,
(TQ3Uns8 *) theTriMesh->vertexAttributeTypes[m].data + (vertIndex * attrSize));
}
}
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Implementation of Quesa Triangle geometry class.
COPYRIGHT:
- Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -139,11 +139,12 @@
// Copy the data from fromObject to toObject
qd3dStatus = Q3Triangle_GetData(fromObject, toInstanceData);
+ TQ3AttributeSet atts = toInstanceData->triangleAttributeSet;
if ( (qd3dStatus == kQ3Success) &&
- (toInstanceData->triangleAttributeSet != nullptr) )
+ (atts != nullptr) )
{
- dupSet = Q3Object_Duplicate( toInstanceData->triangleAttributeSet );
- Q3Object_Dispose( toInstanceData->triangleAttributeSet );
+ dupSet = Q3Object_Duplicate( atts );
+ Q3Object_Dispose( atts );
toInstanceData->triangleAttributeSet = dupSet;
if (dupSet == nullptr)
{
Modified: trunk/quesa/Development/Source/Core/Support/E3Tessellate.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Support/E3Tessellate.cpp 2018-10-19 21:40:02 UTC (rev 3358)
+++ trunk/quesa/Development/Source/Core/Support/E3Tessellate.cpp 2018-10-22 00:46:42 UTC (rev 3359)
@@ -5,7 +5,7 @@
Quesa tessellator functions.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -278,9 +278,13 @@
// Grab the attribute data
typeMask = 1 << (theType - 1);
- qd3dStatus = Q3AttributeSet_Get(theVertex->attributeSet, theType, theData);
- if (qd3dStatus == kQ3Success)
- theState->attributeMask |= typeMask;
+ TQ3AttributeSet vertAtts = theVertex->attributeSet;
+ if (ve...
[truncated message content] |
|
From: <jww...@us...> - 2018-10-19 21:40:05
|
Revision: 3358
http://sourceforge.net/p/quesa/code/3358
Author: jwwalker
Date: 2018-10-19 21:40:02 +0000 (Fri, 19 Oct 2018)
Log Message:
-----------
Fix some errors when compiling for release.
Modified Paths:
--------------
trunk/quesa/Development/Source/Core/System/E3Main.h
trunk/quesa/Development/Source/Core/System/E3Memory.cpp
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Writer.cpp
trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.cpp
trunk/quesa/Development/Source/Renderers/Common/OptimizedTriMeshElement.cpp
Modified: trunk/quesa/Development/Source/Core/System/E3Main.h
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Main.h 2018-10-04 22:37:46 UTC (rev 3357)
+++ trunk/quesa/Development/Source/Core/System/E3Main.h 2018-10-19 21:40:02 UTC (rev 3358)
@@ -5,7 +5,7 @@
Header file for E3Main.c.
COPYRIGHT:
- Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -277,7 +277,6 @@
// Locate a class
inline E3ClassInfoPtr GetClass ( void ) const
{
- Q3_ASSERT( this != nullptr );
return theClass;
}
Modified: trunk/quesa/Development/Source/Core/System/E3Memory.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Memory.cpp 2018-10-04 22:37:46 UTC (rev 3357)
+++ trunk/quesa/Development/Source/Core/System/E3Memory.cpp 2018-10-19 21:40:02 UTC (rev 3358)
@@ -5,7 +5,7 @@
Quesa memory manager.
COPYRIGHT:
- Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -522,7 +522,6 @@
{
// Check it looks OK
Q3_ASSERT_VALID_PTR(realPtr);
- Q3_ASSERT( E3Memory_IsValidBlock( realPtr ) );
}
Modified: trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Writer.cpp
===================================================================
--- trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Writer.cpp 2018-10-04 22:37:46 UTC (rev 3357)
+++ trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Writer.cpp 2018-10-19 21:40:02 UTC (rev 3358)
@@ -5,7 +5,7 @@
Quesa 3DMF Binary Writer.
COPYRIGHT:
- Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -562,7 +562,9 @@
//instanceData->baseData.currentStoragePosition = Q3Size_Pad(instanceData->baseData.currentStoragePosition);
// Due to the TriMesh compression scheme, things can end up on unpadded
// boundaries.
+ #if Q3_DEBUG
Q3_ASSERT(pos+instanceData->stack[i].size == instanceData->baseData.currentStoragePosition);
+ #endif
}
//call deletedata if any
if (instanceData->stack[i].theObject != nullptr && Q3Object_IsType(instanceData->stack[i].theObject, kQ3ObjectTypeShared))
Modified: trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.cpp 2018-10-04 22:37:46 UTC (rev 3357)
+++ trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.cpp 2018-10-19 21:40:02 UTC (rev 3358)
@@ -13,7 +13,7 @@
performance optimization.
COPYRIGHT:
- Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -329,8 +329,10 @@
theCache = newCache;
}
}
-
+
+#if Q3_DEBUG
Q3_ASSERT( IsValidTextureCache( theCache ) );
+#endif
return theCache;
}
Modified: trunk/quesa/Development/Source/Renderers/Common/OptimizedTriMeshElement.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/OptimizedTriMeshElement.cpp 2018-10-04 22:37:46 UTC (rev 3357)
+++ trunk/quesa/Development/Source/Renderers/Common/OptimizedTriMeshElement.cpp 2018-10-19 21:40:02 UTC (rev 3358)
@@ -5,7 +5,7 @@
Source for a custom element to hold an optimized version of a TriMesh.
COPYRIGHT:
- Copyright (c) 1999-2007, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -314,7 +314,9 @@
TQ3Status theStatus =
#endif
Q3Object_AddElement( ioTriMesh, sCacheOptimizedTriMeshElementType, &theData );
+#if Q3_DEBUG
Q3_ASSERT( theStatus == kQ3Success );
+#endif
// Adding an element bumps the edit index, set it back.
Q3Shared_SetEditIndex( ioTriMesh, editIndex );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2018-10-04 22:37:48
|
Revision: 3357
http://sourceforge.net/p/quesa/code/3357
Author: jwwalker
Date: 2018-10-04 22:37:46 +0000 (Thu, 04 Oct 2018)
Log Message:
-----------
Fix structure of -[Quesa3DView initwithFrame:] in Cocoa Example.
Modified Paths:
--------------
trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/Quesa3DView.m
Modified: trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/Quesa3DView.m
===================================================================
--- trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/Quesa3DView.m 2018-10-04 20:15:54 UTC (rev 3356)
+++ trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/Quesa3DView.m 2018-10-04 22:37:46 UTC (rev 3357)
@@ -5,7 +5,7 @@
NSView subclass to display a quesa draw context.
COPYRIGHT:
- Copyright (c) 1999-2013, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -96,18 +96,21 @@
- (id)initWithFrame:(NSRect)frameRect
{
- [super initWithFrame:frameRect];
- qd3dView = NULL;
- drawContext = NULL;
-
- // Listen for frame changes to myself, so that the aspect ratio can be
- // kept up to date.
- [self setPostsFrameChangedNotifications: YES];
- [[NSNotificationCenter defaultCenter]
- addObserver: self
- selector: @selector(frameChanged:)
- name: NSViewFrameDidChangeNotification
- object: self ];
+ self = [super initWithFrame:frameRect];
+ if (self != nil)
+ {
+ qd3dView = NULL;
+ drawContext = NULL;
+
+ // Listen for frame changes to myself, so that the aspect ratio can be
+ // kept up to date.
+ [self setPostsFrameChangedNotifications: YES];
+ [[NSNotificationCenter defaultCenter]
+ addObserver: self
+ selector: @selector(frameChanged:)
+ name: NSViewFrameDidChangeNotification
+ object: self ];
+ }
return self;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2018-10-04 20:15:56
|
Revision: 3356
http://sourceforge.net/p/quesa/code/3356
Author: jwwalker
Date: 2018-10-04 20:15:54 +0000 (Thu, 04 Oct 2018)
Log Message:
-----------
Update Cocoa Example for Xcode 10.
Modified Paths:
--------------
trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/AppDelegate.m
trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/Quesa3DView.xcodeproj/project.pbxproj
trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/project.xcconfig
Modified: trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/AppDelegate.m
===================================================================
--- trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/AppDelegate.m 2018-10-04 20:13:01 UTC (rev 3355)
+++ trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/AppDelegate.m 2018-10-04 20:15:54 UTC (rev 3356)
@@ -98,7 +98,7 @@
NSLog(@"createTextureFromFile:fileName:[%@]", fileName);
- theImage = [NSBitmapImageRep imageRepWithContentsOfFile: fileName];
+ theImage = (NSBitmapImageRep*) [NSBitmapImageRep imageRepWithContentsOfFile: fileName];
if (theImage)
{
Modified: trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/Quesa3DView.xcodeproj/project.pbxproj
===================================================================
--- trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/Quesa3DView.xcodeproj/project.pbxproj 2018-10-04 20:13:01 UTC (rev 3355)
+++ trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/Quesa3DView.xcodeproj/project.pbxproj 2018-10-04 20:15:54 UTC (rev 3356)
@@ -251,6 +251,8 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ };
buildConfigurationList = B1FFA3480906B1A30010DA99 /* Build configuration list for PBXProject "Quesa3DView" */;
compatibilityVersion = "Xcode 3.0";
developmentRegion = English;
@@ -318,7 +320,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "cd \"$CONFIGURATION_BUILD_DIR\"\n\n# Make a symbolic link in the configuration build directory, pointing to the right version of Quesa.\necho \"ln -h -f -s \" \"../../../../../Libraries/Mac/Framework_Modern/$CONFIGURATION/Quesa.framework\" Quesa.framework\nln -h -f -s \"../../../../../Libraries/Mac/Framework_Modern/$CONFIGURATION/Quesa.framework/\" Quesa.framework\n";
+ shellScript = "cd \"$CONFIGURATION_BUILD_DIR\"\n\n# Make a symbolic link in the configuration build directory, pointing to the right version of Quesa.\necho \"ln -h -f -s \" \"$PROJECT_DIR/../../../Libraries/Mac/Framework_Modern/$CONFIGURATION/Quesa.framework\" Quesa.framework\nln -h -f -s \"$PROJECT_DIR/../../../Libraries/Mac/Framework_Modern/$CONFIGURATION/Quesa.framework/\" Quesa.framework\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -382,10 +384,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BE13530F0C3C190300B20B60 /* project.xcconfig */;
buildSettings = {
- ARCHS = (
- ppc,
- i386,
- );
};
name = Release;
};
@@ -392,6 +390,7 @@
BE1352A40C3C14F400B20B60 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ONLY_ACTIVE_ARCH = YES;
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
@@ -403,6 +402,7 @@
BE1352A50C3C14F400B20B60 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ONLY_ACTIVE_ARCH = YES;
};
name = Release;
};
Modified: trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/project.xcconfig
===================================================================
--- trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/project.xcconfig 2018-10-04 20:13:01 UTC (rev 3355)
+++ trunk/quesa/SDK/Extras/Cocoa Example/Quesa3DView/project.xcconfig 2018-10-04 20:15:54 UTC (rev 3356)
@@ -1,10 +1,10 @@
// Architectures
-ARCHS = i386 x86_64
+ARCHS = x86_64
ONLY_ACTIVE_ARCH = NO
SDKROOT = macosx
// Deployment
-MACOSX_DEPLOYMENT_TARGET = 10.6
+MACOSX_DEPLOYMENT_TARGET = 10.7
// Compiler version
GCC_VERSION =
@@ -11,7 +11,8 @@
// Search Paths
FSP_QUESA = "$(SRCROOT)/../../../Libraries/Mac/Framework_Modern/Debug"
-FRAMEWORK_SEARCH_PATHS = $(FSP_QUESA) $(SDKROOT)/Library/Frameworks
+FRAMEWORK_SEARCH_PATHS = $(FSP_QUESA)
+ALWAYS_SEARCH_USER_PATHS = NO
// Build Options
DEBUG_INFORMATION_FORMAT = dwarf
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2018-10-04 20:13:03
|
Revision: 3355
http://sourceforge.net/p/quesa/code/3355
Author: jwwalker
Date: 2018-10-04 20:13:01 +0000 (Thu, 04 Oct 2018)
Log Message:
-----------
Changed modern Quesa project to 64-bit only.
Modified Paths:
--------------
trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
trunk/quesa/Development/Projects/Mac/xcode-configs/Legacy.xcconfig
trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig
trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig
Modified: trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
===================================================================
--- trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-06-17 22:12:43 UTC (rev 3354)
+++ trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-10-04 20:13:01 UTC (rev 3355)
@@ -313,8 +313,6 @@
BE806FD10BCDCCEA008CD86A /* QOGLShadingLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE806FCC0BCDCCEA008CD86A /* QOGLShadingLanguage.cpp */; };
BE8528D118D9043400D37D00 /* QOShaderProgramCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE8528CF18D9043400D37D00 /* QOShaderProgramCache.cpp */; };
BE8528D218D9043400D37D00 /* QOShaderProgramCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE8528CF18D9043400D37D00 /* QOShaderProgramCache.cpp */; };
- BE8528D318D9043400D37D00 /* QOShaderProgramCache.h in Headers */ = {isa = PBXBuildFile; fileRef = BE8528D018D9043400D37D00 /* QOShaderProgramCache.h */; };
- BE8779570F9F7937007F104E /* Quesa.r in Rez */ = {isa = PBXBuildFile; fileRef = BE8779560F9F7937007F104E /* Quesa.r */; };
BE8D58CA0B7D3EA2007ACFE4 /* OptimizedTriMeshElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE8D58C80B7D3EA2007ACFE4 /* OptimizedTriMeshElement.cpp */; };
BE8D58CE0B7D3EA2007ACFE4 /* OptimizedTriMeshElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE8D58C80B7D3EA2007ACFE4 /* OptimizedTriMeshElement.cpp */; };
BE98E73B09F764A60040CE1B /* E3CocoaStackCrawl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE98E73A09F764A60040CE1B /* E3CocoaStackCrawl.cpp */; };
@@ -562,6 +560,7 @@
BE0D64FA0C0D0FFC00D3D79C /* QOCalcTriMeshEdges.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = QOCalcTriMeshEdges.cpp; sourceTree = "<group>"; };
BE0D64FB0C0D0FFC00D3D79C /* QOCalcTriMeshEdges.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = QOCalcTriMeshEdges.h; sourceTree = "<group>"; };
BE0D64FC0C0D0FFC00D3D79C /* QOShadowMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = QOShadowMarker.cpp; sourceTree = "<group>"; };
+ BE11DD721D5A9DA20013C5ED /* CQ3WeakObjectRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CQ3WeakObjectRef.h; sourceTree = "<group>"; };
BE2AF1F015B78A2A00400670 /* Legacy.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Legacy.xcconfig; sourceTree = "<group>"; };
BE2AF1F115B78BE700400670 /* Modern.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Modern.xcconfig; sourceTree = "<group>"; };
BE2AF20115B791B300400670 /* Legacy-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Legacy-Debug.xcconfig"; sourceTree = "<group>"; };
@@ -626,7 +625,6 @@
BE806FCC0BCDCCEA008CD86A /* QOGLShadingLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = QOGLShadingLanguage.cpp; sourceTree = "<group>"; };
BE8528CF18D9043400D37D00 /* QOShaderProgramCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QOShaderProgramCache.cpp; sourceTree = "<group>"; };
BE8528D018D9043400D37D00 /* QOShaderProgramCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QOShaderProgramCache.h; sourceTree = "<group>"; };
- BE8779560F9F7937007F104E /* Quesa.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; name = Quesa.r; path = Resources/Quesa.r; sourceTree = "<group>"; };
BE8D58C80B7D3EA2007ACFE4 /* OptimizedTriMeshElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OptimizedTriMeshElement.cpp; sourceTree = "<group>"; };
BE8D58C90B7D3EA2007ACFE4 /* OptimizedTriMeshElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OptimizedTriMeshElement.h; sourceTree = "<group>"; };
BE98E73A09F764A60040CE1B /* E3CocoaStackCrawl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = E3CocoaStackCrawl.cpp; path = ../../Source/Platform/Cocoa/E3CocoaStackCrawl.cpp; sourceTree = SOURCE_ROOT; };
@@ -1065,6 +1063,7 @@
children = (
BE392D070B6D0CCA00A351AC /* CQ3ObjectRef_Gets.h */,
BEDC045708A57B8100FB3A82 /* CQ3ObjectRef.h */,
+ BE11DD721D5A9DA20013C5ED /* CQ3WeakObjectRef.h */,
BE7F276D0B7C0D9000933ED1 /* Q3GroupIterator.h */,
AB83B5D8055E72B90034F56A /* Quesa.h */,
AB83B5D9055E72B90034F56A /* QuesaCamera.h */,
@@ -1107,7 +1106,6 @@
AB83B959055E77870034F56A /* Mac */ = {
isa = PBXGroup;
children = (
- BE8779560F9F7937007F104E /* Quesa.r */,
AB83B95B055E77870034F56A /* E3MacDebug.cpp */,
AB83B95C055E77870034F56A /* E3MacDrawContext.cpp */,
AB83B95D055E77870034F56A /* E3MacErrors.cpp */,
@@ -1253,7 +1251,6 @@
BE392D090B6D0CCA00A351AC /* CQ3ObjectRef_Gets.h in Headers */,
BE7F276E0B7C0D9000933ED1 /* Q3GroupIterator.h in Headers */,
BE097F3B156DCE85009AACEF /* QuesaMathOperators.hpp in Headers */,
- BE8528D318D9043400D37D00 /* QOShaderProgramCache.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1330,7 +1327,6 @@
isa = PBXRezBuildPhase;
buildActionMask = 2147483647;
files = (
- BE8779570F9F7937007F104E /* Quesa.r in Rez */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1702,7 +1698,6 @@
"Q3_VALIDATE_DRAW_ELEMENTS=1",
);
GCC_WARN_PROTOTYPE_CONVERSION = YES;
- ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.Quesa.Quesa;
};
name = Debug;
@@ -1712,7 +1707,6 @@
baseConfigurationReference = BE499C9A0F145E950060DF4E /* Quesa-framework.xcconfig */;
buildSettings = {
GCC_WARN_UNINITIALIZED_AUTOS = YES;
- ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.Quesa.Quesa;
};
name = Release;
Modified: trunk/quesa/Development/Projects/Mac/xcode-configs/Legacy.xcconfig
===================================================================
--- trunk/quesa/Development/Projects/Mac/xcode-configs/Legacy.xcconfig 2018-06-17 22:12:43 UTC (rev 3354)
+++ trunk/quesa/Development/Projects/Mac/xcode-configs/Legacy.xcconfig 2018-10-04 20:13:01 UTC (rev 3355)
@@ -27,7 +27,7 @@
// Compiler version:
// -----------------
// It is necessary to use GCC 4.0 in order to build ppc code for a G3.
-GCC_VERSION = 4.2
+GCC_VERSION =
GCC_VERSION[arch=ppc] = 4.0
Modified: trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig
===================================================================
--- trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig 2018-06-17 22:12:43 UTC (rev 3354)
+++ trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig 2018-10-04 20:13:01 UTC (rev 3355)
@@ -9,7 +9,7 @@
// Architectures:
// --------------
-ARCHS = i386 x86_64
+ARCHS = x86_64
// Minimum OS version supported:
@@ -38,7 +38,11 @@
CLANG_ENABLE_OBJC_WEAK = YES
+// Search Paths
+// ------------
+ALWAYS_SEARCH_USER_PATHS = NO
+
// Preprocessor settings relating to legacy code:
// ----------------------------------------------
// QUESA_SUPPORT_HITOOLBOX=1 must be used if you will create Carbon draw contexts,
@@ -49,7 +53,7 @@
// wire elements) and is not allowed when compiling for 64 bits.
// If you do not define QUESA_SUPPORT_QUICKTIME here, then Quesa.h will set it
// to 0 in 64-bit mode and 1 in 32-bit mode.
-QUESA_PREPROCESSOR_DEFS_LEGACY = QUESA_SUPPORT_QUICKTIME=0
+QUESA_PREPROCESSOR_DEFS_LEGACY = QUESA_SUPPORT_QUICKTIME=0 QUESA_SUPPORT_HITOOLBOX=0
ENABLE_STRICT_OBJC_MSGSEND = YES
Modified: trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig
===================================================================
--- trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig 2018-06-17 22:12:43 UTC (rev 3354)
+++ trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig 2018-10-04 20:13:01 UTC (rev 3355)
@@ -10,7 +10,7 @@
// work correctly when QUESA_NORMALIZE_NORMALS=0.
// Also see the comments about QUESA_PREPROCESSOR_DEFS_LEGACY in Modern.xcconfig
// or Legacy.xcconfig.
-QUESA_PREPROCESSOR_DEFINITIONS_CUSTOMISABLE = QUESA_NORMALIZE_NORMALS=0 QUESA_OS_COCOA=1
+QUESA_PREPROCESSOR_DEFINITIONS_CUSTOMISABLE = QUESA_NORMALIZE_NORMALS=0 QUESA_OS_COCOA=1 Q3_MEMORY_DEBUG=0
// Combine the above for the compiler's use.
QUESA_PREPROCESSOR_DEFINITIONS_COMMON = $(QUESA_PREPROCESSOR_DEFINITIONS_BASIC) $(QUESA_PREPROCESSOR_DEFINITIONS_CUSTOMISABLE) $(QUESA_PREPROCESSOR_DEFS_LEGACY)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2018-06-17 22:12:45
|
Revision: 3354
http://sourceforge.net/p/quesa/code/3354
Author: jwwalker
Date: 2018-06-17 22:12:43 +0000 (Sun, 17 Jun 2018)
Log Message:
-----------
Delete shadow VBOs with the wrong local light position. This simplifies the data structure, as we only need to store one shadow VBO for a given pair of geometry and light.
Modified Paths:
--------------
trunk/quesa/Development/Source/Core/Support/E3Debug.h
trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.cpp
trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h
trunk/quesa/SDK/Includes/Quesa/QuesaGeometry.h
Modified: trunk/quesa/Development/Source/Core/Support/E3Debug.h
===================================================================
--- trunk/quesa/Development/Source/Core/Support/E3Debug.h 2018-06-10 19:04:19 UTC (rev 3353)
+++ trunk/quesa/Development/Source/Core/Support/E3Debug.h 2018-06-17 22:12:43 UTC (rev 3354)
@@ -5,7 +5,7 @@
Debugging routines.
COPYRIGHT:
- Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -69,7 +69,7 @@
// Check a pointer for validity
-TQ3Boolean E3IsValidPtr(void *thePtr);
+TQ3Boolean E3IsValidPtr(const void *thePtr);
// Write something to a log file
@@ -77,28 +77,48 @@
// Close the log file.
-void E3CloseLog();
+void E3CloseLog( void );
+/*!
+ @function E3GetLogStream
+
+ @abstract Create or retrieve a file stream for a log file.
+
+ @discussion The log will be created in the user's Documents folder.
+
+ @param inCreate Whether to create and open the log stream if it is
+ not already open.
+
+ @result A stream for the log.
+*/
+FILE* E3GetLogStream( bool inCreate );
+
//=============================================================================
// Misc macros
//-----------------------------------------------------------------------------
// Check to see if a pointer is valid
#if Q3_DEBUG
- #define Q3_VALID_PTR(_thePtr) E3IsValidPtr((void *) (_thePtr))
+ #define Q3_VALID_PTR(_thePtr) E3IsValidPtr((const void *) (_thePtr))
#else
#define Q3_VALID_PTR(_thePtr) (_thePtr != nullptr)
#endif
+// Write to the log file. Unlike Q3_MESSAGE_FMT, this writes even if Q3_DEBUG is off.
+#define Q3_LOG_FMT(...) do { \
+ char msg_[1024]; \
+ snprintf( msg_, sizeof(msg_), __VA_ARGS__ ); \
+ strncat( msg_, "\n", 1 ); \
+ E3LogMessage( msg_ ); \
+ } while (0)
//=============================================================================
-// Assertion macros
+// Assertion and message macros
//-----------------------------------------------------------------------------
-#if Q3_DEBUG
// Generate an assertion error if a test fails
#define Q3_ASSERT(_theTest) \
((_theTest) ? \
@@ -106,11 +126,30 @@
E3Assert(__FILE__, __LINE__, #_theTest) \
)
+
+ #define Q3_ASSERT_FMT( _condition, ... ) \
+ do { \
+ if ( ! (_condition) ) \
+ { \
+ char _xBuf[1024]; \
+ char _yBuf[1024]; \
+ snprintf( _yBuf, sizeof(_yBuf), "" __VA_ARGS__ ); \
+ snprintf( _xBuf, sizeof(_xBuf), "%s %s", #_condition, _yBuf ); \
+ E3Assert( __FILE__, __LINE__, _xBuf ); \
+ } \
+ } while (false)
+
#define Q3_ASSERT_MESSAGE(_condition, _message) \
((_condition) ? \
((void) 0) : \
E3Assert(__FILE__, __LINE__, (_message)) \
)
+
+ // Generates an assertion error for a bad pointer
+ #define Q3_ASSERT_VALID_PTR(_thePtr) \
+ Q3_ASSERT(Q3_VALID_PTR(_thePtr))
+
+#if Q3_DEBUG
#define Q3_MESSAGE( _msg ) E3LogMessage( _msg )
@@ -121,9 +160,6 @@
E3LogMessage( msg_ ); \
} while (0)
- // Generates an assertion error for a bad pointer
- #define Q3_ASSERT_VALID_PTR(_thePtr) \
- Q3_ASSERT(Q3_VALID_PTR(_thePtr))
#if Q3_VALIDATE_DRAW_ELEMENTS
#define Q3_CHECK_DRAW_ELEMENTS( _numPts, _numIndices, _indexArray ) \
@@ -132,20 +168,10 @@
#define Q3_CHECK_DRAW_ELEMENTS( _numPts, _numIndices, _indexArray )
#endif
#else
- // Do nothing
- #define Q3_ASSERT(_theTest) \
- ((void) 0)
-
- #define Q3_ASSERT_MESSAGE(_condition, _message) ((void) 0)
-
#define Q3_MESSAGE( _msg )
#define Q3_MESSAGE_FMT(...)
- // Do nothing
- #define Q3_ASSERT_VALID_PTR(_thePtr) \
- ((void) 0)
-
#define Q3_CHECK_DRAW_ELEMENTS( _numPts, _numIndices, _indexArray )
#endif
Modified: trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.cpp
===================================================================
--- trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.cpp 2018-06-10 19:04:19 UTC (rev 3353)
+++ trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.cpp 2018-06-17 22:12:43 UTC (rev 3354)
@@ -5,7 +5,7 @@
Mac debug implementation.
COPYRIGHT:
- Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -104,7 +104,7 @@
// E3IsValidPtr : Check a pointer for validity.
//-----------------------------------------------------------------------------
TQ3Boolean
-E3IsValidPtr(void *thePtr)
+E3IsValidPtr(const void *thePtr)
{
Modified: trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp 2018-06-10 19:04:19 UTC (rev 3353)
+++ trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp 2018-06-17 22:12:43 UTC (rev 3354)
@@ -5,7 +5,7 @@
Quesa OpenGL shadow volume caching.
COPYRIGHT:
- Copyright (c) 2011-2016, Quesa Developers. All rights reserved.
+ Copyright (c) 2011-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -46,10 +46,11 @@
//-----------------------------------------------------------------------------
#include "GLShadowVolumeManager.h"
#include "GLGPUSharing.h"
+#include "GLVBOManager.h"
#include "CQ3WeakObjectRef.h"
#include "GLUtils.h"
#include "E3Main.h"
-#include "GLVBOManager.h"
+#include "E3CustomElements.h"
#include <vector>
#include <algorithm>
@@ -65,6 +66,8 @@
const TQ3Uns32 kShadowCacheKey = Q3_FOUR_CHARACTER_CONSTANT('s', 'v', 'c', 'k');
const TQ3Uns32 kAbsentBuffer = 0xFFFFFFFFU;
+
+ const TQ3Uns32 kMaxSecondaryTexCoords = 16;
}
#ifndef GL_ARRAY_BUFFER
@@ -73,7 +76,11 @@
#define GL_STATIC_DRAW 0x88E4
#endif
+#ifndef GL_ARB_multitexture
+ #define GL_TEXTURE0_ARB 0x84C0
+#endif
+//#define VALIDATE_COUNTS 1
//=============================================================================
@@ -92,16 +99,20 @@
namespace
{
typedef std::pair< TQ3GeometryObject, TQ3LightObject > GeomAndLight;
-
- typedef std::vector< class ShadowVBO* > ShadowVec;
- typedef std::vector< GeomAndLight > GeomLightVec;
-
- typedef std::map< GeomAndLight, ShadowVec > GeomLightToShadows;
+ typedef std::map< GeomAndLight, class ShadowVBO* > GeomLightToShadow;
+
const TQ3RationalPoint4D kDummyPoint = { 0.0f, 0.0f, 0.0f, 0.0f };
const float kMaxLightDistSq = 7.0e-6f;
+ struct SecondaryTexCoord
+ {
+ TQ3Uns32 mGLBufferName;
+ GLint mCoordsPerVertex;
+ GLenum mTextureUnit;
+ };
+
/*!
@class ShadowVBO
@abstract Cached shadow volume VBO.
@@ -122,7 +133,7 @@
CQ3WeakObjectRef mLightObject;
TQ3RationalPoint4D mLocalLightPosition; // w is 0 or 1
-
+
GeomAndLight mMapKey;
TQ3Uns32 mNumTriIndices;
@@ -129,6 +140,9 @@
TQ3Uns32 mNumQuadIndices;
GLuint mGLBufferNames[2]; // 0 is array, 1 is index
TQ3Uns32 mBufferBytes;
+
+ TQ3Uns32 mNumSecondaryTexCoords;
+ SecondaryTexCoord mSecondaryTexCoord[kMaxSecondaryTexCoords];
private:
ShadowVBO* mPrev;
@@ -162,13 +176,17 @@
void AddVBO( ShadowVBO* inVBO );
void FlushStaleShadows( const GLBufferFuncs& inFuncs );
void MakeRoom( TQ3Uns32 inBytesNeeded, const GLBufferFuncs& inFuncs );
- void AddBytes( TQ3Uns32 inBytes );
void PurgeDownToSize( long long inTargetSize, const GLBufferFuncs& inFuncs );
void SetMaxBufferSize( long long inBufferSize, const GLBufferFuncs& inFuncs );
+ #if VALIDATE_COUNTS
+ void ValidateByteCount() const;
+ void ValidateShadowCount() const;
+ #endif
+
private:
- GeomLightToShadows mGeomLightToShadows;
+ GeomLightToShadow mGeomLightToShadows;
ShadowVBO mListOldEnd;
ShadowVBO mListNewEnd;
long long mTotalBytes;
@@ -176,8 +194,15 @@
};
}
+#if VALIDATE_COUNTS
+ #define VALIDATE_COUNT(cache) do {\
+ cache->ValidateByteCount(); \
+ cache->ValidateShadowCount(); \
+ } while (false)
+#else
+ #define VALIDATE_COUNT(cache)
+#endif
-
//=============================================================================
// Internal functions
//-----------------------------------------------------------------------------
@@ -232,6 +257,10 @@
{
}
+#if 0//Q3_DEBUG
+static long sShadowVBOCount = 0;
+#endif
+
ShadowVBO::ShadowVBO( TQ3GeometryObject inGeom,
TQ3LightObject inLight,
const TQ3RationalPoint4D& inLocalLightPos )
@@ -241,14 +270,17 @@
, mLocalLightPosition( inLocalLightPos )
, mMapKey( inGeom, inLight )
, mBufferBytes( 0 )
+ , mNumSecondaryTexCoords( 0 )
, mPrev( nullptr )
, mNext( nullptr )
{
// Leave other fields uninitialized for now
+ //Q3_MESSAGE_FMT("ShadowVBO created, %ld", ++sShadowVBOCount );
}
ShadowVBO::~ShadowVBO()
{
+ //Q3_MESSAGE_FMT("ShadowVBO destroyed, %ld", --sShadowVBOCount);
}
bool ShadowVBO::IsStale() const
@@ -275,6 +307,7 @@
{
mListOldEnd.mNext = &mListNewEnd;
mListNewEnd.mPrev = &mListOldEnd;
+ VALIDATE_COUNT(this);
}
ShadowVolCache::~ShadowVolCache()
@@ -287,14 +320,40 @@
while (listItem != &mListNewEnd)
{
- listItem->mPrev->mNext = listItem->mNext;
- listItem->mNext->mPrev = listItem->mPrev;
- delete listItem;
- listItem = mListOldEnd.mNext;
+ ShadowVBO* toDelete = listItem;
+ listItem = listItem->mNext;
+ delete toDelete;
}
}
+#if VALIDATE_COUNTS
+void ShadowVolCache::ValidateByteCount() const
+{
+ long long trueTotal = 0;
+ ShadowVBO* listPtr;
+ for (listPtr = mListOldEnd.mNext; listPtr != &mListNewEnd; listPtr = listPtr->mNext)
+ {
+ trueTotal += listPtr->mBufferBytes;
+ }
+ Q3_ASSERT_FMT( trueTotal == mTotalBytes, "Actual shadow VBO byte count %lld != nominal %lld",
+ trueTotal, mTotalBytes );
+}
+void ShadowVolCache::ValidateShadowCount() const
+{
+ size_t listCount = 0;
+ ShadowVBO* listPtr;
+ for (listPtr = mListOldEnd.mNext; listPtr != &mListNewEnd; listPtr = listPtr->mNext)
+ {
+ ++listCount;
+ }
+
+ size_t mapCount = mGeomLightToShadows.size();
+ Q3_ASSERT_FMT( mapCount == listCount, "Shadow cache list has %d shadows, "
+ "map has %d shadows", (int)listCount, (int)mapCount );
+}
+#endif
+
void ShadowVolCache::DeleteVBO( ShadowVBO* inCachedVBO, const GLBufferFuncs& inFuncs )
{
// Remove the buffers from VRAM.
@@ -301,7 +360,14 @@
if ( inCachedVBO->mNumTriIndices + inCachedVBO->mNumQuadIndices > 0)
{
(*inFuncs.glDeleteBuffersProc)( 2, inCachedVBO->mGLBufferNames );
+ ForgetVBO( inCachedVBO->mGLBufferNames[0] );
+ ForgetVBO( inCachedVBO->mGLBufferNames[1] );
}
+ for (TQ3Uns32 i = 0; i < inCachedVBO->mNumSecondaryTexCoords; ++i)
+ {
+ (*inFuncs.glDeleteBuffersProc)( 1, &inCachedVBO->mSecondaryTexCoord[i].mGLBufferName );
+ ForgetVBO( inCachedVBO->mSecondaryTexCoord[i].mGLBufferName );
+ }
// Remove the record from the doubly-linked list.
inCachedVBO->mPrev->mNext = inCachedVBO->mNext;
@@ -315,18 +381,16 @@
void ShadowVolCache::AddVBO( ShadowVBO* inVBO )
{
+ VALIDATE_COUNT(this);
+
// Add the new record to our map
GeomAndLight key( inVBO->mGeomObject.get(), inVBO->mLightObject.get() );
- GeomLightToShadows::iterator found = mGeomLightToShadows.find( key );
+ GeomLightToShadow::iterator found = mGeomLightToShadows.find( key );
- if (found == mGeomLightToShadows.end())
- {
- mGeomLightToShadows[ key ] = ShadowVec();
- found = mGeomLightToShadows.find( key );
- }
+ Q3_ASSERT_FMT( found == mGeomLightToShadows.end(), "Adding shadow VBO without deleting a stale one" );
- found->second.push_back( inVBO );
+ mGeomLightToShadows[ key ] = inVBO;
// Insert the new record at the new end of a doubly-linked list.
inVBO->mNext = &mListNewEnd;
@@ -335,6 +399,10 @@
mListNewEnd.mPrev = inVBO;
mTotalBytes += inVBO->mBufferBytes;
+
+ VALIDATE_COUNT(this);
+
+ //Q3_MESSAGE_FMT("Shadow cache %lld bytes", mTotalBytes );
}
@@ -344,33 +412,25 @@
const GLBufferFuncs& inFuncs )
{
ShadowVBO* cachedShadow = nullptr;
+ VALIDATE_COUNT(this);
GeomAndLight key( inGeom, inLight );
- GeomLightToShadows::iterator found = mGeomLightToShadows.find( key );
+ GeomLightToShadow::iterator found = mGeomLightToShadows.find( key );
if (found != mGeomLightToShadows.end())
{
- ShadowVec& theShadows( found->second );
+ cachedShadow = found->second;
- // Linear search for a light position that is close enough.
- ShadowVec::iterator endIt = theShadows.end();
- for (ShadowVec::iterator i = theShadows.begin(); i != endIt; ++i)
+ if ( cachedShadow->IsStale() ||
+ (! IsSameLightPosition( cachedShadow->mLocalLightPosition, inLocalLightPos )) )
{
- if (IsSameLightPosition( (*i)->mLocalLightPosition, inLocalLightPos ))
- {
- cachedShadow = *i;
-
- if (cachedShadow->IsStale())
- {
- DeleteVBO( cachedShadow, inFuncs );
- theShadows.erase( i );
- cachedShadow = nullptr;
- break;
- }
- }
+ DeleteVBO( cachedShadow, inFuncs );
+ mGeomLightToShadows.erase( found );
+ cachedShadow = nullptr;
}
}
+ VALIDATE_COUNT(this);
return cachedShadow;
}
@@ -382,6 +442,20 @@
(*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, inCachedVBO->mGLBufferNames[0] );
glVertexPointer( 4, GL_FLOAT, 0, BufferObPtr( 0 ) );
+ TQ3Uns32 i;
+ if (inCachedVBO->mNumSecondaryTexCoords > 0)
+ {
+ for (i = 0; i < inCachedVBO->mNumSecondaryTexCoords; ++i)
+ {
+ (*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, inCachedVBO->mSecondaryTexCoord[i].mGLBufferName );
+ (*inFuncs.glClientActiveTextureProc)( inCachedVBO->mSecondaryTexCoord[i].mTextureUnit );
+ glEnableClientState( GL_TEXTURE_COORD_ARRAY );
+ glTexCoordPointer( inCachedVBO->mSecondaryTexCoord[i].mCoordsPerVertex, GL_FLOAT, 0,
+ BufferObPtr( 0 ) );
+ }
+ (*inFuncs.glClientActiveTextureProc)( GL_TEXTURE0_ARB );
+ }
+
(*inFuncs.glBindBufferProc)( GL_ELEMENT_ARRAY_BUFFER,
inCachedVBO->mGLBufferNames[1] );
@@ -400,6 +474,17 @@
(*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, 0 );
(*inFuncs.glBindBufferProc)( GL_ELEMENT_ARRAY_BUFFER, 0 );
+
+ if (inCachedVBO->mNumSecondaryTexCoords > 0)
+ {
+ for (i = 0; i < inCachedVBO->mNumSecondaryTexCoords; ++i)
+ {
+ (*inFuncs.glClientActiveTextureProc)( inCachedVBO->mSecondaryTexCoord[i].mTextureUnit );
+ glDisableClientState( GL_TEXTURE_COORD_ARRAY );
+ (*inFuncs.glMultiTexCoord1fProc)( inCachedVBO->mSecondaryTexCoord[i].mTextureUnit, 0.0f );
+ }
+ (*inFuncs.glClientActiveTextureProc)( GL_TEXTURE0_ARB );
+ }
}
// Remove the record from the doubly-linked list.
@@ -411,51 +496,33 @@
inCachedVBO->mPrev = mListNewEnd.mPrev;
inCachedVBO->mPrev->mNext = inCachedVBO;
mListNewEnd.mPrev = inCachedVBO;
+ VALIDATE_COUNT(this);
}
void ShadowVolCache::FlushStaleShadows( const GLBufferFuncs& inFuncs )
{
- GeomLightVec toFlush;
- ShadowVec staleShadows;
+ VALIDATE_COUNT(this);
+ GeomLightToShadow::iterator endMap = mGeomLightToShadows.end();
+ GeomLightToShadow::iterator i = mGeomLightToShadows.begin();
- GeomLightToShadows::iterator endMap = mGeomLightToShadows.end();
- for (GeomLightToShadows::iterator i = mGeomLightToShadows.begin();
- i != endMap; ++i)
+ while (i != endMap)
{
- ShadowVec& theShadows( i->second );
- // Find the first stale shadow
- ShadowVec::iterator endVec = theShadows.end();
- ShadowVec::iterator first;
- for (first = theShadows.begin(); first != endVec; ++first)
+ // Get next iterator now, in case we invalidate the current one.
+ GeomLightToShadow::iterator next = i;
+ ++next;
+
+ ShadowVBO* theShadow = i->second;
+
+ if (theShadow->IsStale())
{
- if ((*first)->IsStale())
- {
- break;
- }
+ DeleteVBO( theShadow, inFuncs );
+ mGeomLightToShadows.erase( i );
}
- if (first != endVec)
- {
- // As we go, delete stale ones and move the good ones to the left.
- // The algorithm is similar to std::remove_if.
- DeleteVBO( *first, inFuncs );
-
- ShadowVec::iterator j;
-
- for (j = first, ++j; j != endVec; ++j)
- {
- if ((*j)->IsStale())
- {
- DeleteVBO( *j, inFuncs );
- }
- else
- {
- *first = *j;
- ++first;
- }
- }
- theShadows.erase( first, endVec );
- }
+
+ i = next;
}
+
+ VALIDATE_COUNT(this);
}
@@ -472,6 +539,7 @@
void ShadowVolCache::PurgeDownToSize( long long inTargetSize, const GLBufferFuncs& inFuncs )
{
+ VALIDATE_COUNT(this);
while ( (mTotalBytes > inTargetSize) && (mListOldEnd.mNext != &mListNewEnd) )
{
// Find the least recently used VBO from the doubly-linked list
@@ -478,26 +546,13 @@
ShadowVBO* oldestVBO = mListOldEnd.mNext;
// Remove it from the map index
- GeomLightToShadows::iterator found = mGeomLightToShadows.find( oldestVBO->mMapKey );
- if (found != mGeomLightToShadows.end())
- {
- ShadowVec& theShadows( found->second );
- ShadowVec::iterator foundShadow = std::find( theShadows.begin(),
- theShadows.end(), oldestVBO );
- if (foundShadow != theShadows.end())
- {
- theShadows.erase( foundShadow );
- if (theShadows.empty())
- {
- mGeomLightToShadows.erase( found );
- }
- }
- }
+ mGeomLightToShadows.erase( oldestVBO->mMapKey );
// Remove it from the doubly linked list, remove the VBOs, update
// mTotalBytes, and delete the ShadowVBO record.
DeleteVBO( oldestVBO, inFuncs );
}
+ VALIDATE_COUNT(this);
}
void ShadowVolCache::SetMaxBufferSize( long long inBufferSize, const GLBufferFuncs& inFuncs )
@@ -569,6 +624,102 @@
}
/*!
+ @function AddSecondaryTextureCoordsToVBO
+ @abstract Add an array of secondary texture coordinates to an
+ already-cached VBO, as an optional follow-up to
+ AddVBOToCache.
+ @param inCache A VBO cache.
+ @param ioVBO A new VBO object not yet added to the cache.
+ @param inTextureUnit A texture unit to which we should supply
+ the array, e.g., GL_TEXTURE1_ARB.
+ @param inNumPoints Number of points (vertices).
+ @param inNumCoordsPerPoint Number of floating-point values for each
+ vertex. Must be 1, 2, 3, or 4.
+ @param inInfiniteLight Whether the light is infinite (directional).
+ @param inData Array of data. The number of floating-point
+ values should be inNumPoints * inNumCoordsPerPoint.
+*/
+static void AddSecondaryTextureCoordsToVBO(
+ const GLBufferFuncs& inFuncs,
+ ShadowVolCache* inCache,
+ ShadowVBO* ioVBO,
+ GLenum inTextureUnit,
+ TQ3Uns32 inNumPoints,
+ TQ3Uns32 inNumCoordsPerPoint,
+ bool inInfiniteLight,
+ const float* inData )
+{
+ if ( (ioVBO != nullptr) && (ioVBO->mNumSecondaryTexCoords < kMaxSecondaryTexCoords) )
+ {
+ TQ3Uns32 coordIndex = ioVBO->mNumSecondaryTexCoords;
+ ioVBO->mNumSecondaryTexCoords += 1;
+ SecondaryTexCoord& theCoord( ioVBO->mSecondaryTexCoord[ coordIndex ] );
+ (*inFuncs.glGenBuffersProc)( 1, &theCoord.mGLBufferName );
+ theCoord.mCoordsPerVertex = (GLint) inNumCoordsPerPoint;
+ theCoord.mTextureUnit = inTextureUnit;
+
+ TQ3Uns32 finitePointDataSize = inNumPoints * inNumCoordsPerPoint * sizeof(float);
+ TQ3Uns32 infinitePointDataSize;
+ if (inInfiniteLight)
+ {
+ infinitePointDataSize = inNumCoordsPerPoint * sizeof(float);
+ }
+ else // finite light, each finite point has a matching infinite point
+ {
+ infinitePointDataSize = finitePointDataSize;
+ }
+ TQ3Uns32 dataSize = finitePointDataSize + infinitePointDataSize;
+ ioVBO->mBufferBytes += dataSize;
+ inCache->MakeRoom( dataSize, inFuncs );
+
+ std::vector<float> zeroBuf( infinitePointDataSize / sizeof(float) );
+
+ (*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, theCoord.mGLBufferName );
+ (*inFuncs.glBufferDataProc)( GL_ARRAY_BUFFER, dataSize,
+ nullptr, GL_STATIC_DRAW );
+ (*inFuncs.glBufferSubDataProc)( GL_ARRAY_BUFFER, 0, finitePointDataSize,
+ inData );
+ (*inFuncs.glBufferSubDataProc)( GL_ARRAY_BUFFER, finitePointDataSize,
+ infinitePointDataSize, &zeroBuf[0] );
+ RecordVBO( theCoord.mGLBufferName, ioVBO->mGeomObject.get(), dataSize, 3 );
+
+ (*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, 0 );
+ }
+}
+
+/*!
+ @function HandleSecondaryTextureCoords
+ @abstract Check for secondary texture coordinates attached to the geometry.
+ @param inGeom A geometry object.
+ @param inCache A VBO cache.
+ @param ioVBO A new VBO object not yet added to the cache.
+ @param inInfiniteLight Whether the light is infinite (directional).
+*/
+static void HandleSecondaryTextureCoords(
+ TQ3GeometryObject inGeom,
+ const GLBufferFuncs& inFuncs,
+ ShadowVolCache* inCache,
+ ShadowVBO* ioVBO,
+ bool inInfiniteLight )
+{
+ TQ3Uns32 bufSize;
+ if ( (kQ3Success == Q3Object_GetProperty( inGeom,
+ kQ3GeometryPropertyCustomTextureCoordinates, 0, &bufSize, nullptr )) &&
+ ((bufSize % 4) == 0) &&
+ bufSize >= sizeof(TQ3CustomTextureCoordinates) )
+ {
+ std::vector<TQ3Uns8> buffer( bufSize );
+ Q3Object_GetProperty( inGeom, kQ3GeometryPropertyCustomTextureCoordinates,
+ bufSize, nullptr, &buffer[0] );
+ TQ3CustomTextureCoordinates* tcRec(
+ reinterpret_cast<TQ3CustomTextureCoordinates*>( &buffer[0] ) );
+ GLenum textureUnit = GL_TEXTURE0_ARB + tcRec->textureUnit;
+ AddSecondaryTextureCoordsToVBO( inFuncs, inCache, ioVBO, textureUnit,
+ tcRec->numPoints, tcRec->coordsPerPoint, inInfiniteLight, tcRec->coords );
+ }
+}
+
+/*!
@function AddShadowVolume
@abstract Add a shadow volume mesh to the cache. Do not call this unless
RenderCachedShadowVolume has just returned false.
@@ -599,6 +750,7 @@
if (theCache != nullptr)
{
+ VALIDATE_COUNT(theCache);
ShadowVBO* newVBO = new ShadowVBO( inGeom, inLight, inLocalLightPos );
newVBO->mNumTriIndices = inNumTriIndices;
@@ -619,7 +771,14 @@
(*inFuncs.glBufferDataProc)( GL_ARRAY_BUFFER,
inNumPoints * sizeof(TQ3RationalPoint4D),
inPoints, GL_STATIC_DRAW );
+ GLenum error = glGetError();
+ if (error == GL_OUT_OF_MEMORY)
+ {
+ DumpVBOs();
+ Q3_ASSERT_FMT( false, "Failed to allocate shadow VBO");
+ }
(*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, 0 );
+ RecordVBO( newVBO->mGLBufferNames[0], inGeom, inNumPoints * sizeof(TQ3RationalPoint4D), 2 );
// Index data into elements buffer.
(*inFuncs.glBindBufferProc)( GL_ELEMENT_ARRAY_BUFFER,
@@ -628,9 +787,14 @@
(inNumTriIndices + inNumQuadIndices) * sizeof(GLuint),
inVertIndices, GL_STATIC_DRAW );
(*inFuncs.glBindBufferProc)( GL_ELEMENT_ARRAY_BUFFER, 0 );
+ RecordVBO( newVBO->mGLBufferNames[1], inGeom, (inNumTriIndices + inNumQuadIndices) * sizeof(GLuint), 2 );
+
+ HandleSecondaryTextureCoords( inGeom, inFuncs, theCache, newVBO,
+ inLocalLightPos.w == 0.0f );
}
theCache->AddVBO( newVBO );
+ VALIDATE_COUNT(theCache);
}
}
Modified: trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp 2018-06-10 19:04:19 UTC (rev 3353)
+++ trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp 2018-06-17 22:12:43 UTC (rev 3354)
@@ -5,7 +5,7 @@
Quesa OpenGL vertex buffer object caching.
COPYRIGHT:
- Copyright (c) 2007-2016, Quesa Developers. All rights reserved.
+ Copyright (c) 2007-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -45,7 +45,6 @@
// Include files
//-----------------------------------------------------------------------------
#include "GLVBOManager.h"
-#include "GLShadowVolumeManager.h"
#include "GLGPUSharing.h"
#include "CQ3WeakObjectRef.h"
#include "GLUtils.h"
@@ -55,7 +54,43 @@
#include <algorithm>
#include <cstddef>
+// In lieu of glext.h
+#ifndef GL_ARB_multitexture
+ #define GL_TEXTURE0_ARB 0x84C0
+#endif
+#ifndef GL_BUFFER_SIZE
+#define GL_BUFFER_SIZE 0x8764
+#endif
+
+#if Q3_DEBUG
+ #define Q3_DEBUG_VBO 1
+#endif
+
+#if Q3_DEBUG_VBO
+ #include <map>
+#endif
+
+static GLenum sGLError = 0;
+
+#if Q3_DEBUG_GL_ERRORS
+ #define CHECK_GL_ERROR do { \
+ sGLError = glGetError(); \
+ if (sGLError != GL_NO_ERROR) \
+ { \
+ char xmsg[200]; \
+ snprintf( xmsg, sizeof(xmsg), \
+ "glGetError() is 0x%04X", \
+ (unsigned int)sGLError ); \
+ E3Assert(__FILE__, __LINE__, xmsg); \
+ } \
+ } while (false)
+#else
+ #define CHECK_GL_ERROR
+#endif
+
+static int sVBOCount = 0;
+
//=============================================================================
// Internal constants
//-----------------------------------------------------------------------------
@@ -64,6 +99,8 @@
const TQ3Uns32 kVBOCacheKey = Q3_FOUR_CHARACTER_CONSTANT('v', 'b', 'o', 'k');
const TQ3Uns32 kAbsentBuffer = 0xFFFFFFFFU;
+
+ const TQ3Uns32 kMaxSecondaryTexCoords = 16;
}
#ifndef GL_ARRAY_BUFFER
@@ -72,7 +109,16 @@
#define GL_STATIC_DRAW 0x88E4
#endif
+#if Q3_DEBUG
+ //#define VALIDATE_COUNTS 1
+#endif
+#if VALIDATE_COUNTS
+ #define VALIDATE_COUNT(cache) cache->ValidateVBOCount()
+#else
+ #define VALIDATE_COUNT(cache)
+#endif
+
//=============================================================================
// Internal types
//-----------------------------------------------------------------------------
@@ -105,9 +151,19 @@
GLintptrARB offset,
GLsizeiptrARB size,
const GLvoid *data);
+typedef void (APIENTRY * ClientActiveTextureProcPtr)( GLenum unit );
+typedef void (APIENTRY * MultiTexCoord1fProcPtr)( GLenum unit, GLfloat s );
+typedef void (APIENTRY * GetBufferParameterivProcPtr)(GLenum target, GLenum value, GLint * data);
namespace
{
+ struct SecondaryTexCoord
+ {
+ TQ3Uns32 mGLBufferName;
+ GLint mCoordsPerVertex;
+ GLenum mTextureUnit;
+ };
+
#pragma mark struct CachedVBO
struct CachedVBO
{
@@ -123,6 +179,9 @@
TQ3Uns32 mEditIndex;
GLenum mGLMode; // e.g., GL_TRIANGLES
TQ3Uns32 mNumIndices;
+ #if Q3_DEBUG
+ TQ3Uns32 mNumPoints;
+ #endif
GLuint mGLBufferNames[2]; // 0 is array, 1 is index
TQ3Uns32 mVertexBufferOffset;
TQ3Uns32 mNormalBufferOffset;
@@ -129,6 +188,8 @@
TQ3Uns32 mColorBufferOffset;
TQ3Uns32 mTextureUVBufferOffset;
TQ3Uns32 mBufferBytes;
+ TQ3Uns32 mNumSecondaryTexCoords;
+ SecondaryTexCoord mSecondaryTexCoord[kMaxSecondaryTexCoords];
CachedVBO* mPrev;
CachedVBO* mNext;
@@ -156,6 +217,7 @@
void PurgeDownToSize( long long inTargetSize, const GLBufferFuncs& inFuncs );
void SetMaxBufferSize( long long inBufferSize, const GLBufferFuncs& inFuncs );
void MakeRoom( TQ3Uns32 inBytesNeeded, const GLBufferFuncs& inFuncs );
+ void AddBytes( TQ3Uns32 inBytes );
void AddToUsageList( CachedVBO* ioVBO );
void DeleteFromUsageList( CachedVBO* ioVBO );
@@ -166,6 +228,10 @@
CachedVBO* FindVBOInVec( TQ3GeometryObject inGeom, CachedVBOVec& inVBOs );
void FlushUnreferencedInVec( CachedVBOVec& ioVBOs, const GLBufferFuncs& inFuncs );
+ #if VALIDATE_COUNTS
+ void ValidateVBOCount() const;
+ #endif
+
// VBO records will be stored in 3 vectors, one for each of
// the modes GL_TRIANGLE_STRIP, GL_TRIANGLES, GL_LINES.
// Each vector will be maintained in order of the
@@ -197,9 +263,155 @@
return inCachedVBO->mGeomObject.isvalid();
}
};
+
+#if 0//Q3_DEBUG
+ struct VBODebugRec
+ {
+ TQ3Uns32 byteCount;
+ TQ3GeometryObject geom;
+ int kind;
+
+ VBODebugRec()
+ : byteCount( 0 )
+ , geom( nullptr )
+ , kind( -1 )
+ {}
+ VBODebugRec( TQ3Uns32 inBytes,
+ TQ3GeometryObject inGeom,
+ int inKind )
+ : byteCount( inBytes )
+ , geom( inGeom )
+ , kind( inKind )
+ {}
+ VBODebugRec( const VBODebugRec& inOther )
+ : byteCount( inOther.byteCount )
+ , geom( inOther.geom )
+ , kind( inOther.kind )
+ {
+ }
+ };
+#endif
}
+#if 0//Q3_DEBUG
+typedef std::map< GLuint, VBODebugRec > VBOMap;
+static VBOMap* sVBORecords = nullptr;
+
+/*!
+ @function RecordVBO
+ @abstract For debugging, record a VBO allocation.
+ @param inBufferName The ID number of the buffer.
+ @param inGeom The geometry owning the VBO.
+ @param inBytes Size of the buffer in bytes.
+ @param inKind Normal = 0, normal secondary = 1,
+ shadow = 2, shadow secondary = 3
+*/
+void RecordVBO(
+ GLuint inBufferName,
+ TQ3GeometryObject inGeom,
+ TQ3Uns32 inBytes,
+ int inKind )
+{
+ if (sVBORecords == nullptr)
+ {
+ sVBORecords = new VBOMap;
+ }
+
+ VBOMap::iterator foundIt = sVBORecords->find( inBufferName );
+ Q3_ASSERT_FMT( foundIt == sVBORecords->end(), "VBO buffer name again??" );
+ (*sVBORecords)[ inBufferName ] = VBODebugRec( inBytes, inGeom, inKind );
+}
+
+/*!
+ @function ForgetVBO
+ @abstract Remove a VBO previously passed to RecordVBO.
+ @param inBufferName The ID number of the buffer.
+*/
+void ForgetVBO( GLuint inBufferName )
+{
+ Q3_ASSERT_FMT( sVBORecords != nullptr, "Debug log of VBOs was not started");
+ VBOMap::iterator foundIt = sVBORecords->find( inBufferName );
+ Q3_ASSERT_FMT( foundIt != sVBORecords->end(), "VBO buffer being forgotten when not known??" );
+ sVBORecords->erase( foundIt );
+}
+
+/*!
+ @function DumpVBOs
+ @abstract List the contents of the VBO recording to the debug
+ log.
+*/
+void DumpVBOs( void )
+{
+ Q3_ASSERT_FMT( sVBORecords != nullptr, "Debug log of VBOs was not started");
+ Q3_MESSAGE_FMT("==== Dump of VBO log ====");
+ VBOMap::iterator endRecs = sVBORecords->end();
+ for (VBOMap::iterator i = sVBORecords->begin(); i != endRecs; ++i)
+ {
+ Q3_MESSAGE_FMT("ID %d, size %lu, geom %p, kind %d", (int) i->first,
+ (unsigned long) i->second.byteCount, i->second.geom, i->second.kind );
+ }
+ Q3_MESSAGE_FMT("==== End VBO log ====");
+}
+#else
+ #define RecordVBO(...)
+ #define ForgetVBO(...)
+ #define DumpVBOs(...)
+#endif
+
+#if Q3_DEBUG_VBO
+ typedef std::map< const CachedVBO*, bool > GoodVBOMap;
+ static GoodVBOMap* sGoodVBO = nullptr;
+
+ static void ALLOCATED_VBO( const CachedVBO* inNewVBO )
+ {
+ if (sGoodVBO == nullptr)
+ {
+ sGoodVBO = new GoodVBOMap;
+ }
+ GoodVBOMap::iterator foundIt = sGoodVBO->find( inNewVBO );
+ Q3_ASSERT_FMT( (foundIt == sGoodVBO->end()) or (not foundIt->second),
+ "Supposedly new VBO already known and valid!" );
+ (*sGoodVBO)[ inNewVBO ] = true;
+ }
+
+ static void FREED_VBO( const CachedVBO* inOldVBO )
+ {
+ if (sGoodVBO == nullptr)
+ {
+ sGoodVBO = new GoodVBOMap;
+ }
+ GoodVBOMap::iterator foundIt = sGoodVBO->find( inOldVBO );
+ Q3_ASSERT_FMT( foundIt != sGoodVBO->end(), "VBO being freed is not known!" );
+ Q3_ASSERT_FMT( foundIt->second, "VBO being freed a second time!");
+ (*sGoodVBO)[ inOldVBO ] = false;
+ }
+
+ static void CHECK_VBO( const CachedVBO* inOldVBO )
+ {
+ if (sGoodVBO == nullptr)
+ {
+ sGoodVBO = new GoodVBOMap;
+ }
+ GoodVBOMap::iterator foundIt = sGoodVBO->find( inOldVBO );
+ Q3_ASSERT_FMT( foundIt != sGoodVBO->end(), "VBO being accessed is not known!" );
+ Q3_ASSERT_FMT( foundIt->second, "VBO being accessed after being freed!");
+ }
+
+ static void CHECK_VBO_OR_NULL( const CachedVBO* inOldVBO )
+ {
+ if (inOldVBO != nullptr)
+ {
+ CHECK_VBO( inOldVBO );
+ }
+ }
+#else
+ #define ALLOCATED_VBO( x )
+ #define FREED_VBO( x )
+ #define CHECK_VBO( x )
+ #define CHECK_VBO_OR_NULL( x )
+#endif
+
//=============================================================================
// Internal functions
//-----------------------------------------------------------------------------
@@ -221,6 +433,7 @@
if (theCache != nullptr)
{
+ //Q3_MESSAGE_FMT("Created VBOCache %p for GL context %p", theCache, glContext);
GLGPUSharing_AddCache( glContext, kVBOCacheKey, theCache );
}
}
@@ -254,6 +467,7 @@
{
CachedVBOVec::size_type mid = (lowIndex + highIndex) / 2;
+ CHECK_VBO( vboArray[ mid ] );
if (vboArray[ mid ]->mSortKey < inGeom)
{
lowIndex = mid + 1;
@@ -267,6 +481,7 @@
if ( (lowIndex == highIndex) &&
(vboArray[ lowIndex ]->mGeomObject.get() == inGeom) )
{
+ CHECK_VBO( vboArray[ lowIndex ] );
foundIt = inVBOs.begin() + lowIndex;
}
}
@@ -328,6 +543,7 @@
, mEditIndex( Q3Shared_GetEditIndex( inGeom ) )
, mGLMode( inMode )
, mBufferBytes( 0 )
+ , mNumSecondaryTexCoords( 0 )
, mPrev( nullptr )
, mNext( nullptr )
{
@@ -338,6 +554,7 @@
: mGeomObject()
, mSortKey( nullptr )
, mBufferBytes( 0 )
+ , mNumSecondaryTexCoords( 0 )
, mPrev( nullptr )
, mNext( nullptr )
{
@@ -360,6 +577,7 @@
VBOCache::~VBOCache()
{
+ Q3_MESSAGE_FMT("Deleting VBOCache %p", this );
GLBufferFuncs funcs;
funcs.InitializeForDelete();
DeleteCachedVBOs( mCachedVBOs_strips, funcs );
@@ -377,6 +595,7 @@
if ( foundIt != inVBOs.end() )
{
theCachedVBO = *foundIt;
+ CHECK_VBO( theCachedVBO );
// Note: We cannot delete stale VBOs here, because this function may
// be called by CountVBOs at a time when the OpenGL context that is
@@ -386,6 +605,29 @@
return theCachedVBO;
}
+
+#if VALIDATE_COUNTS
+void VBOCache::ValidateVBOCount() const
+{
+ // Check for corrupt objects
+ (void) E3Memory_CountRecords();
+
+ size_t listCount = 0;
+ CachedVBO* listPtr;
+ for (listPtr = mListOldEnd.mNext; listPtr != &mListNewEnd; listPtr = listPtr->mNext)
+ {
+ ++listCount;
+ }
+
+ size_t vecCount = mCachedVBOs_strips.size() + mCachedVBOs_triangles.size() +
+ mCachedVBOs_lines.size();
+
+ Q3_ASSERT_FMT( vecCount == listCount, "VBOCache list %d, vec %d",
+ (int)listCount, (int)vecCount );
+}
+#endif
+
+
CachedVBOVec* VBOCache::GetVBOVecForMode( GLenum inMode )
{
CachedVBOVec* whichVec = nullptr;
@@ -411,6 +653,7 @@
CachedVBO* VBOCache::FindVBO( TQ3GeometryObject inGeom, GLenum inMode,
const GLBufferFuncs& inFuncs )
{
+ VALIDATE_COUNT( this );
CachedVBO* theCachedVBO = nullptr;
CachedVBOVec* whichVec = GetVBOVecForMode( inMode );
@@ -418,6 +661,7 @@
if (whichVec != nullptr)
{
theCachedVBO = FindVBOInVec( inGeom, *whichVec );
+ CHECK_VBO_OR_NULL( theCachedVBO );
if ( (theCachedVBO != nullptr) && theCachedVBO->IsStale() )
{
@@ -429,6 +673,7 @@
theCachedVBO = nullptr;
}
}
+ VALIDATE_COUNT( this );
return theCachedVBO;
}
@@ -435,6 +680,7 @@
void VBOCache::AddToUsageList( CachedVBO* ioVBO )
{
+ CHECK_VBO( ioVBO );
// Insert the new record at the "new" end of a doubly-linked list.
ioVBO->mNext = &mListNewEnd;
ioVBO->mPrev = mListNewEnd.mPrev;
@@ -444,14 +690,17 @@
void VBOCache::RenewInUsageList( CachedVBO* ioVBO )
{
+ CHECK_VBO( ioVBO );
// Move the item to the "new" end of the list, so that it will not be
// purged soon.
DeleteFromUsageList( ioVBO );
AddToUsageList( ioVBO );
+ VALIDATE_COUNT( this );
}
void VBOCache::AddVBO( CachedVBO* inVBO )
{
+ CHECK_VBO( inVBO );
CachedVBOVec* whichVec = GetVBOVecForMode( inVBO->mGLMode );
if (whichVec != nullptr)
@@ -465,7 +714,7 @@
mTotalBytes += inVBO->mBufferBytes;
- //Q3_MESSAGE_FMT("VBO cache size: %lld", mTotalBytes );
+ //Q3_MESSAGE_FMT("VBO cache size after add: %lld", mTotalBytes );
}
}
@@ -472,7 +721,18 @@
void VBOCache::RenderVBO( const GLBufferFuncs& inFuncs, const CachedVBO* inCachedVBO )
{
+ CHECK_VBO( inCachedVBO );
+ Q3_ASSERT( (*inFuncs.glIsBufferProc)( inCachedVBO->mGLBufferNames[0] ) );
+ Q3_ASSERT( (*inFuncs.glIsBufferProc)( inCachedVBO->mGLBufferNames[1] ) );
+
(*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, inCachedVBO->mGLBufferNames[0] );
+
+#if Q3_DEBUG
+ GLint elementDataSize, mainDataSize, tcSumSize = 0;
+ (*inFuncs.glGetBufferParameterivProc)( GL_ARRAY_BUFFER, GL_BUFFER_SIZE,
+ &mainDataSize );
+#endif
+
glVertexPointer( 3, GL_FLOAT, 0,
BufferObPtr( inCachedVBO->mVertexBufferOffset ) );
@@ -494,17 +754,67 @@
BufferObPtr( inCachedVBO->mColorBufferOffset ) );
}
+ TQ3Uns32 i;
+ if (inCachedVBO->mNumSecondaryTexCoords > 0)
+ {
+ for (i = 0; i < inCachedVBO->mNumSecondaryTexCoords; ++i)
+ {
+ Q3_ASSERT( (*inFuncs.glIsBufferProc)( inCachedVBO->mSecondaryTexCoord[i].mGLBufferName ) );
+ (*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, inCachedVBO->mSecondaryTexCoord[i].mGLBufferName );
+
+ #if Q3_DEBUG
+ GLint tcDataSize;
+ (*inFuncs.glGetBufferParameterivProc)( GL_ARRAY_BUFFER, GL_BUFFER_SIZE,
+ &tcDataSize );
+ Q3_ASSERT( (TQ3Uns32)tcDataSize == inCachedVBO->mNumPoints * sizeof(float) *
+ inCachedVBO->mSecondaryTexCoord[i].mCoordsPerVertex );
+ tcSumSize += tcDataSize;
+ #endif
+
+ (*inFuncs.glClientActiveTextureProc)( inCachedVBO->mSecondaryTexCoord[i].mTextureUnit );
+ glEnableClientState( GL_TEXTURE_COORD_ARRAY );
+ glTexCoordPointer( inCachedVBO->mSecondaryTexCoord[i].mCoordsPerVertex, GL_FLOAT, 0,
+ BufferObPtr( 0 ) );
+ }
+ (*inFuncs.glClientActiveTextureProc)( GL_TEXTURE0_ARB );
+ }
+
(*inFuncs.glBindBufferProc)( GL_ELEMENT_ARRAY_BUFFER,
inCachedVBO->mGLBufferNames[1] );
+ CHECK_GL_ERROR;
+
+#if Q3_DEBUG
+ (*inFuncs.glGetBufferParameterivProc)( GL_ELEMENT_ARRAY_BUFFER, GL_BUFFER_SIZE,
+ &elementDataSize );
+ CHECK_GL_ERROR;
+ Q3_ASSERT( (TQ3Uns32)elementDataSize == inCachedVBO->mNumIndices * sizeof(TQ3Uns32) );
+ Q3_ASSERT( (GLint)inCachedVBO->mBufferBytes == elementDataSize + mainDataSize + tcSumSize );
+#endif
+
+ //Q3_MESSAGE_FMT("glDrawElements in RenderVBO (count %d, mode %d)", (int)inCachedVBO->mNumIndices,
+ // (int)inCachedVBO->mGLMode );
glDrawElements( inCachedVBO->mGLMode, inCachedVBO->mNumIndices,
GL_UNSIGNED_INT, BufferObPtr( 0 ) );
+ CHECK_GL_ERROR;
(*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, 0 );
(*inFuncs.glBindBufferProc)( GL_ELEMENT_ARRAY_BUFFER, 0 );
+
+ if (inCachedVBO->mNumSecondaryTexCoords > 0)
+ {
+ for (i = 0; i < inCachedVBO->mNumSecondaryTexCoords; ++i)
+ {
+ (*inFuncs.glClientActiveTextureProc)( inCachedVBO->mSecondaryTexCoord[i].mTextureUnit );
+ glDisableClientState( GL_TEXTURE_COORD_ARRAY );
+ (*inFuncs.glMultiTexCoord1fProc)( inCachedVBO->mSecondaryTexCoord[i].mTextureUnit, 0.0f );
+ }
+ (*inFuncs.glClientActiveTextureProc)( GL_TEXTURE0_ARB );
+ }
}
void VBOCache::DeleteFromUsageList( CachedVBO* ioVBO )
{
+ CHECK_VBO( ioVBO );
ioVBO->mPrev->mNext = ioVBO->mNext;
ioVBO->mNext->mPrev = ioVBO->mPrev;
}
@@ -512,12 +822,32 @@
void VBOCache::DeleteVBO( CachedVBO* inCachedVBO, const GLBufferFuncs& inFuncs )
{
+ CHECK_VBO( inCachedVBO );
+ Q3_ASSERT( (*inFuncs.glIsBufferProc)( inCachedVBO->mGLBufferNames[0] ) );
+ Q3_ASSERT( (*inFuncs.glIsBufferProc)( inCachedVBO->mGLBufferNames[1] ) );
(*inFuncs.glDeleteBuffersProc)( 2, inCachedVBO->mGLBufferNames );
+ sVBOCount -= 2;
+ ForgetVBO( inCachedVBO->mGLBufferNames[0] );
+ ForgetVBO( inCachedVBO->mGLBufferNames[1] );
+ //Q3_MESSAGE_FMT("Deleted VBOs %d, %d, now there are %d",
+ // inCachedVBO->mGLBufferNames[0], inCachedVBO->mGLBufferNames[1],
+ // sVBOCount );
+ for (TQ3Uns32 i = 0; i < inCachedVBO->mNumSecondaryTexCoords; ++i)
+ {
+ (*inFuncs.glDeleteBuffersProc)( 1, &inCachedVBO->mSecondaryTexCoord[i].mGLBufferName );
+ ForgetVBO( inCachedVBO->mSecondaryTexCoord[i].mGLBufferName );
+ }
+
DeleteFromUsageList( inCachedVBO );
mTotalBytes -= inCachedVBO->mBufferBytes;
+ //Q3_MESSAGE_FMT("VBO cache size after delete: %lld", mTotalBytes );
+ FREED_VBO( inCachedVBO );
+ // It would be more logical to call FREED_VBO after delete,
+ // but that causes the Clang static analyzer to issue a
+ // "Use of memory after it is freed" warning.
delete inCachedVBO;
}
@@ -554,9 +884,11 @@
void VBOCache::FlushUnreferenced( const GLBufferFuncs& inFuncs )
{
+ VALIDATE_COUNT( this );
FlushUnreferencedInVec( mCachedVBOs_strips, inFuncs );
FlushUnreferencedInVec( mCachedVBOs_triangles, inFuncs );
FlushUnreferencedInVec( mCachedVBOs_lines, inFuncs );
+ VALIDATE_COUNT( this );
}
void VBOCache::PurgeDownToSize( long long inTargetSize, const GLBufferFuncs& inFuncs )
@@ -565,6 +897,7 @@
{
// Find the least recently used VBO from the doubly-linked list
CachedVBO* oldestVBO = mListOldEnd.mNext;
+ CHECK_VBO( oldestVBO );
// Remove it from the sorted vector
CachedVBOVec* whichVec = GetVBOVecForMode( oldestVBO->mGLMode );
@@ -585,6 +918,7 @@
void VBOCache::SetMaxBufferSize( long long inBufferSize, const GLBufferFuncs& inFuncs )
{
+ VALIDATE_COUNT( this );
if (inBufferSize < mMaxBufferBytes)
{
PurgeDownToSize( inBufferSize, inFuncs );
@@ -591,6 +925,7 @@
}
mMaxBufferBytes = inBufferSize;
+ VALIDATE_COUNT( this );
}
void VBOCache::MakeRoom( TQ3Uns32 inBytesNeeded, const GLBufferFuncs& inFuncs )
@@ -598,13 +933,20 @@
if ( (inBytesNeeded < mMaxBufferBytes) &&
(mTotalBytes + inBytesNeeded > mMaxBufferBytes) )
{
+ VALIDATE_COUNT( this );
long long targetSize = mMaxBufferBytes - inBytesNeeded;
PurgeDownToSize( targetSize, inFuncs );
+ VALIDATE_COUNT( this );
}
}
+void VBOCache::AddBytes( TQ3Uns32 inBytes )
+{
+ mTotalBytes += inBytes;
+}
+
#pragma mark -
//=============================================================================
// Public functions
@@ -663,6 +1005,7 @@
if (theVBO != nullptr)
{
+ CHECK_VBO( theVBO );
theCache->RenderVBO( inFuncs, theVBO );
theCache->RenewInUsageList( theVBO );
didRender = kQ3True;
@@ -672,7 +1015,95 @@
return didRender;
}
+
+
/*!
+ @function AddSecondaryTextureCoordsToVBO
+ @abstract Add an array of secondary texture coordinates to an
+ already-cached VBO, as an optional follow-up to
+ AddVBOToCache.
+ @param inCache A VBO cache.
+ @param ioVBO A cached VBO object.
+ @param inTextureUnit A texture unit to which we should supply
+ the array, e.g., GL_TEXTURE1_ARB.
+ @param inNumPoints Number of points (vertices).
+ @param inNumCoordsPerPoint Number of floating-point values for each
+ vertex. Must be 1, 2, 3, or 4.
+ @param inData Array of data. The number of floating-point
+ values should be inNumPoints * inNumCoordsPerPoint.
+*/
+static void AddSecondaryTextureCoordsToVBO(
+ const GLBufferFuncs& inFuncs,
+ VBOCache* inCache,
+ CachedVBO* ioVBO,
+ GLenum inTextureUnit,
+ TQ3Uns32 inNumPoints,
+ TQ3Uns32 inNumCoordsPerPoint,
+ const float* inData )
+{
+ if ( (ioVBO != nullptr) && (ioVBO->mNumSecondaryTexCoords < kMaxSecondaryTexCoords) )
+ {
+ TQ3Uns32 coordIndex = ioVBO->mNumSecondaryTexCoords;
+ ioVBO->mNumSecondaryTexCoords += 1;
+ SecondaryTexCoord& theCoord( ioVBO->mSecondaryTexCoord[ coordIndex ] );
+ (*inFuncs.glGenBuffersProc)( 1, &theCoord.mGLBufferName );
+ theCoord.mCoordsPerVertex = (GLint) inNumCoordsPerPoint;
+ theCoord.mTextureUnit = inTextureUnit;
+
+ TQ3Uns32 dataSize = inNumPoints * inNumCoordsPerPoint * sizeof(float);
+ ioVBO->mBufferBytes += dataSize;
+ inCache->MakeRoom( dataSize, inFuncs );
+ inCache->AddBytes( dataSize );
+
+ (*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, theCoord.mGLBufferName );
+ (*inFuncs.glBufferDataProc)( GL_ARRAY_BUFFER, dataSize,
+ inData, GL_STATIC_DRAW );
+ (*inFuncs.glBindBufferProc)( GL_ARRAY_BUFFER, 0 );
+ RecordVBO( theCoord.mGLBufferName, ioVBO->mSortKey, dataSize, 1 );
+ }
+}
+
+
+
+/*!
+ @function HandleSecondaryTextureCoords
+ @abstract Check for secondary texture coordinates attached to the geometry.
+ @param inGeom A geometry object.
+ @param inCache A VBO cache.
+ @param ioVBO A cached VBO object.
+ @param inNumPoints Number of points (vertices).
+*/
+static void HandleSecondaryTextureCoords(
+ const GLBufferFuncs& inFuncs,
+ TQ3GeometryObject inGeom,
+ VBOCache* inCache,
+ CachedVBO* ioVBO,
+ TQ3Uns32 inNumPoints )
+{
+ TQ3Uns32 bufSize;
+ if ( (kQ3Success == Q3Object_GetProperty( inGeom,
+ kQ3GeometryPropertyCustomTextureCoordinates, 0, &bufSize, nullptr )) &&
+ ((bufSize % 4) == 0) &&
+ bufSize >= sizeof(TQ3CustomTextureCoordinates) + inNumPoints * sizeof(float) )
+ {
+ std::vector<TQ3Uns8> buffer( bufSize );
+ Q3Object_GetProperty( inGeom, kQ3GeometryPropertyCustomTextureCoordinates,
+ bufSize, nullptr, &buffer[0] );
+ TQ3CustomTextureCoordinates* tcRec(
+ reinterpret_cast<TQ3CustomTextureCoordinates*>( &buffer[0] ) );
+ Q3_ASSERT( tcRec->numPoints == inNumPoints );
+ if (tcRec->numPoints == inNumPoints)
+ {
+ GLenum textureUnit = GL_TEXTURE0_ARB + tcRec->textureUnit;
+ AddSecondaryTextureCoordsToVBO( inFuncs, inCache, ioVBO, textureUnit,
+ inNumPoints, tcRec->coordsPerPoint, tcRec->coords );
+ }
+ }
+}
+
+
+
+/*!
@function AddVBOToCache
@abstract Add VBO data to the cache. Do not call this unless
RenderCachedVBO has just returned false.
@@ -706,8 +1137,15 @@
if (theCache != nullptr)
{
CachedVBO* newVBO = new CachedVBO( inGeom, inMode );
+ ALLOCATED_VBO( newVBO );
newVBO->mNumIndices = inNumIndices;
+ #if Q3_DEBUG
+ newVBO->mNumPoints = inNumPoints;
+ #endif
(*inFuncs.glGenBuffersProc)( 2, newVBO->mGLBufferNames );
+ sVBOCount += 2;
+ //Q3_MESSAGE_FMT("Created VBOs %d, %d, now there are %d",
+ // newVBO->mGLBufferNames[0], newVBO->mGLBufferNames[1], sVBOCount );
TQ3Uns32 vertexDataSize = static_cast<TQ3Uns32>(inNumPoints * sizeof(TQ3Point3D));
TQ3Uns32 normalDataSize = (inNormals == nullptr)? 0 :
@@ -739,6 +1177,13 @@
newVBO->mGLBufferNames[0] );
(*inFuncs.glBufferDataProc)( GL_ARRAY_BUFFER, totalDataSize,
nullptr, GL_STATIC_DRAW );
+ GLenum error = glGetError();
+ if (error == GL_OUT_OF_MEMORY)
+ {
+ DumpVBOs();
+ Q3_ASSERT_FMT( false, "Failed to allocate VBO memory!");
+ }
+ RecordVBO( newVBO->mGLBufferNames[0], inGeom, totalDataSize, 0 );
// Then set sub-buffer data
dataAddr = inPoints;
@@ -771,6 +1216,9 @@
(*inFuncs.glBufferDataProc)( GL_ELEMENT_ARRAY_BUFFER,
inNumIndices * sizeof(TQ3Uns32), dataAddr, GL_STATIC_DRAW );
(*inFuncs.glBindBufferProc)( GL_ELEMENT_ARRAY_BUFFER, 0 );
+ RecordVBO( newVBO->mGLBufferNames[1], inGeom, inNumIndices * sizeof(TQ3Uns32), 0 );
+
+ HandleSecondaryTextureCoords( inFuncs, inGeom, theCache, newVBO, inNumPoints );
}
}
Modified: trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h 2018-06-10 19:04:19 UTC (rev 3353)
+++ trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h 2018-06-17 22:12:43 UTC (rev 3354)
@@ -10,7 +10,7 @@
GLUtils_CheckExtensions.
COPYRIGHT:
- Copyright (c) 2007-2016, Quesa Developers. All rights reserved.
+ Copyright (c) 2007-2018, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -204,7 +204,44 @@
TQ3GLContext glContext,
const GLBufferFuncs& inFuncs );
+#if 0//Q3_DEBUG
+/*!
+ @function RecordVBO
+ @abstract For debugging, record a VBO allocation.
+ @param inBufferName The ID number of the buffer.
+ @param inGeom The geometry owning the VBO.
+ @param inBytes Size of the buffer in bytes.
+ @param inKind Normal = 0, normal secondary = 1,
+ shadow = 2, shadow secondary = 3
+*/
+void RecordVBO(
+ GLuint inBufferName,
+ TQ3GeometryObject inGeom,
+ TQ3Uns32 inBytes,
+ int inKind );
+
+/*!
+ @function ForgetVBO
+ @abstract Remove a VBO previously passed to RecordVBO.
+ @param inBufferName The ID number of the buffer.
+*/
+void ForgetVBO( GLuint inBufferName );
+
+/*!
+ @function DumpVBOs
+ @abstract List the contents of the VBO recording to the debug
+ log.
+*/
+void DumpVBOs( void );
+
+#else
+
+ #define RecordVBO(...)
+ #define ForgetVBO(...)
+ #define DumpVBOs(...)
+
+#endif
//=============================================================================
// C++ postamble
//-----------------------------------------------------------------------------
Modified: trunk/quesa/SDK/Includes/Quesa/QuesaGeometry.h
===================================================================
--- trunk/quesa/SDK/Includes/Quesa/QuesaGeometry.h 2018-06-10 19:04:19 UTC (rev 3353)
+++ trunk/quesa/SDK/Includes/Quesa/QuesaGeometry.h 2018-06-17 22:12:43 UTC (rev 3354)
@@ -8,7 +8,7 @@
Quesa public header.
COPYRIGHT:
- Copyright (c) 1999-2010, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -150,10 +150,17 @@
that this geometry should be rendered normally.
Data type: TQ3Boolean. Default value: kQ3False.
+ @constant kQ3GeometryPropertyCustomTextureCoordinates
+ This property, attached to a TriMesh, can be used to provide
+ nonstandard texture coordinates to an OpenGL Shading Language
+ vertex shader.
+
+ Data type: TQ3CustomTextureCoordinates (variable length).
*/
enum
{
- kQ3GeometryPropertyNonCartoon = Q3_OBJECT_TYPE('n', 'c', 'a', 'r')
+ kQ3GeometryPropertyNonCartoon = Q3_OBJECT_TYPE('n', 'c', 'a', 'r'),
+ kQ3GeometryPropertyCustomTextureCoordinates = Q3_OBJECT_TYPE('t', 'e', 'x', 'c')
};
@@ -1193,6 +1200,36 @@
+#ifdef _MSC_VER
+ #pragma warning( push )
+ #pragma warning( disable : 4200 )
+#endif
+/*!
+ @struct TQ3CustomTextureCoordinates
+ @abstract Data of kQ3GeometryPropertyCustomTextureCoordinates.
+ @field numPoints Number of points (vertices) in the TriMesh.
+ @field coordsPerPoint Number of floating-point coordinates per point.
+ Must be 1, 2, 3, or 4.
+ @field textureUnit Texture unit to which the coordinates will be
+ provided. Enter simply 1, for example, not
+ GL_TEXTURE1.
+ @field coords Array of coordinate data. The number of values
+ here must be numPoints * coordsPerPoint.
+*/
+typedef struct TQ3CustomTextureCoordinates
+{
+ TQ3Uns32 numPoints;
+ TQ3Uns32 coordsPerPoint;
+ TQ3Uns32 textureUnit;
+ TQ3Float32 coords[];
+} TQ3CustomTextureCoordinates;
+#ifdef _MSC_VER
+ #pragma warning( pop )
+#endif
+
+
+
+
//=============================================================================
// Macros
//-----------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2018-06-10 19:04:21
|
Revision: 3353
http://sourceforge.net/p/quesa/code/3353
Author: jwwalker
Date: 2018-06-10 19:04:19 +0000 (Sun, 10 Jun 2018)
Log Message:
-----------
Add some warnings to Xcode configs.
Modified Paths:
--------------
trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig
trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig
Modified: trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
===================================================================
--- trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-06-10 17:31:46 UTC (rev 3352)
+++ trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-06-10 19:04:19 UTC (rev 3353)
@@ -1302,7 +1302,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0920;
+ LastUpgradeCheck = 0940;
};
buildConfigurationList = BEDC044F08A57B3000FB3A82 /* Build configuration list for PBXProject "Quesa" */;
compatibilityVersion = "Xcode 3.2";
@@ -1735,38 +1735,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BE5D0F5F15B79B3C00E3DBE4 /* Modern-Debug.xcconfig */;
buildSettings = {
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
- WARNING_CFLAGS = (
- "-Wzero-as-null-pointer-constant",
- "-Wendif-labels",
- "-Wlarger-than-30000",
- "-Wpointer-arith",
- "-Wcast-align",
- "-Wwrite-strings",
- "-Wpacked",
- "-Winvalid-pch",
- "-Wdisabled-optimization",
- "$(QUESA_WARNINGS_ONLY_CXX)",
- "$(QUESA_WARNINGS_ONLY_OBJC)",
- );
};
name = Debug;
};
@@ -1774,38 +1744,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BE5D0F6015B79B6500E3DBE4 /* Modern-Release.xcconfig */;
buildSettings = {
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
- WARNING_CFLAGS = (
- "-Wzero-as-null-pointer-constant",
- "-Wendif-labels",
- "-Wlarger-than-30000",
- "-Wpointer-arith",
- "-Wcast-align",
- "-Wwrite-strings",
- "-Wpacked",
- "-Winvalid-pch",
- "-Wdisabled-optimization",
- "$(QUESA_WARNINGS_ONLY_CXX)",
- "$(QUESA_WARNINGS_ONLY_OBJC)",
- );
};
name = Release;
};
Modified: trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig
===================================================================
--- trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig 2018-06-10 17:31:46 UTC (rev 3352)
+++ trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig 2018-06-10 19:04:19 UTC (rev 3353)
@@ -35,6 +35,7 @@
GCC_ENABLE_PASCAL_STRINGS = NO
CLANG_CXX_LANGUAGE_STANDARD = gnu++11
CLANG_CXX_LIBRARY = libc++
+CLANG_ENABLE_OBJC_WEAK = YES
@@ -50,7 +51,9 @@
// to 0 in 64-bit mode and 1 in 32-bit mode.
QUESA_PREPROCESSOR_DEFS_LEGACY = QUESA_SUPPORT_QUICKTIME=0
+ENABLE_STRICT_OBJC_MSGSEND = YES
+
// Custom build settings:
// ----------------------
PROJECT_NICKNAME = Modern
Modified: trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig
===================================================================
--- trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig 2018-06-10 17:31:46 UTC (rev 3352)
+++ trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig 2018-06-10 19:04:19 UTC (rev 3353)
@@ -41,17 +41,35 @@
GCC_WARN_SIGN_COMPARE = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
+CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
+CLANG_WARN_EMPTY_BODY = YES
+CLANG_WARN_BOOL_CONVERSION = YES
+CLANG_WARN_CONSTANT_CONVERSION = YES
+CLANG_WARN_ENUM_CONVERSION = YES
+CLANG_WARN_INT_CONVERSION = YES
+CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
+CLANG_WARN_INFINITE_RECURSION = YES
+CLANG_WARN_STRICT_PROTOTYPES = YES
+CLANG_WARN_COMMA = YES
+CLANG_WARN_UNREACHABLE_CODE = YES
// C++-only warnings.
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
+CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
+CLANG_WARN_SUSPICIOUS_MOVE = YESå
QUESA_WARNINGS_ONLY_CXX = -Wabi -Wsign-promo
// Objective C-only.
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
+CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
+GCC_WARN_UNDECLARED_SELECTOR = YES
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
QUESA_WARNINGS_ONLY_OBJC = -Wstrict-selector-match -Wundeclared-selector
// Other warnings for which Xcode has no explicit setting.
-WARNING_CFLAGS = -Wendif-labels -Wlarger-than-30000 -Wpointer-arith -Wcast-align -Wwrite-strings -Wpacked -Winvalid-pch -Wdisabled-optimization $(QUESA_WARNINGS_ONLY_CXX) $(QUESA_WARNINGS_ONLY_OBJC)
+WARNING_CFLAGS = -Wzero-as-null-pointer-constant -Wendif-labels -Wlarger-than-30000 -Wpointer-arith -Wcast-align -Wwrite-strings -Wpacked -Winvalid-pch -Wdisabled-optimization $(QUESA_WARNINGS_ONLY_CXX) $(QUESA_WARNINGS_ONLY_OBJC)
// These generate many warnings (and so are off), but the warnings are mostly harmless.
GCC_WARN_UNUSED_VARIABLE = NO
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2018-06-10 17:31:51
|
Revision: 3352
http://sourceforge.net/p/quesa/code/3352
Author: jwwalker
Date: 2018-06-10 17:31:46 +0000 (Sun, 10 Jun 2018)
Log Message:
-----------
Compile a C++11, and replace NULL by nullptr.
Modified Paths:
--------------
trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig
trunk/quesa/Development/Source/Core/Geometry/E3Geometry.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryDisk.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipse.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipsoid.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryGeneralPolygon.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryLine.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryMarker.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryMesh.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBCurve.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBPatch.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPixmapMarker.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPoint.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyLine.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolygon.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyhedron.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTorus.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriGrid.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMeshOptimize.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMeshOptimize.h
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DCamera.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DController.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DCustomElements.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DDrawContext.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DErrors.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DExtension.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DGeometry.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DGroup.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DIO.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DLight.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DMain.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DMath.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DMemory.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DPick.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DSet.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DShader.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DStorage.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DString.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DStyle.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DTransform.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DView.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DViewer.cpp
trunk/quesa/Development/Source/Core/Support/E3ArrayOrList.cpp
trunk/quesa/Development/Source/Core/Support/E3ArrayOrList.h
trunk/quesa/Development/Source/Core/Support/E3ClassTree.cpp
trunk/quesa/Development/Source/Core/Support/E3Compatibility.cpp
trunk/quesa/Development/Source/Core/Support/E3Debug.h
trunk/quesa/Development/Source/Core/Support/E3ErrorManager.cpp
trunk/quesa/Development/Source/Core/Support/E3FastArray.h
trunk/quesa/Development/Source/Core/Support/E3Globals.cpp
trunk/quesa/Development/Source/Core/Support/E3HashTable.cpp
trunk/quesa/Development/Source/Core/Support/E3Pool.cpp
trunk/quesa/Development/Source/Core/Support/E3Pool.h
trunk/quesa/Development/Source/Core/Support/E3StackCrawl.h
trunk/quesa/Development/Source/Core/Support/E3System.cpp
trunk/quesa/Development/Source/Core/Support/E3Tessellate.cpp
trunk/quesa/Development/Source/Core/Support/E3Utils.cpp
trunk/quesa/Development/Source/Core/System/E3Camera.cpp
trunk/quesa/Development/Source/Core/System/E3Controller.cpp
trunk/quesa/Development/Source/Core/System/E3CustomElements.cpp
trunk/quesa/Development/Source/Core/System/E3CustomElements.h
trunk/quesa/Development/Source/Core/System/E3DrawContext.cpp
trunk/quesa/Development/Source/Core/System/E3Errors.cpp
trunk/quesa/Development/Source/Core/System/E3Extension.cpp
trunk/quesa/Development/Source/Core/System/E3Group.cpp
trunk/quesa/Development/Source/Core/System/E3IO.cpp
trunk/quesa/Development/Source/Core/System/E3IOData.cpp
trunk/quesa/Development/Source/Core/System/E3Light.cpp
trunk/quesa/Development/Source/Core/System/E3Main.cpp
trunk/quesa/Development/Source/Core/System/E3Main.h
trunk/quesa/Development/Source/Core/System/E3Math.cpp
trunk/quesa/Development/Source/Core/System/E3Math_Intersect.cpp
trunk/quesa/Development/Source/Core/System/E3Memory.cpp
trunk/quesa/Development/Source/Core/System/E3Pick.cpp
trunk/quesa/Development/Source/Core/System/E3Pick.h
trunk/quesa/Development/Source/Core/System/E3Renderer.cpp
trunk/quesa/Development/Source/Core/System/E3Set.cpp
trunk/quesa/Development/Source/Core/System/E3Shader.cpp
trunk/quesa/Development/Source/Core/System/E3Storage.cpp
trunk/quesa/Development/Source/Core/System/E3String.cpp
trunk/quesa/Development/Source/Core/System/E3Style.cpp
trunk/quesa/Development/Source/Core/System/E3Texture.cpp
trunk/quesa/Development/Source/Core/System/E3Transform.cpp
trunk/quesa/Development/Source/Core/System/E3View.cpp
trunk/quesa/Development/Source/Core/Viewer/E3Viewer.cpp
trunk/quesa/Development/Source/Core/Viewer/E3ViewerOldAPIs.cpp
trunk/quesa/Development/Source/FileFormats/E3IOFileFormat.cpp
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF.cpp
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Bin.cpp
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Geometry.cpp
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Text.cpp
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Geometry.cpp
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Register.cpp
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Writer.cpp
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaDrawContext.mm
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaStackCrawl.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacDrawContext.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacStorage.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacSystem.cpp
trunk/quesa/Development/Source/Platform/Mac/Resources/Info.plist
trunk/quesa/Development/Source/Renderers/Cartoon/CartoonRenderer.cpp
trunk/quesa/Development/Source/Renderers/Common/GLCocoaContext.mm
trunk/quesa/Development/Source/Renderers/Common/GLDisplayListManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLDrawContext.cpp
trunk/quesa/Development/Source/Renderers/Common/GLGPUSharing.cpp
trunk/quesa/Development/Source/Renderers/Common/GLGPUSharing.h
trunk/quesa/Development/Source/Renderers/Common/GLPrefix.h
trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLTextureLoader.cpp
trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.h
trunk/quesa/Development/Source/Renderers/Common/GLUtils.cpp
trunk/quesa/Development/Source/Renderers/Common/GLUtils.h
trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h
trunk/quesa/Development/Source/Renderers/Common/OptimizedTriMeshElement.cpp
trunk/quesa/Development/Source/Renderers/Common/OptimizedTriMeshElement.h
trunk/quesa/Development/Source/Renderers/Generic/GNRegister.cpp
trunk/quesa/Development/Source/Renderers/HiddenLine/HiddenLine.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRGeometry.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRGeometryTriMesh.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRLights.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRRegister.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRRenderer.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRTexture.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRTransparent.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRTriBuffer.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRUpdate.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOCalcTriMeshEdges.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOCalcTriMeshEdges.h
trunk/quesa/Development/Source/Renderers/OpenGL/QOGLShadingLanguage.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOGLShadingLanguage.h
trunk/quesa/Development/Source/Renderers/OpenGL/QOGeometry.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOLights.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QORegister.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QORenderer.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOShaderProgramCache.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOShaderProgramCache.h
trunk/quesa/Development/Source/Renderers/OpenGL/QOShadowMarker.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOStartAndEnd.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOStatics.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOTexture.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOUpdate.cpp
trunk/quesa/Development/Source/Renderers/Wireframe/WFRenderer.cpp
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef/CQ3ObjectRef.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef/Classes/CQ3ObjectRef/CQ3ObjectRef.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef/Classes/CQ3ObjectRef/CompositePage.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef/Classes/CQ3ObjectRef/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef/Classes/CQ3ObjectRef/Vars/Vars.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef/Classes/CQ3ObjectRef/toc.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef/CompositePage.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef_Gets/CQ3ObjectRef_Gets.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef_Gets/CompositePage.html
trunk/quesa/Documentation/developer/apiref/CQ3ObjectRef_Gets/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/MasterTOC.html
trunk/quesa/Documentation/developer/apiref/Q3GroupIterator/Classes/Q3GroupIterator/CompositePage.html
trunk/quesa/Documentation/developer/apiref/Q3GroupIterator/Classes/Q3GroupIterator/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/Q3GroupIterator/Classes/Q3GroupIterator/Q3GroupIterator.html
trunk/quesa/Documentation/developer/apiref/Q3GroupIterator/Classes/Q3GroupIterator/toc.html
trunk/quesa/Documentation/developer/apiref/Q3GroupIterator/CompositePage.html
trunk/quesa/Documentation/developer/apiref/Q3GroupIterator/Q3GroupIterator.html
trunk/quesa/Documentation/developer/apiref/Quesa/CompositePage.html
trunk/quesa/Documentation/developer/apiref/Quesa/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/Quesa/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/Quesa/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/Quesa/Quesa.html
trunk/quesa/Documentation/developer/apiref/Quesa/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/Quesa/toc.html
trunk/quesa/Documentation/developer/apiref/QuesaCamera/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaCamera/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaCamera/QuesaCamera.html
trunk/quesa/Documentation/developer/apiref/QuesaCamera/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaController/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaController/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaController/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaController/QuesaController.html
trunk/quesa/Documentation/developer/apiref/QuesaController/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaCustomElements/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaCustomElements/Constants/Constants.html
trunk/quesa/Documentation/developer/apiref/QuesaCustomElements/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaCustomElements/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaCustomElements/QuesaCustomElements.html
trunk/quesa/Documentation/developer/apiref/QuesaCustomElements/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaCustomElements/toc.html
trunk/quesa/Documentation/developer/apiref/QuesaDrawContext/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaDrawContext/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaDrawContext/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaDrawContext/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaDrawContext/QuesaDrawContext.html
trunk/quesa/Documentation/developer/apiref/QuesaDrawContext/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaErrors/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaErrors/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaErrors/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaErrors/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaErrors/QuesaErrors.html
trunk/quesa/Documentation/developer/apiref/QuesaExtension/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaExtension/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaExtension/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaExtension/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaExtension/QuesaExtension.html
trunk/quesa/Documentation/developer/apiref/QuesaGeometry/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaGeometry/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaGeometry/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaGeometry/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaGeometry/QuesaGeometry.html
trunk/quesa/Documentation/developer/apiref/QuesaGeometry/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaGeometry/toc.html
trunk/quesa/Documentation/developer/apiref/QuesaGroup/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaGroup/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaGroup/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaGroup/QuesaGroup.html
trunk/quesa/Documentation/developer/apiref/QuesaIO/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaIO/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaIO/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaIO/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaIO/QuesaIO.html
trunk/quesa/Documentation/developer/apiref/QuesaIO/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaLight/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaLight/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaLight/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaLight/QuesaLight.html
trunk/quesa/Documentation/developer/apiref/QuesaLight/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaMath/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaMath/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaMath/QuesaMath.html
trunk/quesa/Documentation/developer/apiref/QuesaMemory/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaMemory/Constants/Constants.html
trunk/quesa/Documentation/developer/apiref/QuesaMemory/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaMemory/QuesaMemory.html
trunk/quesa/Documentation/developer/apiref/QuesaMemory/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaMemory/toc.html
trunk/quesa/Documentation/developer/apiref/QuesaPick/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaPick/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaPick/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaPick/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaPick/PDefines/PDefines.html
trunk/quesa/Documentation/developer/apiref/QuesaPick/QuesaPick.html
trunk/quesa/Documentation/developer/apiref/QuesaPick/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaPick/toc.html
trunk/quesa/Documentation/developer/apiref/QuesaRenderer/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaRenderer/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaRenderer/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaRenderer/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaRenderer/QuesaRenderer.html
trunk/quesa/Documentation/developer/apiref/QuesaRenderer/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaSet/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaSet/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaSet/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaSet/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaSet/QuesaSet.html
trunk/quesa/Documentation/developer/apiref/QuesaShader/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaShader/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaShader/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaShader/QuesaShader.html
trunk/quesa/Documentation/developer/apiref/QuesaShader/toc.html
trunk/quesa/Documentation/developer/apiref/QuesaStorage/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaStorage/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaStorage/QuesaStorage.html
trunk/quesa/Documentation/developer/apiref/QuesaStorage/toc.html
trunk/quesa/Documentation/developer/apiref/QuesaString/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaString/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaString/QuesaString.html
trunk/quesa/Documentation/developer/apiref/QuesaStyle/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaStyle/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaStyle/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaStyle/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaStyle/QuesaStyle.html
trunk/quesa/Documentation/developer/apiref/QuesaStyle/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaTransform/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaTransform/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaTransform/QuesaTransform.html
trunk/quesa/Documentation/developer/apiref/QuesaTransform/Structs/Structs.html
trunk/quesa/Documentation/developer/apiref/QuesaView/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaView/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaView/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaView/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaView/QuesaView.html
trunk/quesa/Documentation/developer/apiref/QuesaViewer/CompositePage.html
trunk/quesa/Documentation/developer/apiref/QuesaViewer/DataTypes/DataTypes.html
trunk/quesa/Documentation/developer/apiref/QuesaViewer/Enums/Enums.html
trunk/quesa/Documentation/developer/apiref/QuesaViewer/Functions/Functions.html
trunk/quesa/Documentation/developer/apiref/QuesaViewer/QuesaViewer.html
trunk/quesa/Documentation/developer/apiref/QuesaViewer/Structs/Structs.html
trunk/quesa/SDK/Includes/Quesa/CQ3ObjectRef.h
trunk/quesa/SDK/Includes/Quesa/CQ3ObjectRef_Gets.h
trunk/quesa/SDK/Includes/Quesa/CQ3WeakObjectRef.h
trunk/quesa/SDK/Includes/Quesa/Q3GroupIterator.h
trunk/quesa/SDK/Includes/Quesa/Quesa.h
trunk/quesa/SDK/Includes/Quesa/QuesaController.h
trunk/quesa/SDK/Includes/Quesa/QuesaCustomElements.h
trunk/quesa/SDK/Includes/Quesa/QuesaDrawContext.h
trunk/quesa/SDK/Includes/Quesa/QuesaErrors.h
trunk/quesa/SDK/Includes/Quesa/QuesaExtension.h
trunk/quesa/SDK/Includes/Quesa/QuesaGeometry.h
trunk/quesa/SDK/Includes/Quesa/QuesaGroup.h
trunk/quesa/SDK/Includes/Quesa/QuesaIO.h
trunk/quesa/SDK/Includes/Quesa/QuesaMath.h
trunk/quesa/SDK/Includes/Quesa/QuesaMemory.h
trunk/quesa/SDK/Includes/Quesa/QuesaRenderer.h
trunk/quesa/SDK/Includes/Quesa/QuesaSet.h
trunk/quesa/SDK/Includes/Quesa/QuesaShader.h
trunk/quesa/SDK/Includes/Quesa/QuesaStorage.h
trunk/quesa/SDK/Includes/Quesa/QuesaString.h
trunk/quesa/SDK/Includes/Quesa/QuesaTransform.h
trunk/quesa/SDK/Includes/Quesa/QuesaView.h
trunk/quesa/SDK/Includes/Quesa/QuesaViewer.h
Modified: trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
===================================================================
--- trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-06-04 14:23:00 UTC (rev 3351)
+++ trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-06-10 17:31:46 UTC (rev 3352)
@@ -1302,7 +1302,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0440;
+ LastUpgradeCheck = 0920;
};
buildConfigurationList = BEDC044F08A57B3000FB3A82 /* Build configuration list for PBXProject "Quesa" */;
compatibilityVersion = "Xcode 3.2";
@@ -1703,6 +1703,7 @@
);
GCC_WARN_PROTOTYPE_CONVERSION = YES;
ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_BUNDLE_IDENTIFIER = org.Quesa.Quesa;
};
name = Debug;
};
@@ -1712,6 +1713,7 @@
buildSettings = {
GCC_WARN_UNINITIALIZED_AUTOS = YES;
ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_BUNDLE_IDENTIFIER = org.Quesa.Quesa;
};
name = Release;
};
@@ -1733,7 +1735,38 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BE5D0F5F15B79B3C00E3DBE4 /* Modern-Debug.xcconfig */;
buildSettings = {
- SDKROOT = macosx;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ WARNING_CFLAGS = (
+ "-Wzero-as-null-pointer-constant",
+ "-Wendif-labels",
+ "-Wlarger-than-30000",
+ "-Wpointer-arith",
+ "-Wcast-align",
+ "-Wwrite-strings",
+ "-Wpacked",
+ "-Winvalid-pch",
+ "-Wdisabled-optimization",
+ "$(QUESA_WARNINGS_ONLY_CXX)",
+ "$(QUESA_WARNINGS_ONLY_OBJC)",
+ );
};
name = Debug;
};
@@ -1741,6 +1774,38 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BE5D0F6015B79B6500E3DBE4 /* Modern-Release.xcconfig */;
buildSettings = {
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ WARNING_CFLAGS = (
+ "-Wzero-as-null-pointer-constant",
+ "-Wendif-labels",
+ "-Wlarger-than-30000",
+ "-Wpointer-arith",
+ "-Wcast-align",
+ "-Wwrite-strings",
+ "-Wpacked",
+ "-Winvalid-pch",
+ "-Wdisabled-optimization",
+ "$(QUESA_WARNINGS_ONLY_CXX)",
+ "$(QUESA_WARNINGS_ONLY_OBJC)",
+ );
};
name = Release;
};
Modified: trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig
===================================================================
--- trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig 2018-06-04 14:23:00 UTC (rev 3351)
+++ trunk/quesa/Development/Projects/Mac/xcode-configs/Modern.xcconfig 2018-06-10 17:31:46 UTC (rev 3352)
@@ -14,7 +14,7 @@
// Minimum OS version supported:
// -----------------------------
-MACOSX_DEPLOYMENT_TARGET = 10.5
+MACOSX_DEPLOYMENT_TARGET = 10.7
// Mac OS SDK version:
@@ -29,6 +29,15 @@
GCC_VERSION =
+// Compiler Language:
+// -----------------
+GCC_C_LANGUAGE_STANDARD = gnu11
+GCC_ENABLE_PASCAL_STRINGS = NO
+CLANG_CXX_LANGUAGE_STANDARD = gnu++11
+CLANG_CXX_LIBRARY = libc++
+
+
+
// Preprocessor settings relating to legacy code:
// ----------------------------------------------
// QUESA_SUPPORT_HITOOLBOX=1 must be used if you will create Carbon draw contexts,
Modified: trunk/quesa/Development/Source/Core/Geometry/E3Geometry.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3Geometry.cpp 2018-06-04 14:23:00 UTC (rev 3351)
+++ trunk/quesa/Development/Source/Core/Geometry/E3Geometry.cpp 2018-06-10 17:31:46 UTC (rev 3352)
@@ -109,8 +109,8 @@
getAttribute ( (TQ3XGeomGetAttributeMethod) Find_Method ( kQ3XMethodTypeGeomGetAttribute ) ) ,
getPublicData ( (TQ3XGeomGetPublicDataMethod) Find_Method ( kQ3XMethodTypeGeomGetPublicData ) )
{
- if ( cacheIsValid == NULL
- || cacheUpdate == NULL )
+ if ( cacheIsValid == nullptr
+ || cacheUpdate == nullptr )
SetAbstract () ;
}
@@ -139,16 +139,16 @@
{
// Get the geometry attribute method
TQ3XGeomGetAttributeMethod getAttribute = theGeom->GetClass ()->getAttribute ;
- if ( getAttribute == NULL )
- return NULL ;
+ if ( getAttribute == nullptr )
+ return nullptr ;
// Get the pointer to the geometry attribute set.
//
- // Note that this should never be NULL, since we're getting a pointer
+ // Note that this should never be nullptr, since we're getting a pointer
// to the attribute set here (which should always exist) rather than
- // the attribute set itself (which may well be NULL).
+ // the attribute set itself (which may well be nullptr).
TQ3AttributeSet* attributeSet = getAttribute ( theGeom ) ;
Q3_ASSERT_VALID_PTR( attributeSet ) ;
@@ -210,7 +210,7 @@
toInstanceData->instanceData.styleSubdivision = fromInstanceData->instanceData.styleSubdivision;
toInstanceData->instanceData.styleOrientation = fromInstanceData->instanceData.styleOrientation;
toInstanceData->instanceData.cachedEditIndex = 0;
- toInstanceData->instanceData.cachedObject = NULL;
+ toInstanceData->instanceData.cachedObject = nullptr;
toInstanceData->instanceData.cachedDeterminant = 0.0f;
return kQ3Success ;
@@ -244,15 +244,15 @@
// Get the class for the geometry
- E3GeometryInfo* theClass = (E3GeometryInfo*) ( theObject != NULL ? theObject->GetClass () : E3ClassTree::GetClass ( objectType ) ) ;
+ E3GeometryInfo* theClass = (E3GeometryInfo*) ( theObject != nullptr ? theObject->GetClass () : E3ClassTree::GetClass ( objectType ) ) ;
- if ( theClass == NULL || ! Q3_CLASS_INFO_IS_CLASS ( theClass , E3Geometry ) )
+ if ( theClass == nullptr || ! Q3_CLASS_INFO_IS_CLASS ( theClass , E3Geometry ) )
return kQ3Failure ;
// If this is a retained mode submit, submit the cached version.
- if ( theObject != NULL )
+ if ( theObject != nullptr )
{
// Find our instance data
E3Geometry* instanceData = (E3Geometry*) theObject ;
@@ -269,7 +269,7 @@
// Submit the cached object (or we fail)
- if (instanceData->instanceData.cachedObject != NULL)
+ if (instanceData->instanceData.cachedObject != nullptr)
qd3dStatus = E3View_SubmitRetained(theView, instanceData->instanceData.cachedObject);
}
@@ -288,13 +288,13 @@
else
{
// Check we have a method
- if ( theClass->cacheNew == NULL )
+ if ( theClass->cacheNew == nullptr )
return kQ3Failure ;
// Create a temporary object, submit it, and clean up
TQ3Object tmpObject = theClass->cacheNew ( theView, theObject, objectData ) ;
- if ( tmpObject == NULL )
+ if ( tmpObject == nullptr )
return kQ3Failure ;
qd3dStatus = Q3Object_Submit(tmpObject, theView);
@@ -324,7 +324,7 @@
// use the supplied data directly.
const void* publicData = objectData ;
- if ( theObject != NULL )
+ if ( theObject != nullptr )
if ( TQ3XGeomGetPublicDataMethod getPublicData = ( (E3GeometryInfo*) ( theObject->GetClass () ) )->getPublicData )
publicData = getPublicData ( theObject ) ;
@@ -438,7 +438,7 @@
// use the supplied data directly.
const void* publicData = objectData ;
- if ( theObject != NULL )
+ if ( theObject != nullptr )
if ( TQ3XGeomGetPublicDataMethod getPublicData = ( (E3GeometryInfo*) ( theObject->GetClass () ) )->getPublicData )
publicData = getPublicData ( theObject ) ;
@@ -509,7 +509,7 @@
// Does the geometry use subdivision?
- TQ3Boolean usesSubdivision = ( theClass->GetMethod ( kQ3XMethodTypeGeomUsesSubdivision ) != NULL)?
+ TQ3Boolean usesSubdivision = ( theClass->GetMethod ( kQ3XMethodTypeGeomUsesSubdivision ) != nullptr)?
kQ3True : kQ3False;
@@ -516,7 +516,7 @@
// First check the geometry edit index
TQ3Uns32 editIndex = Q3Shared_GetEditIndex ( theGeom ) ;
- if (instanceData->instanceData.cachedObject == NULL || editIndex > instanceData->instanceData.cachedEditIndex)
+ if (instanceData->instanceData.cachedObject == nullptr || editIndex > instanceData->instanceData.cachedEditIndex)
{
instanceData->instanceData.cachedEditIndex = editIndex;
@@ -572,7 +572,7 @@
// Check for changes to the orientation style
- if ( theClass->GetMethod ( kQ3XMethodTypeGeomUsesOrientation ) != NULL )
+ if ( theClass->GetMethod ( kQ3XMethodTypeGeomUsesOrientation ) != nullptr )
{
TQ3OrientationStyle theOrientation = E3View_State_GetStyleOrientation ( theView ) ;
if (instanceData->instanceData.styleOrientation != theOrientation)
@@ -600,7 +600,7 @@
// cached representation rather than rebuilding it.
//
// The current cached representation is passed in cachedGeom, and
-// we must either return NULL (on failure) or a new cached object.
+// we must either return nullptr (on failure) or a new cached object.
//-----------------------------------------------------------------------------
static void
e3geometry_cache_update(TQ3ViewObject theView,
@@ -617,17 +617,17 @@
// Find the class, and the appropriate method
E3GeometryInfo* theClass = (E3GeometryInfo*) E3ClassTree::GetClass ( objectType ) ;
- if ( theClass == NULL )
+ if ( theClass == nullptr )
return ;
// Get rid of the existing cached object, if any
- if ( *cachedGeom != NULL )
+ if ( *cachedGeom != nullptr )
Q3Object_CleanDispose ( cachedGeom ) ;
// If we can create a cached geometry, create it
- if ( theClass->cacheNew != NULL )
+ if ( theClass->cacheNew != nullptr )
{
try
{
@@ -635,12 +635,12 @@
}
catch (std::bad_alloc&)
{
- *cachedGeom = NULL;
+ *cachedGeom = nullptr;
E3ErrorManager_PostError( kQ3ErrorOutOfMemory, kQ3False );
}
catch (...)
{
- *cachedGeom = NULL;
+ *cachedGeom = nullptr;
}
}
}
@@ -654,7 +654,7 @@
//-----------------------------------------------------------------------------
static TQ3XFunctionPointer
e3geometry_metahandler(TQ3XMethodType methodType)
-{ TQ3XFunctionPointer theMethod = NULL;
+{ TQ3XFunctionPointer theMethod = nullptr;
@@ -860,18 +860,18 @@
// Set up a return value
- *attributeSet = NULL;
+ *attributeSet = nullptr;
// Make sure we found the pointer
- if (geomAttributes == NULL)
+ if (geomAttributes == nullptr)
return(kQ3Failure);
// Return another reference to the attribute set
- if (*geomAttributes != NULL)
+ if (*geomAttributes != nullptr)
*attributeSet = ((E3Shared*)*geomAttributes)->GetReference();
return(kQ3Success);
@@ -891,7 +891,7 @@
// Make sure we found the pointer
- if (geomAttributes == NULL)
+ if (geomAttributes == nullptr)
return(kQ3Failure);
@@ -940,14 +940,14 @@
E3Geometry_GetDecomposed( TQ3GeometryObject theGeom, TQ3ViewObject view )
{
// Verify that we are in a submitting loop
- Q3_REQUIRE_OR_RESULT( E3View_GetViewState( view ) == kQ3ViewStateSubmitting, NULL );
+ Q3_REQUIRE_OR_RESULT( E3View_GetViewState( view ) == kQ3ViewStateSubmitting, nullptr );
// Find the method we need
TQ3XGeomCacheNewMethod cacheNew = ( (E3GeometryInfo*) ( theGeom->GetClass () ) )->cacheNew ;
- if ( cacheNew == NULL )
- return NULL ;
+ if ( cacheNew == nullptr )
+ return nullptr ;
@@ -1026,7 +1026,7 @@
TQ3Boolean
E3Geometry_IsOfMyClass ( TQ3Object object )
{
- if ( object == NULL )
+ if ( object == nullptr )
return kQ3False ;
if ( object->IsObjectValid () )
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp 2018-06-04 14:23:00 UTC (rev 3351)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp 2018-06-10 17:31:46 UTC (rev 3352)
@@ -200,27 +200,27 @@
toBox->instanceData.orientation = fromBox->instanceData.orientation ;
toBox->instanceData.majorAxis = fromBox->instanceData.majorAxis ;
toBox->instanceData.minorAxis = fromBox->instanceData.minorAxis ;
- toBox->instanceData.faceAttributeSet = NULL ;
- toBox->instanceData.boxAttributeSet = NULL ;
+ toBox->instanceData.faceAttributeSet = nullptr ;
+ toBox->instanceData.boxAttributeSet = nullptr ;
// Duplicate the attribute sets
- if ( fromBox->instanceData.boxAttributeSet != NULL )
+ if ( fromBox->instanceData.boxAttributeSet != nullptr )
toBox->instanceData.boxAttributeSet = Q3Object_Duplicate ( fromBox->instanceData.boxAttributeSet ) ;
- if ( fromBox->instanceData.faceAttributeSet != NULL )
+ if ( fromBox->instanceData.faceAttributeSet != nullptr )
{
// duplicate the faces attribute array
toBox->instanceData.faceAttributeSet = (TQ3AttributeSet*) Q3Memory_Allocate ( 6 * sizeof ( TQ3AttributeSet ) ) ;
- if ( toBox->instanceData.faceAttributeSet != NULL )
+ if ( toBox->instanceData.faceAttributeSet != nullptr )
{
// duplicate the face attributes
for ( TQ3Uns32 n = 0 ; n < 6 ; ++n )
- if ( fromBox->instanceData.faceAttributeSet [ n ] != NULL )
+ if ( fromBox->instanceData.faceAttributeSet [ n ] != nullptr )
toBox->instanceData.faceAttributeSet [ n ] = Q3Object_Duplicate ( fromBox->instanceData.faceAttributeSet [ n ] ) ;
else
- toBox->instanceData.faceAttributeSet [ n ] = NULL ;
+ toBox->instanceData.faceAttributeSet [ n ] = nullptr ;
}
}
@@ -293,7 +293,7 @@
// Set up vertex attributes
vertexAtts[0].attributeType = kQ3AttributeTypeNormal;
vertexAtts[0].data = vertexNormals;
- vertexAtts[0].attributeUseArray = NULL;
+ vertexAtts[0].attributeUseArray = nullptr;
vertexNormals[0] = majCrossMin;
vertexNormals[1] = majCrossMin;
vertexNormals[2] = majCrossMin;
@@ -301,7 +301,7 @@
vertexAtts[1].attributeType = kQ3AttributeTypeSurfaceUV;
vertexAtts[1].data = vertexUVs;
- vertexAtts[1].attributeUseArray = NULL;
+ vertexAtts[1].attributeUseArray = nullptr;
@@ -310,11 +310,11 @@
theTriMeshData.numTriangles = 2;
theTriMeshData.triangles = triangles;
theTriMeshData.numTriangleAttributeTypes = 0;
- theTriMeshData.triangleAttributeTypes = NULL;
+ theTriMeshData.triangleAttributeTypes = nullptr;
theTriMeshData.numEdges = 4;
theTriMeshData.edges = edges;
theTriMeshData.numEdgeAttributeTypes = 0;
- theTriMeshData.edgeAttributeTypes = NULL;
+ theTriMeshData.edgeAttributeTypes = nullptr;
theTriMeshData.numPoints = 4;
theTriMeshData.points = points;
theTriMeshData.numVertexAttributeTypes = 2;
@@ -327,7 +327,7 @@
theStatus = kQ3Failure;
theTriMesh = Q3TriMesh_New( &theTriMeshData );
- if (theTriMesh != NULL)
+ if (theTriMesh != nullptr)
{
E3TriMesh_AddTriangleNormals(theTriMesh, kQ3OrientationStyleCounterClockwise);
Q3Group_AddObjectAndDispose( inGroup, &theTriMesh );
@@ -349,10 +349,10 @@
static TQ3AttributeSet
e3geom_box_get_face_att_set( const TQ3BoxData* inBoxData, TQ3Int16 inIndex )
{
- TQ3AttributeSet faceSet = NULL;
+ TQ3AttributeSet faceSet = nullptr;
Q3_ASSERT( (inIndex >= 0) && (inIndex <= 5) );
- if (inBoxData->faceAttributeSet != NULL)
+ if (inBoxData->faceAttributeSet != nullptr)
{
faceSet = inBoxData->faceAttributeSet[ inIndex ];
}
@@ -379,23 +379,23 @@
theVertAtts[0].attributeType = kQ3AttributeTypeNormal;
theVertAtts[0].data = thePointNormals;
- theVertAtts[0].attributeUseArray = NULL;
+ theVertAtts[0].attributeUseArray = nullptr;
theVertAtts[1].attributeType = kQ3AttributeTypeSurfaceUV;
theVertAtts[1].data = thePointUVs;
- theVertAtts[1].attributeUseArray = NULL;
+ theVertAtts[1].attributeUseArray = nullptr;
TQ3TriMeshData tmData =
{
- NULL,
+ nullptr,
12,
theFaces,
0,
- NULL,
+ nullptr,
24,
theEdges,
0,
- NULL,
+ nullptr,
24,
thePoints,
2,
@@ -452,7 +452,7 @@
TQ3GeometryObject theTriMesh = Q3TriMesh_New( &tmData );
- if (theTriMesh != NULL)
+ if (theTriMesh != nullptr)
{
E3TriMesh_AddTriangleNormals(theTriMesh, kQ3OrientationStyleCounterClockwise);
Q3Group_EmptyObjectsOfType( ioGroup, kQ3GeometryTypeTriMesh );
@@ -482,10 +482,10 @@
// Create a group to hold the cached representation
theGroup = Q3DisplayGroup_New();
- if (theGroup == NULL)
+ if (theGroup == nullptr)
{
E3ErrorManager_PostError( kQ3ErrorOutOfMemory, kQ3False );
- return(NULL);
+ return(nullptr);
}
@@ -515,7 +515,7 @@
// Add the box attributes
- if (inBoxData->boxAttributeSet != NULL)
+ if (inBoxData->boxAttributeSet != nullptr)
Q3Group_AddObject( theGroup, inBoxData->boxAttributeSet );
@@ -578,7 +578,7 @@
// If there are no separate face attributes, the cached representation can be
// a single TriMesh, and that will render faster.
- if ( (status == kQ3Success) && (inBoxData->faceAttributeSet == NULL) )
+ if ( (status == kQ3Success) && (inBoxData->faceAttributeSet == nullptr) )
{
e3geom_box_merge_faces( theGroup );
}
@@ -637,7 +637,7 @@
//-----------------------------------------------------------------------------
static TQ3XFunctionPointer
e3geom_box_metahandler(TQ3XMethodType methodType)
-{ TQ3XFunctionPointer theMethod = NULL;
+{ TQ3XFunctionPointer theMethod = nullptr;
@@ -726,7 +726,7 @@
{ TQ3Object theObject;
- if (boxData == NULL)
+ if (boxData == nullptr)
{
TQ3BoxData defaultBox = {
{ 0.0f, 0.0f, 0.0f },
@@ -733,7 +733,7 @@
{ 1.0f, 0.0f, 0.0f },
{ 0.0f, 1.0f, 0.0f },
{ 0.0f, 0.0f, 1.0f },
- NULL, NULL
+ nullptr, nullptr
};
theObject = E3ClassTree::CreateInstance ( kQ3GeometryTypeBox, kQ3False, &defaultBox ) ;
}
@@ -784,13 +784,13 @@
box->instanceData.majorAxis = boxData->majorAxis ;
box->instanceData.minorAxis = boxData->minorAxis ;
- if ( boxData->faceAttributeSet != NULL )
+ if ( boxData->faceAttributeSet != nullptr )
{
// If we don't have an attribute array, create one
- if ( box->instanceData.faceAttributeSet == NULL )
+ if ( box->instanceData.faceAttributeSet == nullptr )
box->instanceData.faceAttributeSet = (TQ3AttributeSet*) Q3Memory_AllocateClear ( 6 * sizeof ( TQ3AttributeSet ) ) ;
- if ( box->instanceData.faceAttributeSet == NULL )
+ if ( box->instanceData.faceAttributeSet == nullptr )
return kQ3Failure ;
@@ -801,7 +801,7 @@
else
{
// Dispose of any attributes we currently have
- if ( box->instanceData.faceAttributeSet != NULL )
+ if ( box->instanceData.faceAttributeSet != nullptr )
{
for ( n = 0 ; n < 6 ; ++n )
Q3Object_CleanDispose ( &box->instanceData.faceAttributeSet [ n ] ) ;
@@ -835,12 +835,12 @@
boxData->majorAxis = box->instanceData.majorAxis ;
boxData->minorAxis = box->instanceData.minorAxis ;
- if ( box->instanceData.faceAttributeSet != NULL )
+ if ( box->instanceData.faceAttributeSet != nullptr )
{
// Create an attribute array
boxData->faceAttributeSet = (TQ3AttributeSet*) Q3Memory_Allocate ( 6 * sizeof ( TQ3AttributeSet ) ) ;
- if ( boxData->faceAttributeSet == NULL )
+ if ( boxData->faceAttributeSet == nullptr )
return kQ3Failure ;
@@ -849,7 +849,7 @@
E3Shared_Acquire ( &boxData->faceAttributeSet [ n ], box->instanceData.faceAttributeSet [ n ] ) ;
}
else
- boxData->faceAttributeSet = NULL ;
+ boxData->faceAttributeSet = nullptr ;
E3Shared_Acquire ( &boxData->boxAttributeSet, box->instanceData.boxAttributeSet ) ;
@@ -870,7 +870,7 @@
// Release the data
- if (boxData->faceAttributeSet != NULL)
+ if (boxData->faceAttributeSet != nullptr)
{
for (n = 0; n < 6; n++)
Q3Object_CleanDispose(&boxData->faceAttributeSet[n]);
@@ -1048,10 +1048,10 @@
E3Box* box = (E3Box*) theBox ;
// Get the attribute set
- if ( box->instanceData.faceAttributeSet != NULL )
+ if ( box->instanceData.faceAttributeSet != nullptr )
E3Shared_Acquire ( faceAttributeSet, box->instanceData.faceAttributeSet [ faceIndex ] ) ;
else
- *faceAttributeSet = NULL ;
+ *faceAttributeSet = nullptr ;
return kQ3Success ;
}
@@ -1069,10 +1069,10 @@
E3Box* box = (E3Box*) theBox ;
// If we don't have an attribute array, allocate one now
- if ( box->instanceData.faceAttributeSet == NULL )
+ if ( box->instanceData.faceAttributeSet == nullptr )
{
box->instanceData.faceAttributeSet = (TQ3AttributeSet*) Q3Memory_AllocateClear ( 6 * sizeof ( TQ3AttributeSet ) ) ;
- if ( box->instanceData.faceAttributeSet == NULL )
+ if ( box->instanceData.faceAttributeSet == nullptr )
return kQ3Failure ;
}
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp 2018-06-04 14:23:00 UTC (rev 3351)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp 2018-06-10 17:31:46 UTC (rev 3352)
@@ -94,29 +94,29 @@
// copy or shared-replace the attributes
if (isDuplicate)
{
- if (src->interiorAttributeSet != NULL)
+ if (src->interiorAttributeSet != nullptr)
{
dst->interiorAttributeSet = Q3Object_Duplicate(src->interiorAttributeSet);
- if (dst->interiorAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->interiorAttributeSet = NULL;
+ if (dst->interiorAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->interiorAttributeSet = nullptr;
- if (src->faceAttributeSet != NULL)
+ if (src->faceAttributeSet != nullptr)
{
dst->faceAttributeSet = Q3Object_Duplicate(src->faceAttributeSet);
- if (dst->faceAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->faceAttributeSet = NULL;
+ if (dst->faceAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->faceAttributeSet = nullptr;
- if (src->bottomAttributeSet != NULL)
+ if (src->bottomAttributeSet != nullptr)
{
dst->bottomAttributeSet = Q3Object_Duplicate(src->bottomAttributeSet);
- if (dst->bottomAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->bottomAttributeSet = NULL;
+ if (dst->bottomAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->bottomAttributeSet = nullptr;
- if (src->coneAttributeSet != NULL)
+ if (src->coneAttributeSet != nullptr)
{
dst->coneAttributeSet = Q3Object_Duplicate(src->coneAttributeSet);
- if (dst->coneAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->coneAttributeSet = NULL;
+ if (dst->coneAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->coneAttributeSet = nullptr;
}
else {
E3Shared_Replace(&dst->interiorAttributeSet, src->interiorAttributeSet);
@@ -302,7 +302,7 @@
normals = (TQ3Vector3D *) Q3Memory_Allocate( static_cast<TQ3Uns32>(numpoints*sizeof(TQ3Vector3D)) );
uvs = (TQ3Param2D *) Q3Memory_Allocate( static_cast<TQ3Uns32>(numpoints * sizeof(TQ3Param2D)) );
triangles = (TQ3TriMeshTriangleData *) Q3Memory_Allocate( static_cast<TQ3Uns32>(numFaces*sizeof(TQ3TriMeshTriangleData)) );
- if (points == NULL || normals == NULL || uvs == NULL || triangles == NULL)
+ if (points == nullptr || normals == nullptr || uvs == nullptr || triangles == nullptr)
{
Q3Memory_Free(&points);
Q3Memory_Free(&normals);
@@ -400,11 +400,11 @@
// Set up TriMesh data
vertexAttributes[0].attributeType = kQ3AttributeTypeNormal;
vertexAttributes[0].data = normals;
- vertexAttributes[0].attributeUseArray = NULL;
+ vertexAttributes[0].attributeUseArray = nullptr;
vertexAttributes[1].attributeType = kQ3AttributeTypeSurfaceUV;
vertexAttributes[1].data = uvs;
- vertexAttributes[1].attributeUseArray = NULL;
+ vertexAttributes[1].attributeUseArray = nullptr;
triMeshData.numPoints = numpoints;
triMeshData.points = points;
@@ -411,11 +411,11 @@
triMeshData.numTriangles = numFaces;
triMeshData.triangles = triangles;
triMeshData.numTriangleAttributeTypes = 0;
- triMeshData.triangleAttributeTypes = NULL;
+ triMeshData.triangleAttributeTypes = nullptr;
triMeshData.numEdges = 0;
- triMeshData.edges = NULL;
+ triMeshData.edges = nullptr;
triMeshData.numEdgeAttributeTypes = 0;
- triMeshData.edgeAttributeTypes = NULL;
+ triMeshData.edgeAttributeTypes = nullptr;
triMeshData.numVertexAttributeTypes = 2;
triMeshData.vertexAttributeTypes = vertexAttributes;
triMeshData.triMeshAttributeSet = inData->faceAttributeSet;
@@ -428,7 +428,7 @@
// Create the TriMesh and add to the group
theTriMesh = Q3TriMesh_New(&triMeshData);
- if (theTriMesh != NULL)
+ if (theTriMesh != nullptr)
{
E3TriMesh_AddTriangleNormals(theTriMesh, kQ3OrientationStyleCounterClockwise);
Q3Group_AddObjectAndDispose( ioGroup, &theTriMesh );
@@ -473,7 +473,7 @@
topDisk.diskAttributeSet = inData->interiorAttributeSet;
topGeom = Q3Disk_New( &topDisk );
- if (topGeom != NULL)
+ if (topGeom != nullptr)
{
Q3Group_AddObjectAndDispose( ioGroup, &topGeom );
}
@@ -494,14 +494,14 @@
{ { 0, 1, 2 } }, { { 1, 3, 2 } }
};
TQ3TriMeshAttributeData intPtAtts[2] = {
- { kQ3AttributeTypeNormal, NULL, NULL },
- { kQ3AttributeTypeSurfaceUV, NULL, NULL }
+ { kQ3AttributeTypeNormal, nullptr, nullptr },
+ { kQ3AttributeTypeSurfaceUV, nullptr, nullptr }
};
TQ3TriMeshAttributeData intFaceAtts = {
- kQ3AttributeTypeNormal, NULL, NULL
+ kQ3AttributeTypeNormal, nullptr, nullptr
};
TQ3TriMeshData intTriMeshData;
- TQ3GeometryObject intGeom = NULL;
+ TQ3GeometryObject intGeom = nullptr;
intPtAtts[0].data = interiorPtNorms;
intPtAtts[1].data = interiorUVs;
@@ -513,9 +513,9 @@
intTriMeshData.numTriangleAttributeTypes = 1;
intTriMeshData.triangleAttributeTypes = &intFaceAtts;
intTriMeshData.numEdges = 0;
- intTriMeshData.edges = NULL;
+ intTriMeshData.edges = nullptr;
intTriMeshData.numEdgeAttributeTypes = 0;
- intTriMeshData.edgeAttributeTypes = NULL;
+ intTriMeshData.edgeAttributeTypes = nullptr;
intTriMeshData.points = interiorPts;
intTriMeshData.numVertexAttributeTypes = 2;
intTriMeshData.vertexAttributeTypes = intPtAtts;
@@ -552,7 +552,7 @@
Q3BoundingBox_SetFromPoints3D( &intTriMeshData.bBox, intTriMeshData.points,
intTriMeshData.numPoints, sizeof(TQ3Point3D) );
intGeom = Q3TriMesh_New( &intTriMeshData );
- if (intGeom != NULL)
+ if (intGeom != nullptr)
{
E3TriMesh_AddTriangleNormals(intGeom, kQ3OrientationStyleCounterClockwise);
Q3Group_AddObjectAndDispose( ioGroup, &intGeom );
@@ -574,7 +574,7 @@
Q3BoundingBox_SetFromPoints3D( &intTriMeshData.bBox, intTriMeshData.points,
intTriMeshData.numPoints, sizeof(TQ3Point3D) );
intGeom = Q3TriMesh_New( &intTriMeshData );
- if (intGeom != NULL)
+ if (intGeom != nullptr)
{
E3TriMesh_AddTriangleNormals(intGeom, kQ3OrientationStyleCounterClockwise);
Q3Group_AddObjectAndDispose( ioGroup, &intGeom );
@@ -610,7 +610,7 @@
Q3BoundingBox_SetFromPoints3D( &intTriMeshData.bBox, intTriMeshData.points,
intTriMeshData.numPoints, sizeof(TQ3Point3D) );
intGeom = Q3TriMesh_New( &intTriMeshData );
- if (intGeom != NULL)
+ if (intGeom != nullptr)
{
E3TriMesh_AddTriangleNormals(intGeom, kQ3OrientationStyleCounterClockwise);
Q3Group_AddObjectAndDispose( ioGroup, &intGeom );
@@ -641,7 +641,7 @@
Q3BoundingBox_SetFromPoints3D( &intTriMeshData.bBox, intTriMeshData.points,
intTriMeshData.numPoints, sizeof(TQ3Point3D) );
intGeom = Q3TriMesh_New( &intTriMeshData );
- if (intGeom != NULL)
+ if (intGeom != nullptr)
{
E3TriMesh_AddTriangleNormals(intGeom, kQ3OrientationStyleCounterClockwise);
Q3Group_AddObjectAndDispose( ioGroup, &intGeom );
@@ -727,10 +727,10 @@
// Create a group to hold the cached geometry
theGroup = Q3DisplayGroup_New();
- if (theGroup == NULL)
+ if (theGroup == nullptr)
{
E3ErrorManager_PostError( kQ3ErrorOutOfMemory, kQ3False );
- return NULL;
+ return nullptr;
}
@@ -745,7 +745,7 @@
// Add the cone attributes
- if (geomData->coneAttributeSet != NULL)
+ if (geomData->coneAttributeSet != nullptr)
Q3Group_AddObject( theGroup, geomData->coneAttributeSet );
@@ -822,7 +822,7 @@
botDisk.diskAttributeSet = geomData->bottomAttributeSet;
botGeom = Q3Disk_New( &botDisk );
- if (botGeom != NULL)
+ if (botGeom != nullptr)
{
Q3Group_AddObjectAndDispose(theGroup, &botGeom);
}
@@ -873,7 +873,7 @@
//-----------------------------------------------------------------------------
static TQ3XFunctionPointer
e3geom_cone_metahandler(TQ3XMethodType methodType)
-{ TQ3XFunctionPointer theMethod = NULL;
+{ TQ3XFunctionPointer theMethod = nullptr;
@@ -959,7 +959,7 @@
- if (coneData == NULL)
+ if (coneData == nullptr)
{
TQ3ConeData defaultCone = {
{ 0.0f, 0.0f, 0.0f },
@@ -968,7 +968,7 @@
{ 0.0f, 0.0f, 1.0f },
0.0f, 1.0f, 0.0f, 1.0f,
kQ3EndCapNone,
- NULL, NULL, NULL, NULL
+ nullptr, nullptr, nullptr, nullptr
};
theObject = E3ClassTree::CreateInstance ( kQ3GeometryTypeCone, kQ3False, &defaultCone ) ;
}
@@ -1036,10 +1036,10 @@
E3Cone* cone = (E3Cone*) theCone ;
// Copy the data out of the Cone
- coneData->interiorAttributeSet = NULL ;
- coneData->faceAttributeSet = NULL ;
- coneData->bottomAttributeSet = NULL ;
- coneData->coneAttributeSet = NULL ;
+ coneData->interiorAttributeSet = nullptr ;
+ coneData->faceAttributeSet = nullptr ;
+ coneData->bottomAttributeSet = nullptr ;
+ coneData->coneAttributeSet = nullptr ;
return e3geom_cone_copydata ( & cone->instanceData, coneData, kQ3False ) ;
}
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp 2018-06-04 14:23:00 UTC (rev 3351)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp 2018-06-10 17:31:46 UTC (rev 3352)
@@ -94,35 +94,35 @@
// copy or shared-replace the attributes
if (isDuplicate)
{
- if (src->interiorAttributeSet != NULL)
+ if (src->interiorAttributeSet != nullptr)
{
dst->interiorAttributeSet = Q3Object_Duplicate(src->interiorAttributeSet);
- if (dst->interiorAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->interiorAttributeSet = NULL;
+ if (dst->interiorAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->interiorAttributeSet = nullptr;
- if (src->faceAttributeSet != NULL)
+ if (src->faceAttributeSet != nullptr)
{
dst->faceAttributeSet = Q3Object_Duplicate(src->faceAttributeSet);
- if (dst->faceAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->faceAttributeSet = NULL;
+ if (dst->faceAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->faceAttributeSet = nullptr;
- if (src->topAttributeSet != NULL)
+ if (src->topAttributeSet != nullptr)
{
dst->topAttributeSet = Q3Object_Duplicate(src->topAttributeSet);
- if (dst->topAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->topAttributeSet = NULL;
+ if (dst->topAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->topAttributeSet = nullptr;
- if (src->bottomAttributeSet != NULL)
+ if (src->bottomAttributeSet != nullptr)
{
dst->bottomAttributeSet = Q3Object_Duplicate(src->bottomAttributeSet);
- if (dst->bottomAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->bottomAttributeSet = NULL;
+ if (dst->bottomAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->bottomAttributeSet = nullptr;
- if (src->cylinderAttributeSet != NULL)
+ if (src->cylinderAttributeSet != nullptr)
{
dst->cylinderAttributeSet = Q3Object_Duplicate(src->cylinderAttributeSet);
- if (dst->cylinderAttributeSet == NULL) qd3dStatus = kQ3Failure;
- } else dst->cylinderAttributeSet = NULL;
+ if (dst->cylinderAttributeSet == nullptr) qd3dStatus = kQ3Failure;
+ } else dst->cylinderAttributeSet = nullptr;
}
else {
E3Shared_Replace(&dst->interiorAttributeSet, src->interiorAttributeSet);
@@ -342,10 +342,10 @@
// Create a group to hold the cached geometry
theGroup = Q3DisplayGroup_New();
- if (theGroup == NULL)
+ if (theGroup == nullptr)
{
E3ErrorManager_PostError( kQ3ErrorOutOfMemory, kQ3False );
- return NULL;
+ return nullptr;
}
@@ -360,7 +360,7 @@
// Add the cone attributes
- if (geomData->cylinderAttributeSet != NULL)
+ if (geomData->cylinderAttributeSet != nullptr)
Q3Group_AddObject( theGroup, geomData->cylinderAttributeSet );
@@ -371,7 +371,7 @@
uvs = (TQ3Param2D *) Q3Memory_Allocate(static_cast<TQ3Uns32>(numpoints*sizeof(TQ3Param2D)));
triangles = (TQ3TriMeshTriangleData *) Q3Memory_Allocate( static_cast<TQ3Uns32>(2*sides*sizeof(TQ3TriMeshTriangleData)) );
- if (points == NULL || normals == NULL || uvs == NULL || triangles == NULL)
+ if (points == nullptr || normals == nullptr || uvs == nullptr || triangles == nullptr)
{
Q3Memory_Free(&points);
Q3Memory_Free(&normals);
@@ -461,11 +461,11 @@
// set up remaining trimesh data
vertexAttributes[0].attributeType = kQ3AttributeTypeNormal;
vertexAttributes[0].data = normals;
- vertexAttributes[0].attributeUseArray = NULL;
+ vertexAttributes[0].attributeUseArray = nullptr;
vertexAttributes[1].attributeType = kQ3AttributeTypeSurfaceUV;
vertexAttributes[1].data = uvs;
- vertexAttributes[1].attributeUseArray = NULL;
+ vertexAttributes[1].attributeUseArray = nullptr;
triMeshData.numPoints = numpoints;
triMeshData.points = points;
@@ -472,11 +472,11 @@
triMeshData.numTriangles = 2*sides;
triMeshData.triangles = triangles;
triMeshData.numTriangleAttributeTypes = 0;
- triMeshData.triangleAttributeTypes = NULL;
+ triMeshData.triangleAttributeTypes = nullptr;
triMeshData.numEdges = 0;
- triMeshData.edges = NULL;
+ triMeshData.edges = nullptr;
triMeshData.numEdgeAttributeTypes = 0;
- triMeshData.edgeAttributeTypes = NULL;
+ triMeshData.edgeAttributeTypes = nullptr;
triMeshData.numVertexAttributeTypes = 2;
triMeshData.vertexAttributeTypes = vertexAttributes;
triMeshData.triMeshAttributeSet = geomData->faceAttributeSet;
@@ -490,7 +490,7 @@
// finally, create the TriMesh and add to the group
theTriMesh = Q3TriMesh_New(&triMeshData);
- if (theTriMesh != NULL)
+ if (theTriMesh != nullptr)
{
E3TriMesh_AddTriangleNormals(theTriMesh, kQ3OrientationStyleCounterClockwise);
Q3Group_AddObjectAndDispose(theGroup, &theTriMesh);
@@ -514,7 +514,7 @@
botDisk.diskAttributeSet = geomData->bottomAttributeSet;
botGeom = Q3Disk_New( &botDisk );
- if (botGeom != NULL)
+ if (botGeom != nullptr)
{
Q3Group_AddObjectAndDispose(theGroup, &botGeom);
}
@@ -538,7 +538,7 @@
topDisk.diskAttributeSet = geomData->topAttributeSet;
topGeom = Q3Disk_New( &topDisk );
- if (topGeom != NULL)
+ if (topGeom != nullptr)
{
Q3Group_AddObjectAndDispose(theGroup, &topGeom);
}
@@ -559,11 +559,11 @@
{ { 0, 3, 1 } }, { { 0, 2, 3 } }
};
TQ3TriMeshAttributeData interiorPtAtts[2] = {
- { kQ3AttributeTypeNormal, NULL, NULL },
- { kQ3AttributeTypeSurfaceUV, NULL, NULL }
+ { kQ3AttributeTypeNormal, nullptr, nullptr },
+ { kQ3AttributeTypeSurfaceUV, nullptr, nullptr }
};
TQ3TriMeshData intTriMeshData;
- TQ3GeometryObject intGeom = NULL;
+ TQ3GeometryObject intGeom = nullptr;
// First half of interior, from ending edge of face to center line.
ang = endAngle;
@@ -601,11 +601,11 @@
intTriMeshData.numTriangles = 2;
intTriMeshData.triangles = interiorTris;
intTriMeshData.numTriangleAttributeTypes = 0;
- intTriMeshData.triangleAttributeTypes = NULL;
+ intTriMeshData.triangleAttributeTypes = nullptr;
intTriMeshData.numEdges = 0;
- intTriMeshData.edges = NULL;
+ intTriMeshData.edges = nullptr;
intTriMeshData.numEdgeAttributeTypes = 0;
- intTriMeshData.edgeAttributeTypes = NULL;
+ intTriMeshData.edgeAttributeTypes = nullptr;
intTriMeshData.numPoints = 4;
intTriMeshData.points = interiorPts;
intTriMeshData.numVertexAttributeTypes = 2;
@@ -617,7 +617,7 @@
// Make the first part of the interior
intGeom = Q3TriMesh_New( &intTriMeshData );
- if (intGeom != NULL)
+ if (intGeom != nullptr)
{
E3TriMesh_AddTriangleNormals(intGeom, kQ3OrientationStyleCounterClockwise);
Q3Group_AddObjectAndDispose(theGroup, &intGeom);
@@ -648,7 +648,7 @@
// Make ...
[truncated message content] |
|
From: <jww...@us...> - 2018-06-04 14:23:02
|
Revision: 3351
http://sourceforge.net/p/quesa/code/3351
Author: jwwalker
Date: 2018-06-04 14:23:00 +0000 (Mon, 04 Jun 2018)
Log Message:
-----------
Windows projects updated to Visual Studio 2017 and for new source file names.
Modified Paths:
--------------
trunk/quesa/Development/Projects/Windows/Quesa.vcxproj
trunk/quesa/Development/Projects/Windows/Quesa.vcxproj.filters
Modified: trunk/quesa/Development/Projects/Windows/Quesa.vcxproj
===================================================================
--- trunk/quesa/Development/Projects/Windows/Quesa.vcxproj 2018-06-04 02:48:32 UTC (rev 3350)
+++ trunk/quesa/Development/Projects/Windows/Quesa.vcxproj 2018-06-04 14:23:00 UTC (rev 3351)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -14,6 +14,7 @@
<ProjectGuid>{F8A88C04-8C7D-4452-B24D-7ECACF01511D}</ProjectGuid>
<RootNamespace>Quesa</RootNamespace>
<SccLocalPath>Desktop</SccLocalPath>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -20,11 +21,13 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -113,182 +116,28 @@
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\..\Source\Core\Geometry\E3Geometry.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryBox.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryCone.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryCylinder.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryDisk.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryEllipse.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryEllipsoid.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryGeneralPolygon.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryLine.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryMarker.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryMesh.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryNURBCurve.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryNURBPatch.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPixmapMarker.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPoint.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPolygon.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPolyhedron.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPolyLine.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTorus.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTriangle.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTriGrid.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTriMesh.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
+ <ClCompile Include="..\..\Source\Core\Geometry\E3Geometry.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryBox.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryCone.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryCylinder.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryDisk.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryEllipse.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryEllipsoid.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryGeneralPolygon.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryLine.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryMarker.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryMesh.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryNURBCurve.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryNURBPatch.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPixmapMarker.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPoint.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPolygon.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPolyhedron.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryPolyLine.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTorus.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTriangle.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTriGrid.cpp" />
+ <ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTriMesh.cpp" />
<ClCompile Include="..\..\Source\Core\Geometry\E3GeometryTriMeshOptimize.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -295,627 +144,100 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DCamera.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DController.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DCustomElements.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DDrawContext.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DErrors.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DExtension.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DGeometry.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DGroup.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DIO.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DLight.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DMain.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DMath.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DMemory.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DPick.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DRenderer.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DSet.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DShader.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DStorage.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DString.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DStyle.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DTransform.cpp" />
+ <ClCompile Include="..\..\Source\Core\Glue\QD3DView.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3ArrayOrList.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3ClassTree.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3Compatibility.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3ErrorManager.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3Globals.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3HashTable.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3Pool.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3System.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3Tessellate.cpp" />
+ <ClCompile Include="..\..\Source\Core\Support\E3Utils.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Camera.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Controller.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3CustomElements.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3DrawContext.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Errors.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Extension.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Group.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3IO.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3IOData.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Light.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Main.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Math.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Memory.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Pick.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Renderer.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Set.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Shader.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Storage.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3String.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Style.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Texture.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3Transform.cpp" />
+ <ClCompile Include="..\..\Source\Core\System\E3View.cpp" />
+ <ClCompile Include="..\..\Source\FileFormats\E3IOFileFormat.cpp" />
+ <ClCompile Include="..\..\Source\FileFormats\Readers\3DMF\E3FFR_3DMF.cpp" />
+ <ClCompile Include="..\..\Source\FileFormats\Readers\3DMF\E3FFR_3DMF_Bin.cpp" />
+ <ClCompile Include="..\..\Source\FileFormats\Readers\3DMF\E3FFR_3DMF_Geometry.cpp" />
+ <ClCompile Include="..\..\Source\FileFormats\Readers\3DMF\E3FFR_3DMF_Text.cpp" />
+ <ClCompile Include="..\..\Source\FileFormats\Writers\3DMF\E3FFW_3DMFBin_Geometry.cpp" />
+ <ClCompile Include="..\..\Source\FileFormats\Writers\3DMF\E3FFW_3DMFBin_Register.cpp" />
+ <ClCompile Include="..\..\Source\FileFormats\Writers\3DMF\E3FFW_3DMFBin_Writer.cpp" />
+ <ClCompile Include="..\..\Source\Platform\Windows\E3WindowsDebug.cpp" />
+ <ClCompile Include="..\..\Source\Platform\Windows\E3WindowsDrawContext.cpp" />
+ <ClCompile Include="..\..\Source\Platform\Windows\E3WindowsStackCrawl.cpp" />
+ <ClCompile Include="..\..\Source\Platform\Windows\E3WindowsStorage.cpp" />
+ <ClCompile Include="..\..\Source\Platform\Windows\E3WindowsSystem.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Common\GLCamera.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Common\GLDrawContext.cpp" />
<ClCompile Include="..\..\Source\Renderers\Common\GLShadowVolumeManager.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Common\GLTextureManager.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Common\GLUtils.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Generic\GNGeometry.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Generic\GNRegister.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Generic\GNRenderer.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRGeometry.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRGeometryTriMesh.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRLights.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRRegister.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRRenderer.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRTexture.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRTransparent.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRTriBuffer.cpp" />
+ <ClCompile Include="..\..\Source\Renderers\Interactive\IRUpdate.cpp" />
<ClCompile Include="..\..\Source\Renderers\MakeStrip\StripMaker_FreeFaceSet.cpp" />
<ClCompile Include="..\..\Source\Renderers\OpenGL\QOShaderProgramCache.cpp" />
<ClCompile Include="..\..\Source\Renderers\OpenGL\QOShadowMarker.cpp" />
- <ClCompile Include="..\..\Source\Core\Glue\QD3DCamera.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DController.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DCustomElements.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DDrawContext.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DErrors.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DExtension.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DGeometry.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DGroup.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DIO.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DLight.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DMain.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DMath.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DMemory.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DPick.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DRenderer.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DSet.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DShader.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DStorage.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DString.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DStyle.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DTransform.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Glue\QD3DView.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3ArrayOrList.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3ClassTree.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3Compatibility.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3ErrorManager.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3Globals.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3HashTable.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3Pool.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3System.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3Tessellate.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\Support\E3Utils.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\System\E3Camera.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\..\Source\Core\System\E3Controller.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition=...
[truncated message content] |
|
From: <jww...@us...> - 2018-06-04 02:48:35
|
Revision: 3350
http://sourceforge.net/p/quesa/code/3350
Author: jwwalker
Date: 2018-06-04 02:48:32 +0000 (Mon, 04 Jun 2018)
Log Message:
-----------
Rename sources so they can be compiled according to extension.
Modified Paths:
--------------
trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
trunk/quesa/Development/Projects/Mac/xcode-configs/Quesa-common.xcconfig
trunk/quesa/Development/Source/Renderers/Common/GLCocoaContext.h
Added Paths:
-----------
trunk/quesa/Development/Source/Core/Geometry/E3Geometry.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryDisk.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipse.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipsoid.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryGeneralPolygon.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryLine.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryMarker.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryMesh.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBCurve.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBPatch.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPixmapMarker.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPoint.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyLine.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolygon.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyhedron.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTorus.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriGrid.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.cpp
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DCamera.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DController.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DCustomElements.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DDrawContext.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DErrors.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DExtension.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DGeometry.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DGroup.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DIO.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DLight.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DMain.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DMath.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DMemory.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DPick.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DRenderer.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DSet.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DShader.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DStorage.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DString.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DStyle.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DTransform.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DView.cpp
trunk/quesa/Development/Source/Core/Glue/QD3DViewer.cpp
trunk/quesa/Development/Source/Core/Support/E3ArrayOrList.cpp
trunk/quesa/Development/Source/Core/Support/E3ClassTree.cpp
trunk/quesa/Development/Source/Core/Support/E3Compatibility.cpp
trunk/quesa/Development/Source/Core/Support/E3ErrorManager.cpp
trunk/quesa/Development/Source/Core/Support/E3Globals.cpp
trunk/quesa/Development/Source/Core/Support/E3HashTable.cpp
trunk/quesa/Development/Source/Core/Support/E3Pool.cpp
trunk/quesa/Development/Source/Core/Support/E3System.cpp
trunk/quesa/Development/Source/Core/Support/E3Tessellate.cpp
trunk/quesa/Development/Source/Core/Support/E3Utils.cpp
trunk/quesa/Development/Source/Core/System/E3Camera.cpp
trunk/quesa/Development/Source/Core/System/E3Controller.cpp
trunk/quesa/Development/Source/Core/System/E3CustomElements.cpp
trunk/quesa/Development/Source/Core/System/E3DrawContext.cpp
trunk/quesa/Development/Source/Core/System/E3Errors.cpp
trunk/quesa/Development/Source/Core/System/E3Extension.cpp
trunk/quesa/Development/Source/Core/System/E3Group.cpp
trunk/quesa/Development/Source/Core/System/E3IO.cpp
trunk/quesa/Development/Source/Core/System/E3IOData.cpp
trunk/quesa/Development/Source/Core/System/E3Light.cpp
trunk/quesa/Development/Source/Core/System/E3Main.cpp
trunk/quesa/Development/Source/Core/System/E3Math.cpp
trunk/quesa/Development/Source/Core/System/E3Memory.cpp
trunk/quesa/Development/Source/Core/System/E3Pick.cpp
trunk/quesa/Development/Source/Core/System/E3Renderer.cpp
trunk/quesa/Development/Source/Core/System/E3Set.cpp
trunk/quesa/Development/Source/Core/System/E3Shader.cpp
trunk/quesa/Development/Source/Core/System/E3Storage.cpp
trunk/quesa/Development/Source/Core/System/E3String.cpp
trunk/quesa/Development/Source/Core/System/E3Style.cpp
trunk/quesa/Development/Source/Core/System/E3Texture.cpp
trunk/quesa/Development/Source/Core/System/E3Transform.cpp
trunk/quesa/Development/Source/Core/System/E3View.cpp
trunk/quesa/Development/Source/Core/Viewer/E3Viewer.cpp
trunk/quesa/Development/Source/Core/Viewer/E3ViewerOldAPIs.cpp
trunk/quesa/Development/Source/Core/Viewer/E3ViewerTools.cpp
trunk/quesa/Development/Source/FileFormats/E3IOFileFormat.cpp
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF.cpp
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Bin.cpp
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Geometry.cpp
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Text.cpp
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Geometry.cpp
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Register.cpp
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Writer.cpp
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaDebug.cpp
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaDrawContext.mm
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaStackCrawl.cpp
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaSystem.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacCFMStackCrawl.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacDrawContext.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacErrors.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacMemory.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacQD3DViewer.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacQD3DViewerTools.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacStorage.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacSystem.cpp
trunk/quesa/Development/Source/Platform/Mac/E3MacViewer.cpp
trunk/quesa/Development/Source/Platform/Unix/E3UnixDebug.cpp
trunk/quesa/Development/Source/Platform/Unix/E3UnixDrawContext.cpp
trunk/quesa/Development/Source/Platform/Unix/E3UnixStackCrawl.cpp
trunk/quesa/Development/Source/Platform/Unix/E3UnixStorage.cpp
trunk/quesa/Development/Source/Platform/Unix/E3UnixSystem.cpp
trunk/quesa/Development/Source/Platform/Windows/E3WindowsDebug.cpp
trunk/quesa/Development/Source/Platform/Windows/E3WindowsDrawContext.cpp
trunk/quesa/Development/Source/Platform/Windows/E3WindowsQD3DViewer.cpp
trunk/quesa/Development/Source/Platform/Windows/E3WindowsQD3DViewerTools.cpp
trunk/quesa/Development/Source/Platform/Windows/E3WindowsStackCrawl.cpp
trunk/quesa/Development/Source/Platform/Windows/E3WindowsStorage.cpp
trunk/quesa/Development/Source/Platform/Windows/E3WindowsSystem.cpp
trunk/quesa/Development/Source/Platform/Windows/E3WindowsViewer.cpp
trunk/quesa/Development/Source/Renderers/Common/GLCamera.cpp
trunk/quesa/Development/Source/Renderers/Common/GLCocoaContext.mm
trunk/quesa/Development/Source/Renderers/Common/GLDrawContext.cpp
trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLUtils.cpp
trunk/quesa/Development/Source/Renderers/Generic/GNGeometry.cpp
trunk/quesa/Development/Source/Renderers/Generic/GNRegister.cpp
trunk/quesa/Development/Source/Renderers/Generic/GNRenderer.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRGeometry.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRGeometryTriMesh.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRLights.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRRegister.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRRenderer.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRTexture.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRTransparent.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRTriBuffer.cpp
trunk/quesa/Development/Source/Renderers/Interactive/IRUpdate.cpp
Removed Paths:
-------------
trunk/quesa/Development/Source/Core/Geometry/E3Geometry.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryBox.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryCone.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryCylinder.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryDisk.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipse.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryEllipsoid.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryGeneralPolygon.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryLine.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryMarker.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryMesh.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBCurve.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryNURBPatch.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPixmapMarker.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPoint.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyLine.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolygon.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryPolyhedron.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTorus.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriGrid.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.c
trunk/quesa/Development/Source/Core/Glue/QD3DCamera.c
trunk/quesa/Development/Source/Core/Glue/QD3DController.c
trunk/quesa/Development/Source/Core/Glue/QD3DCustomElements.c
trunk/quesa/Development/Source/Core/Glue/QD3DDrawContext.c
trunk/quesa/Development/Source/Core/Glue/QD3DErrors.c
trunk/quesa/Development/Source/Core/Glue/QD3DExtension.c
trunk/quesa/Development/Source/Core/Glue/QD3DGeometry.c
trunk/quesa/Development/Source/Core/Glue/QD3DGroup.c
trunk/quesa/Development/Source/Core/Glue/QD3DIO.c
trunk/quesa/Development/Source/Core/Glue/QD3DLight.c
trunk/quesa/Development/Source/Core/Glue/QD3DMain.c
trunk/quesa/Development/Source/Core/Glue/QD3DMath.c
trunk/quesa/Development/Source/Core/Glue/QD3DMemory.c
trunk/quesa/Development/Source/Core/Glue/QD3DPick.c
trunk/quesa/Development/Source/Core/Glue/QD3DRenderer.c
trunk/quesa/Development/Source/Core/Glue/QD3DSet.c
trunk/quesa/Development/Source/Core/Glue/QD3DShader.c
trunk/quesa/Development/Source/Core/Glue/QD3DStorage.c
trunk/quesa/Development/Source/Core/Glue/QD3DString.c
trunk/quesa/Development/Source/Core/Glue/QD3DStyle.c
trunk/quesa/Development/Source/Core/Glue/QD3DTransform.c
trunk/quesa/Development/Source/Core/Glue/QD3DView.c
trunk/quesa/Development/Source/Core/Glue/QD3DViewer.c
trunk/quesa/Development/Source/Core/Support/E3ArrayOrList.c
trunk/quesa/Development/Source/Core/Support/E3ClassTree.c
trunk/quesa/Development/Source/Core/Support/E3Compatibility.c
trunk/quesa/Development/Source/Core/Support/E3ErrorManager.c
trunk/quesa/Development/Source/Core/Support/E3Globals.c
trunk/quesa/Development/Source/Core/Support/E3HashTable.c
trunk/quesa/Development/Source/Core/Support/E3Pool.c
trunk/quesa/Development/Source/Core/Support/E3System.c
trunk/quesa/Development/Source/Core/Support/E3Tessellate.c
trunk/quesa/Development/Source/Core/Support/E3Utils.c
trunk/quesa/Development/Source/Core/System/E3Camera.c
trunk/quesa/Development/Source/Core/System/E3Controller.c
trunk/quesa/Development/Source/Core/System/E3CustomElements.c
trunk/quesa/Development/Source/Core/System/E3DrawContext.c
trunk/quesa/Development/Source/Core/System/E3Errors.c
trunk/quesa/Development/Source/Core/System/E3Extension.c
trunk/quesa/Development/Source/Core/System/E3Group.c
trunk/quesa/Development/Source/Core/System/E3IO.c
trunk/quesa/Development/Source/Core/System/E3IOData.c
trunk/quesa/Development/Source/Core/System/E3Light.c
trunk/quesa/Development/Source/Core/System/E3Main.c
trunk/quesa/Development/Source/Core/System/E3Math.c
trunk/quesa/Development/Source/Core/System/E3Memory.c
trunk/quesa/Development/Source/Core/System/E3Pick.c
trunk/quesa/Development/Source/Core/System/E3Renderer.c
trunk/quesa/Development/Source/Core/System/E3Set.c
trunk/quesa/Development/Source/Core/System/E3Shader.c
trunk/quesa/Development/Source/Core/System/E3Storage.c
trunk/quesa/Development/Source/Core/System/E3String.c
trunk/quesa/Development/Source/Core/System/E3Style.c
trunk/quesa/Development/Source/Core/System/E3Texture.c
trunk/quesa/Development/Source/Core/System/E3Transform.c
trunk/quesa/Development/Source/Core/System/E3View.c
trunk/quesa/Development/Source/Core/Viewer/E3Viewer.c
trunk/quesa/Development/Source/Core/Viewer/E3ViewerOldAPIs.c
trunk/quesa/Development/Source/Core/Viewer/E3ViewerTools.c
trunk/quesa/Development/Source/FileFormats/E3IOFileFormat.c
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF.c
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Bin.c
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Geometry.c
trunk/quesa/Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Text.c
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Geometry.c
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Register.c
trunk/quesa/Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Writer.c
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaDebug.c
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaDrawContext.m
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaStackCrawl.c
trunk/quesa/Development/Source/Platform/Cocoa/E3CocoaSystem.c
trunk/quesa/Development/Source/Platform/Mac/E3MacCFMStackCrawl.c
trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.c
trunk/quesa/Development/Source/Platform/Mac/E3MacDrawContext.c
trunk/quesa/Development/Source/Platform/Mac/E3MacErrors.c
trunk/quesa/Development/Source/Platform/Mac/E3MacMemory.c
trunk/quesa/Development/Source/Platform/Mac/E3MacQD3DViewer.c
trunk/quesa/Development/Source/Platform/Mac/E3MacQD3DViewerTools.c
trunk/quesa/Development/Source/Platform/Mac/E3MacStorage.c
trunk/quesa/Development/Source/Platform/Mac/E3MacSystem.c
trunk/quesa/Development/Source/Platform/Mac/E3MacViewer.c
trunk/quesa/Development/Source/Platform/Unix/E3UnixDebug.c
trunk/quesa/Development/Source/Platform/Unix/E3UnixDrawContext.c
trunk/quesa/Development/Source/Platform/Unix/E3UnixStackCrawl.c
trunk/quesa/Development/Source/Platform/Unix/E3UnixStorage.c
trunk/quesa/Development/Source/Platform/Unix/E3UnixSystem.c
trunk/quesa/Development/Source/Platform/Windows/E3WindowsDebug.c
trunk/quesa/Development/Source/Platform/Windows/E3WindowsDrawContext.c
trunk/quesa/Development/Source/Platform/Windows/E3WindowsQD3DViewer.c
trunk/quesa/Development/Source/Platform/Windows/E3WindowsQD3DViewerTools.c
trunk/quesa/Development/Source/Platform/Windows/E3WindowsStackCrawl.c
trunk/quesa/Development/Source/Platform/Windows/E3WindowsStorage.c
trunk/quesa/Development/Source/Platform/Windows/E3WindowsSystem.c
trunk/quesa/Development/Source/Platform/Windows/E3WindowsViewer.c
trunk/quesa/Development/Source/Renderers/Common/GLCamera.c
trunk/quesa/Development/Source/Renderers/Common/GLCocoaContext.m
trunk/quesa/Development/Source/Renderers/Common/GLDrawContext.c
trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.c
trunk/quesa/Development/Source/Renderers/Common/GLUtils.c
trunk/quesa/Development/Source/Renderers/Generic/GNGeometry.c
trunk/quesa/Development/Source/Renderers/Generic/GNRegister.c
trunk/quesa/Development/Source/Renderers/Generic/GNRenderer.c
trunk/quesa/Development/Source/Renderers/Interactive/IRGeometry.c
trunk/quesa/Development/Source/Renderers/Interactive/IRGeometryTriMesh.c
trunk/quesa/Development/Source/Renderers/Interactive/IRLights.c
trunk/quesa/Development/Source/Renderers/Interactive/IRRegister.c
trunk/quesa/Development/Source/Renderers/Interactive/IRRenderer.c
trunk/quesa/Development/Source/Renderers/Interactive/IRTexture.c
trunk/quesa/Development/Source/Renderers/Interactive/IRTransparent.c
trunk/quesa/Development/Source/Renderers/Interactive/IRTriBuffer.c
trunk/quesa/Development/Source/Renderers/Interactive/IRUpdate.c
Modified: trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj
===================================================================
--- trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2016-10-18 01:46:29 UTC (rev 3349)
+++ trunk/quesa/Development/Projects/Mac/Quesa.xcodeproj/project.pbxproj 2018-06-04 02:48:32 UTC (rev 3350)
@@ -7,108 +7,108 @@
objects = {
/* Begin PBXBuildFile section */
- AB3A7CA6055E63B200CA83BE /* E3GeometryBox.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B87055E63B100CA83BE /* E3GeometryBox.c */; };
- AB3A7CA8055E63B200CA83BE /* E3GeometryCone.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B89055E63B100CA83BE /* E3GeometryCone.c */; };
- AB3A7CAA055E63B200CA83BE /* E3GeometryCylinder.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8B055E63B100CA83BE /* E3GeometryCylinder.c */; };
- AB3A7CAC055E63B200CA83BE /* E3GeometryDisk.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8D055E63B100CA83BE /* E3GeometryDisk.c */; };
- AB3A7CAE055E63B200CA83BE /* E3GeometryEllipse.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8F055E63B100CA83BE /* E3GeometryEllipse.c */; };
- AB3A7CB0055E63B200CA83BE /* E3GeometryEllipsoid.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B91055E63B100CA83BE /* E3GeometryEllipsoid.c */; };
- AB3A7CB2055E63B200CA83BE /* E3GeometryGeneralPolygon.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B93055E63B100CA83BE /* E3GeometryGeneralPolygon.c */; };
- AB3A7CB4055E63B200CA83BE /* E3GeometryLine.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B95055E63B100CA83BE /* E3GeometryLine.c */; };
- AB3A7CB6055E63B200CA83BE /* E3GeometryMarker.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B97055E63B100CA83BE /* E3GeometryMarker.c */; };
- AB3A7CB8055E63B200CA83BE /* E3GeometryMesh.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B99055E63B100CA83BE /* E3GeometryMesh.c */; };
- AB3A7CBA055E63B200CA83BE /* E3GeometryNURBCurve.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B9B055E63B100CA83BE /* E3GeometryNURBCurve.c */; };
- AB3A7CBC055E63B200CA83BE /* E3GeometryNURBPatch.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B9D055E63B100CA83BE /* E3GeometryNURBPatch.c */; };
- AB3A7CBE055E63B200CA83BE /* E3GeometryPixmapMarker.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B9F055E63B100CA83BE /* E3GeometryPixmapMarker.c */; };
- AB3A7CC0055E63B200CA83BE /* E3GeometryPoint.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA1055E63B100CA83BE /* E3GeometryPoint.c */; };
- AB3A7CC2055E63B200CA83BE /* E3GeometryPolygon.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA3055E63B100CA83BE /* E3GeometryPolygon.c */; };
- AB3A7CC4055E63B200CA83BE /* E3GeometryPolyhedron.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA5055E63B100CA83BE /* E3GeometryPolyhedron.c */; };
- AB3A7CC6055E63B200CA83BE /* E3GeometryPolyLine.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA7055E63B100CA83BE /* E3GeometryPolyLine.c */; };
- AB3A7CC8055E63B200CA83BE /* E3GeometryTorus.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA9055E63B100CA83BE /* E3GeometryTorus.c */; };
- AB3A7CCA055E63B200CA83BE /* E3GeometryTriangle.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BAB055E63B100CA83BE /* E3GeometryTriangle.c */; };
- AB3A7CCC055E63B200CA83BE /* E3GeometryTriGrid.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BAD055E63B100CA83BE /* E3GeometryTriGrid.c */; };
- AB3A7CCE055E63B200CA83BE /* E3GeometryTriMesh.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BAF055E63B100CA83BE /* E3GeometryTriMesh.c */; };
- AB3A7CD0055E63B200CA83BE /* QD3DCamera.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB2055E63B100CA83BE /* QD3DCamera.c */; };
- AB3A7CD1055E63B200CA83BE /* QD3DController.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB3055E63B100CA83BE /* QD3DController.c */; };
- AB3A7CD2055E63B200CA83BE /* QD3DCustomElements.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB4055E63B100CA83BE /* QD3DCustomElements.c */; };
- AB3A7CD3055E63B200CA83BE /* QD3DDrawContext.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB5055E63B100CA83BE /* QD3DDrawContext.c */; };
- AB3A7CD4055E63B200CA83BE /* QD3DErrors.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB6055E63B100CA83BE /* QD3DErrors.c */; };
- AB3A7CD5055E63B200CA83BE /* QD3DExtension.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB7055E63B100CA83BE /* QD3DExtension.c */; };
- AB3A7CD6055E63B200CA83BE /* QD3DGeometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB8055E63B100CA83BE /* QD3DGeometry.c */; };
- AB3A7CD7055E63B200CA83BE /* QD3DGroup.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB9055E63B100CA83BE /* QD3DGroup.c */; };
- AB3A7CD8055E63B200CA83BE /* QD3DIO.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBA055E63B100CA83BE /* QD3DIO.c */; };
- AB3A7CD9055E63B200CA83BE /* QD3DLight.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBB055E63B100CA83BE /* QD3DLight.c */; };
- AB3A7CDA055E63B200CA83BE /* QD3DMain.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBC055E63B100CA83BE /* QD3DMain.c */; };
- AB3A7CDB055E63B200CA83BE /* QD3DMath.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBD055E63B100CA83BE /* QD3DMath.c */; };
- AB3A7CDC055E63B200CA83BE /* QD3DMemory.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBE055E63B100CA83BE /* QD3DMemory.c */; };
- AB3A7CDD055E63B200CA83BE /* QD3DPick.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBF055E63B100CA83BE /* QD3DPick.c */; };
- AB3A7CDE055E63B200CA83BE /* QD3DRenderer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC0055E63B100CA83BE /* QD3DRenderer.c */; };
- AB3A7CDF055E63B200CA83BE /* QD3DSet.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC1055E63B100CA83BE /* QD3DSet.c */; };
- AB3A7CE0055E63B200CA83BE /* QD3DShader.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC2055E63B100CA83BE /* QD3DShader.c */; };
- AB3A7CE1055E63B200CA83BE /* QD3DStorage.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC3055E63B100CA83BE /* QD3DStorage.c */; };
- AB3A7CE2055E63B200CA83BE /* QD3DString.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC4055E63B100CA83BE /* QD3DString.c */; };
- AB3A7CE3055E63B200CA83BE /* QD3DStyle.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC5055E63B100CA83BE /* QD3DStyle.c */; };
- AB3A7CE4055E63B200CA83BE /* QD3DTransform.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC6055E63B100CA83BE /* QD3DTransform.c */; };
- AB3A7CE5055E63B200CA83BE /* QD3DView.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC7055E63B100CA83BE /* QD3DView.c */; };
- AB3A7CE6055E63B200CA83BE /* QD3DViewer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC8055E63B100CA83BE /* QD3DViewer.c */; };
- AB3A7CE7055E63B200CA83BE /* E3ArrayOrList.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BCA055E63B100CA83BE /* E3ArrayOrList.c */; };
- AB3A7CE9055E63B200CA83BE /* E3ClassTree.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BCC055E63B100CA83BE /* E3ClassTree.c */; };
- AB3A7CEB055E63B200CA83BE /* E3Compatibility.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BCE055E63B100CA83BE /* E3Compatibility.c */; };
- AB3A7CEE055E63B200CA83BE /* E3ErrorManager.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD1055E63B100CA83BE /* E3ErrorManager.c */; };
- AB3A7CF0055E63B200CA83BE /* E3Globals.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD3055E63B100CA83BE /* E3Globals.c */; };
- AB3A7CF2055E63B200CA83BE /* E3HashTable.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD5055E63B100CA83BE /* E3HashTable.c */; };
- AB3A7CF4055E63B200CA83BE /* E3Pool.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD7055E63B100CA83BE /* E3Pool.c */; };
- AB3A7CF8055E63B200CA83BE /* E3System.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BDB055E63B100CA83BE /* E3System.c */; };
- AB3A7CFA055E63B200CA83BE /* E3Tessellate.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BDD055E63B100CA83BE /* E3Tessellate.c */; };
- AB3A7CFC055E63B200CA83BE /* E3Utils.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BDF055E63B100CA83BE /* E3Utils.c */; };
- AB3A7CFF055E63B200CA83BE /* E3Camera.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE3055E63B100CA83BE /* E3Camera.c */; };
- AB3A7D01055E63B200CA83BE /* E3Controller.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE5055E63B100CA83BE /* E3Controller.c */; };
- AB3A7D03055E63B200CA83BE /* E3CustomElements.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE7055E63B100CA83BE /* E3CustomElements.c */; };
- AB3A7D05055E63B200CA83BE /* E3DrawContext.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE9055E63B100CA83BE /* E3DrawContext.c */; };
- AB3A7D07055E63B200CA83BE /* E3Errors.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BEB055E63B100CA83BE /* E3Errors.c */; };
- AB3A7D09055E63B200CA83BE /* E3Extension.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BED055E63B100CA83BE /* E3Extension.c */; };
- AB3A7D0B055E63B200CA83BE /* E3Group.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BEF055E63B100CA83BE /* E3Group.c */; };
- AB3A7D0D055E63B200CA83BE /* E3IO.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF1055E63B100CA83BE /* E3IO.c */; };
- AB3A7D0F055E63B200CA83BE /* E3IOData.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF3055E63B100CA83BE /* E3IOData.c */; };
- AB3A7D11055E63B200CA83BE /* E3Light.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF5055E63B100CA83BE /* E3Light.c */; };
- AB3A7D13055E63B200CA83BE /* E3Main.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF7055E63B100CA83BE /* E3Main.c */; };
- AB3A7D15055E63B200CA83BE /* E3Math.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF9055E63B100CA83BE /* E3Math.c */; };
- AB3A7D17055E63B200CA83BE /* E3Memory.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFB055E63B100CA83BE /* E3Memory.c */; };
- AB3A7D19055E63B200CA83BE /* E3Pick.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFD055E63B100CA83BE /* E3Pick.c */; };
- AB3A7D1B055E63B200CA83BE /* E3Renderer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFF055E63B100CA83BE /* E3Renderer.c */; };
- AB3A7D1D055E63B200CA83BE /* E3Set.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C01055E63B100CA83BE /* E3Set.c */; };
- AB3A7D1F055E63B200CA83BE /* E3Shader.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C03055E63B100CA83BE /* E3Shader.c */; };
- AB3A7D21055E63B200CA83BE /* E3Storage.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C05055E63B100CA83BE /* E3Storage.c */; };
- AB3A7D23055E63B200CA83BE /* E3String.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C07055E63B100CA83BE /* E3String.c */; };
- AB3A7D25055E63B200CA83BE /* E3Style.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C09055E63B100CA83BE /* E3Style.c */; };
- AB3A7D27055E63B200CA83BE /* E3Texture.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0B055E63B100CA83BE /* E3Texture.c */; };
- AB3A7D29055E63B200CA83BE /* E3Transform.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0D055E63B100CA83BE /* E3Transform.c */; };
- AB3A7D2B055E63B200CA83BE /* E3View.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0F055E63B100CA83BE /* E3View.c */; };
- AB3A7D2D055E63B200CA83BE /* E3Viewer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C12055E63B100CA83BE /* E3Viewer.c */; };
- AB3A7D2F055E63B200CA83BE /* E3ViewerOldAPIs.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C14055E63B100CA83BE /* E3ViewerOldAPIs.c */; };
- AB3A7D32055E63B200CA83BE /* GLCamera.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C19055E63B100CA83BE /* GLCamera.c */; };
- AB3A7D36055E63B200CA83BE /* GLDrawContext.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C1D055E63B100CA83BE /* GLDrawContext.c */; };
- AB3A7D39055E63B200CA83BE /* GLUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C20055E63B100CA83BE /* GLUtils.c */; };
- AB3A7D3B055E63B200CA83BE /* GNGeometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C23055E63B100CA83BE /* GNGeometry.c */; };
- AB3A7D3E055E63B200CA83BE /* GNRegister.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C26055E63B100CA83BE /* GNRegister.c */; };
- AB3A7D40055E63B200CA83BE /* GNRenderer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C28055E63B100CA83BE /* GNRenderer.c */; };
- AB3A7D42055E63B200CA83BE /* IRGeometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C2B055E63B100CA83BE /* IRGeometry.c */; };
- AB3A7D44055E63B200CA83BE /* IRGeometryTriMesh.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C2D055E63B100CA83BE /* IRGeometryTriMesh.c */; };
- AB3A7D46055E63B200CA83BE /* IRLights.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C2F055E63B100CA83BE /* IRLights.c */; };
- AB3A7D49055E63B200CA83BE /* IRRegister.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C32055E63B100CA83BE /* IRRegister.c */; };
- AB3A7D4B055E63B200CA83BE /* IRRenderer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C34055E63B100CA83BE /* IRRenderer.c */; };
- AB3A7D4D055E63B200CA83BE /* IRTexture.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C36055E63B100CA83BE /* IRTexture.c */; };
- AB3A7D4F055E63B200CA83BE /* IRTransparent.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C38055E63B100CA83BE /* IRTransparent.c */; };
- AB3A7D51055E63B200CA83BE /* IRTriBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C3A055E63B100CA83BE /* IRTriBuffer.c */; };
- AB3A7D53055E63B200CA83BE /* IRUpdate.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C3C055E63B100CA83BE /* IRUpdate.c */; };
- AB3A7D5E055E63B200CA83BE /* E3IOFileFormat.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C49055E63B100CA83BE /* E3IOFileFormat.c */; };
- AB3A7D60055E63B200CA83BE /* E3FFR_3DMF.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C4D055E63B100CA83BE /* E3FFR_3DMF.c */; };
- AB3A7D62055E63B200CA83BE /* E3FFR_3DMF_Bin.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C4F055E63B100CA83BE /* E3FFR_3DMF_Bin.c */; };
- AB3A7D64055E63B200CA83BE /* E3FFR_3DMF_Geometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C51055E63B100CA83BE /* E3FFR_3DMF_Geometry.c */; };
- AB3A7D66055E63B200CA83BE /* E3FFR_3DMF_Text.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C53055E63B100CA83BE /* E3FFR_3DMF_Text.c */; };
- AB3A7D68055E63B200CA83BE /* E3FFW_3DMFBin_Geometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C57055E63B100CA83BE /* E3FFW_3DMFBin_Geometry.c */; };
- AB3A7D6A055E63B200CA83BE /* E3FFW_3DMFBin_Register.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C59055E63B100CA83BE /* E3FFW_3DMFBin_Register.c */; };
- AB3A7D6C055E63B200CA83BE /* E3FFW_3DMFBin_Writer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C5B055E63B100CA83BE /* E3FFW_3DMFBin_Writer.c */; };
+ AB3A7CA6055E63B200CA83BE /* E3GeometryBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B87055E63B100CA83BE /* E3GeometryBox.cpp */; };
+ AB3A7CA8055E63B200CA83BE /* E3GeometryCone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B89055E63B100CA83BE /* E3GeometryCone.cpp */; };
+ AB3A7CAA055E63B200CA83BE /* E3GeometryCylinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8B055E63B100CA83BE /* E3GeometryCylinder.cpp */; };
+ AB3A7CAC055E63B200CA83BE /* E3GeometryDisk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8D055E63B100CA83BE /* E3GeometryDisk.cpp */; };
+ AB3A7CAE055E63B200CA83BE /* E3GeometryEllipse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8F055E63B100CA83BE /* E3GeometryEllipse.cpp */; };
+ AB3A7CB0055E63B200CA83BE /* E3GeometryEllipsoid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B91055E63B100CA83BE /* E3GeometryEllipsoid.cpp */; };
+ AB3A7CB2055E63B200CA83BE /* E3GeometryGeneralPolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B93055E63B100CA83BE /* E3GeometryGeneralPolygon.cpp */; };
+ AB3A7CB4055E63B200CA83BE /* E3GeometryLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B95055E63B100CA83BE /* E3GeometryLine.cpp */; };
+ AB3A7CB6055E63B200CA83BE /* E3GeometryMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B97055E63B100CA83BE /* E3GeometryMarker.cpp */; };
+ AB3A7CB8055E63B200CA83BE /* E3GeometryMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B99055E63B100CA83BE /* E3GeometryMesh.cpp */; };
+ AB3A7CBA055E63B200CA83BE /* E3GeometryNURBCurve.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B9B055E63B100CA83BE /* E3GeometryNURBCurve.cpp */; };
+ AB3A7CBC055E63B200CA83BE /* E3GeometryNURBPatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B9D055E63B100CA83BE /* E3GeometryNURBPatch.cpp */; };
+ AB3A7CBE055E63B200CA83BE /* E3GeometryPixmapMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B9F055E63B100CA83BE /* E3GeometryPixmapMarker.cpp */; };
+ AB3A7CC0055E63B200CA83BE /* E3GeometryPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA1055E63B100CA83BE /* E3GeometryPoint.cpp */; };
+ AB3A7CC2055E63B200CA83BE /* E3GeometryPolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA3055E63B100CA83BE /* E3GeometryPolygon.cpp */; };
+ AB3A7CC4055E63B200CA83BE /* E3GeometryPolyhedron.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA5055E63B100CA83BE /* E3GeometryPolyhedron.cpp */; };
+ AB3A7CC6055E63B200CA83BE /* E3GeometryPolyLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA7055E63B100CA83BE /* E3GeometryPolyLine.cpp */; };
+ AB3A7CC8055E63B200CA83BE /* E3GeometryTorus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA9055E63B100CA83BE /* E3GeometryTorus.cpp */; };
+ AB3A7CCA055E63B200CA83BE /* E3GeometryTriangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BAB055E63B100CA83BE /* E3GeometryTriangle.cpp */; };
+ AB3A7CCC055E63B200CA83BE /* E3GeometryTriGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BAD055E63B100CA83BE /* E3GeometryTriGrid.cpp */; };
+ AB3A7CCE055E63B200CA83BE /* E3GeometryTriMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BAF055E63B100CA83BE /* E3GeometryTriMesh.cpp */; };
+ AB3A7CD0055E63B200CA83BE /* QD3DCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB2055E63B100CA83BE /* QD3DCamera.cpp */; };
+ AB3A7CD1055E63B200CA83BE /* QD3DController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB3055E63B100CA83BE /* QD3DController.cpp */; };
+ AB3A7CD2055E63B200CA83BE /* QD3DCustomElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB4055E63B100CA83BE /* QD3DCustomElements.cpp */; };
+ AB3A7CD3055E63B200CA83BE /* QD3DDrawContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB5055E63B100CA83BE /* QD3DDrawContext.cpp */; };
+ AB3A7CD4055E63B200CA83BE /* QD3DErrors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB6055E63B100CA83BE /* QD3DErrors.cpp */; };
+ AB3A7CD5055E63B200CA83BE /* QD3DExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB7055E63B100CA83BE /* QD3DExtension.cpp */; };
+ AB3A7CD6055E63B200CA83BE /* QD3DGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB8055E63B100CA83BE /* QD3DGeometry.cpp */; };
+ AB3A7CD7055E63B200CA83BE /* QD3DGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB9055E63B100CA83BE /* QD3DGroup.cpp */; };
+ AB3A7CD8055E63B200CA83BE /* QD3DIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBA055E63B100CA83BE /* QD3DIO.cpp */; };
+ AB3A7CD9055E63B200CA83BE /* QD3DLight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBB055E63B100CA83BE /* QD3DLight.cpp */; };
+ AB3A7CDA055E63B200CA83BE /* QD3DMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBC055E63B100CA83BE /* QD3DMain.cpp */; };
+ AB3A7CDB055E63B200CA83BE /* QD3DMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBD055E63B100CA83BE /* QD3DMath.cpp */; };
+ AB3A7CDC055E63B200CA83BE /* QD3DMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBE055E63B100CA83BE /* QD3DMemory.cpp */; };
+ AB3A7CDD055E63B200CA83BE /* QD3DPick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBF055E63B100CA83BE /* QD3DPick.cpp */; };
+ AB3A7CDE055E63B200CA83BE /* QD3DRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC0055E63B100CA83BE /* QD3DRenderer.cpp */; };
+ AB3A7CDF055E63B200CA83BE /* QD3DSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC1055E63B100CA83BE /* QD3DSet.cpp */; };
+ AB3A7CE0055E63B200CA83BE /* QD3DShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC2055E63B100CA83BE /* QD3DShader.cpp */; };
+ AB3A7CE1055E63B200CA83BE /* QD3DStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC3055E63B100CA83BE /* QD3DStorage.cpp */; };
+ AB3A7CE2055E63B200CA83BE /* QD3DString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC4055E63B100CA83BE /* QD3DString.cpp */; };
+ AB3A7CE3055E63B200CA83BE /* QD3DStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC5055E63B100CA83BE /* QD3DStyle.cpp */; };
+ AB3A7CE4055E63B200CA83BE /* QD3DTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC6055E63B100CA83BE /* QD3DTransform.cpp */; };
+ AB3A7CE5055E63B200CA83BE /* QD3DView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC7055E63B100CA83BE /* QD3DView.cpp */; };
+ AB3A7CE6055E63B200CA83BE /* QD3DViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC8055E63B100CA83BE /* QD3DViewer.cpp */; };
+ AB3A7CE7055E63B200CA83BE /* E3ArrayOrList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BCA055E63B100CA83BE /* E3ArrayOrList.cpp */; };
+ AB3A7CE9055E63B200CA83BE /* E3ClassTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BCC055E63B100CA83BE /* E3ClassTree.cpp */; };
+ AB3A7CEB055E63B200CA83BE /* E3Compatibility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BCE055E63B100CA83BE /* E3Compatibility.cpp */; };
+ AB3A7CEE055E63B200CA83BE /* E3ErrorManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD1055E63B100CA83BE /* E3ErrorManager.cpp */; };
+ AB3A7CF0055E63B200CA83BE /* E3Globals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD3055E63B100CA83BE /* E3Globals.cpp */; };
+ AB3A7CF2055E63B200CA83BE /* E3HashTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD5055E63B100CA83BE /* E3HashTable.cpp */; };
+ AB3A7CF4055E63B200CA83BE /* E3Pool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD7055E63B100CA83BE /* E3Pool.cpp */; };
+ AB3A7CF8055E63B200CA83BE /* E3System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BDB055E63B100CA83BE /* E3System.cpp */; };
+ AB3A7CFA055E63B200CA83BE /* E3Tessellate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BDD055E63B100CA83BE /* E3Tessellate.cpp */; };
+ AB3A7CFC055E63B200CA83BE /* E3Utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BDF055E63B100CA83BE /* E3Utils.cpp */; };
+ AB3A7CFF055E63B200CA83BE /* E3Camera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE3055E63B100CA83BE /* E3Camera.cpp */; };
+ AB3A7D01055E63B200CA83BE /* E3Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE5055E63B100CA83BE /* E3Controller.cpp */; };
+ AB3A7D03055E63B200CA83BE /* E3CustomElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE7055E63B100CA83BE /* E3CustomElements.cpp */; };
+ AB3A7D05055E63B200CA83BE /* E3DrawContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE9055E63B100CA83BE /* E3DrawContext.cpp */; };
+ AB3A7D07055E63B200CA83BE /* E3Errors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BEB055E63B100CA83BE /* E3Errors.cpp */; };
+ AB3A7D09055E63B200CA83BE /* E3Extension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BED055E63B100CA83BE /* E3Extension.cpp */; };
+ AB3A7D0B055E63B200CA83BE /* E3Group.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BEF055E63B100CA83BE /* E3Group.cpp */; };
+ AB3A7D0D055E63B200CA83BE /* E3IO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF1055E63B100CA83BE /* E3IO.cpp */; };
+ AB3A7D0F055E63B200CA83BE /* E3IOData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF3055E63B100CA83BE /* E3IOData.cpp */; };
+ AB3A7D11055E63B200CA83BE /* E3Light.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF5055E63B100CA83BE /* E3Light.cpp */; };
+ AB3A7D13055E63B200CA83BE /* E3Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF7055E63B100CA83BE /* E3Main.cpp */; };
+ AB3A7D15055E63B200CA83BE /* E3Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF9055E63B100CA83BE /* E3Math.cpp */; };
+ AB3A7D17055E63B200CA83BE /* E3Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFB055E63B100CA83BE /* E3Memory.cpp */; };
+ AB3A7D19055E63B200CA83BE /* E3Pick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFD055E63B100CA83BE /* E3Pick.cpp */; };
+ AB3A7D1B055E63B200CA83BE /* E3Renderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFF055E63B100CA83BE /* E3Renderer.cpp */; };
+ AB3A7D1D055E63B200CA83BE /* E3Set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C01055E63B100CA83BE /* E3Set.cpp */; };
+ AB3A7D1F055E63B200CA83BE /* E3Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C03055E63B100CA83BE /* E3Shader.cpp */; };
+ AB3A7D21055E63B200CA83BE /* E3Storage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C05055E63B100CA83BE /* E3Storage.cpp */; };
+ AB3A7D23055E63B200CA83BE /* E3String.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C07055E63B100CA83BE /* E3String.cpp */; };
+ AB3A7D25055E63B200CA83BE /* E3Style.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C09055E63B100CA83BE /* E3Style.cpp */; };
+ AB3A7D27055E63B200CA83BE /* E3Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0B055E63B100CA83BE /* E3Texture.cpp */; };
+ AB3A7D29055E63B200CA83BE /* E3Transform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0D055E63B100CA83BE /* E3Transform.cpp */; };
+ AB3A7D2B055E63B200CA83BE /* E3View.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0F055E63B100CA83BE /* E3View.cpp */; };
+ AB3A7D2D055E63B200CA83BE /* E3Viewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C12055E63B100CA83BE /* E3Viewer.cpp */; };
+ AB3A7D2F055E63B200CA83BE /* E3ViewerOldAPIs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C14055E63B100CA83BE /* E3ViewerOldAPIs.cpp */; };
+ AB3A7D32055E63B200CA83BE /* GLCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C19055E63B100CA83BE /* GLCamera.cpp */; };
+ AB3A7D36055E63B200CA83BE /* GLDrawContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C1D055E63B100CA83BE /* GLDrawContext.cpp */; };
+ AB3A7D39055E63B200CA83BE /* GLUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C20055E63B100CA83BE /* GLUtils.cpp */; };
+ AB3A7D3B055E63B200CA83BE /* GNGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C23055E63B100CA83BE /* GNGeometry.cpp */; };
+ AB3A7D3E055E63B200CA83BE /* GNRegister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C26055E63B100CA83BE /* GNRegister.cpp */; };
+ AB3A7D40055E63B200CA83BE /* GNRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C28055E63B100CA83BE /* GNRenderer.cpp */; };
+ AB3A7D42055E63B200CA83BE /* IRGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C2B055E63B100CA83BE /* IRGeometry.cpp */; };
+ AB3A7D44055E63B200CA83BE /* IRGeometryTriMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C2D055E63B100CA83BE /* IRGeometryTriMesh.cpp */; };
+ AB3A7D46055E63B200CA83BE /* IRLights.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C2F055E63B100CA83BE /* IRLights.cpp */; };
+ AB3A7D49055E63B200CA83BE /* IRRegister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C32055E63B100CA83BE /* IRRegister.cpp */; };
+ AB3A7D4B055E63B200CA83BE /* IRRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C34055E63B100CA83BE /* IRRenderer.cpp */; };
+ AB3A7D4D055E63B200CA83BE /* IRTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C36055E63B100CA83BE /* IRTexture.cpp */; };
+ AB3A7D4F055E63B200CA83BE /* IRTransparent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C38055E63B100CA83BE /* IRTransparent.cpp */; };
+ AB3A7D51055E63B200CA83BE /* IRTriBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C3A055E63B100CA83BE /* IRTriBuffer.cpp */; };
+ AB3A7D53055E63B200CA83BE /* IRUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C3C055E63B100CA83BE /* IRUpdate.cpp */; };
+ AB3A7D5E055E63B200CA83BE /* E3IOFileFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C49055E63B100CA83BE /* E3IOFileFormat.cpp */; };
+ AB3A7D60055E63B200CA83BE /* E3FFR_3DMF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C4D055E63B100CA83BE /* E3FFR_3DMF.cpp */; };
+ AB3A7D62055E63B200CA83BE /* E3FFR_3DMF_Bin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C4F055E63B100CA83BE /* E3FFR_3DMF_Bin.cpp */; };
+ AB3A7D64055E63B200CA83BE /* E3FFR_3DMF_Geometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C51055E63B100CA83BE /* E3FFR_3DMF_Geometry.cpp */; };
+ AB3A7D66055E63B200CA83BE /* E3FFR_3DMF_Text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C53055E63B100CA83BE /* E3FFR_3DMF_Text.cpp */; };
+ AB3A7D68055E63B200CA83BE /* E3FFW_3DMFBin_Geometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C57055E63B100CA83BE /* E3FFW_3DMFBin_Geometry.cpp */; };
+ AB3A7D6A055E63B200CA83BE /* E3FFW_3DMFBin_Register.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C59055E63B100CA83BE /* E3FFW_3DMFBin_Register.cpp */; };
+ AB3A7D6C055E63B200CA83BE /* E3FFW_3DMFBin_Writer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C5B055E63B100CA83BE /* E3FFW_3DMFBin_Writer.cpp */; };
AB83B5F0055E72B90034F56A /* Quesa.h in Headers */ = {isa = PBXBuildFile; fileRef = AB83B5D8055E72B90034F56A /* Quesa.h */; settings = {ATTRIBUTES = (Public, ); }; };
AB83B5F1055E72B90034F56A /* QuesaCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = AB83B5D9055E72B90034F56A /* QuesaCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
AB83B5F2055E72B90034F56A /* QuesaController.h in Headers */ = {isa = PBXBuildFile; fileRef = AB83B5DA055E72B90034F56A /* QuesaController.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -132,120 +132,120 @@
AB83B604055E72B90034F56A /* QuesaTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = AB83B5EC055E72B90034F56A /* QuesaTransform.h */; settings = {ATTRIBUTES = (Public, ); }; };
AB83B605055E72B90034F56A /* QuesaView.h in Headers */ = {isa = PBXBuildFile; fileRef = AB83B5ED055E72B90034F56A /* QuesaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
AB83B606055E72B90034F56A /* QuesaViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = AB83B5EE055E72B90034F56A /* QuesaViewer.h */; settings = {ATTRIBUTES = (Public, ); }; };
- AB83B99E055E77880034F56A /* E3MacDebug.c in Sources */ = {isa = PBXBuildFile; fileRef = AB83B95B055E77870034F56A /* E3MacDebug.c */; };
- AB83B99F055E77880034F56A /* E3MacDrawContext.c in Sources */ = {isa = PBXBuildFile; fileRef = AB83B95C055E77870034F56A /* E3MacDrawContext.c */; };
- AB83B9A0055E77880034F56A /* E3MacErrors.c in Sources */ = {isa = PBXBuildFile; fileRef = AB83B95D055E77870034F56A /* E3MacErrors.c */; };
- AB83B9A7055E77880034F56A /* E3MacStorage.c in Sources */ = {isa = PBXBuildFile; fileRef = AB83B964055E77870034F56A /* E3MacStorage.c */; };
- AB83B9A8055E77880034F56A /* E3MacSystem.c in Sources */ = {isa = PBXBuildFile; fileRef = AB83B965055E77870034F56A /* E3MacSystem.c */; };
- B1756B3D080A73C00056134C /* QD3DSet.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC1055E63B100CA83BE /* QD3DSet.c */; };
- B1756B3E080A73C00056134C /* E3GeometryMarker.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B97055E63B100CA83BE /* E3GeometryMarker.c */; };
- B1756B3F080A73C00056134C /* E3Utils.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BDF055E63B100CA83BE /* E3Utils.c */; };
- B1756B40080A73C00056134C /* E3GeometryTriMesh.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BAF055E63B100CA83BE /* E3GeometryTriMesh.c */; };
- B1756B41080A73C00056134C /* E3GeometryPolyhedron.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA5055E63B100CA83BE /* E3GeometryPolyhedron.c */; };
- B1756B42080A73C00056134C /* QD3DPick.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBF055E63B100CA83BE /* QD3DPick.c */; };
- B1756B44080A73C00056134C /* IRLights.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C2F055E63B100CA83BE /* IRLights.c */; };
- B1756B45080A73C00056134C /* E3Controller.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE5055E63B100CA83BE /* E3Controller.c */; };
- B1756B46080A73C00056134C /* E3GeometryCone.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B89055E63B100CA83BE /* E3GeometryCone.c */; };
- B1756B47080A73C00056134C /* IRGeometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C2B055E63B100CA83BE /* IRGeometry.c */; };
- B1756B48080A73C00056134C /* E3Light.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF5055E63B100CA83BE /* E3Light.c */; };
- B1756B49080A73C00056134C /* E3Transform.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0D055E63B100CA83BE /* E3Transform.c */; };
- B1756B4A080A73C00056134C /* QD3DIO.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBA055E63B100CA83BE /* QD3DIO.c */; };
- B1756B4B080A73C00056134C /* E3IO.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF1055E63B100CA83BE /* E3IO.c */; };
- B1756B4C080A73C00056134C /* E3GeometryTorus.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA9055E63B100CA83BE /* E3GeometryTorus.c */; };
- B1756B4D080A73C00056134C /* E3FFR_3DMF_Bin.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C4F055E63B100CA83BE /* E3FFR_3DMF_Bin.c */; };
- B1756B4E080A73C00056134C /* QD3DString.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC4055E63B100CA83BE /* QD3DString.c */; };
- B1756B4F080A73C00056134C /* IRRenderer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C34055E63B100CA83BE /* IRRenderer.c */; };
- B1756B50080A73C00056134C /* IRTransparent.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C38055E63B100CA83BE /* IRTransparent.c */; };
- B1756B51080A73C00056134C /* E3Texture.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0B055E63B100CA83BE /* E3Texture.c */; };
- B1756B52080A73C00056134C /* E3MacErrors.c in Sources */ = {isa = PBXBuildFile; fileRef = AB83B95D055E77870034F56A /* E3MacErrors.c */; };
- B1756B53080A73C00056134C /* E3GeometryEllipse.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8F055E63B100CA83BE /* E3GeometryEllipse.c */; };
- B1756B54080A73C00056134C /* GLUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C20055E63B100CA83BE /* GLUtils.c */; };
- B1756B55080A73C00056134C /* GNGeometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C23055E63B100CA83BE /* GNGeometry.c */; };
- B1756B56080A73C00056134C /* E3Memory.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFB055E63B100CA83BE /* E3Memory.c */; };
- B1756B57080A73C00056134C /* QD3DViewer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC8055E63B100CA83BE /* QD3DViewer.c */; };
- B1756B58080A73C00056134C /* E3Extension.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BED055E63B100CA83BE /* E3Extension.c */; };
- B1756B59080A73C00056134C /* QD3DLight.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBB055E63B100CA83BE /* QD3DLight.c */; };
- B1756B5A080A73C00056134C /* QD3DCamera.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB2055E63B100CA83BE /* QD3DCamera.c */; };
- B1756B5B080A73C00056134C /* E3Geometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B85055E63B100CA83BE /* E3Geometry.c */; };
- B1756B5C080A73C00056134C /* E3GeometryLine.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B95055E63B100CA83BE /* E3GeometryLine.c */; };
- B1756B5D080A73C00056134C /* E3FFR_3DMF_Text.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C53055E63B100CA83BE /* E3FFR_3DMF_Text.c */; };
- B1756B5E080A73C00056134C /* QD3DGeometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB8055E63B100CA83BE /* QD3DGeometry.c */; };
- B1756B5F080A73C00056134C /* QD3DRenderer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC0055E63B100CA83BE /* QD3DRenderer.c */; };
- B1756B60080A73C00056134C /* E3Tessellate.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BDD055E63B100CA83BE /* E3Tessellate.c */; };
- B1756B61080A73C00056134C /* E3Storage.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C05055E63B100CA83BE /* E3Storage.c */; };
- B1756B63080A73C00056134C /* E3GeometryPoint.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA1055E63B100CA83BE /* E3GeometryPoint.c */; };
- B1756B64080A73C00056134C /* E3ViewerOldAPIs.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C14055E63B100CA83BE /* E3ViewerOldAPIs.c */; };
- B1756B65080A73C00056134C /* E3Pool.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD7055E63B100CA83BE /* E3Pool.c */; };
- B1756B66080A73C00056134C /* E3FFW_3DMFBin_Register.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C59055E63B100CA83BE /* E3FFW_3DMFBin_Register.c */; };
- B1756B67080A73C00056134C /* E3GeometryGeneralPolygon.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B93055E63B100CA83BE /* E3GeometryGeneralPolygon.c */; };
- B1756B68080A73C00056134C /* QD3DStyle.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC5055E63B100CA83BE /* QD3DStyle.c */; };
- B1756B69080A73C00056134C /* E3GeometryPolyLine.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BA7055E63B100CA83BE /* E3GeometryPolyLine.c */; };
- B1756B6A080A73C00056134C /* E3FFR_3DMF.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C4D055E63B100CA83BE /* E3FFR_3DMF.c */; };
- B1756B6B080A73C00056134C /* E3MacDebug.c in Sources */ = {isa = PBXBuildFile; fileRef = AB83B95B055E77870034F56A /* E3MacDebug.c */; };
- B1756B6C080A73C00056134C /* E3Compatibility.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BCE055E63B100CA83BE /* E3Compatibility.c */; };
- B1756B6D080A73C00056134C /* GLTextureManager.c in Sources */ = {isa = PBXBuildFile; fileRef = BE6FD691076B88A800587852 /* GLTextureManager.c */; };
- B1756B6E080A73C00056134C /* E3Group.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BEF055E63B100CA83BE /* E3Group.c */; };
- B1756B6F080A73C00056134C /* QD3DShader.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC2055E63B100CA83BE /* QD3DShader.c */; };
- B1756B70080A73C00056134C /* E3DrawContext.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE9055E63B100CA83BE /* E3DrawContext.c */; };
- B1756B71080A73C00056134C /* E3View.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C0F055E63B100CA83BE /* E3View.c */; };
- B1756B72080A73C00056134C /* QD3DMain.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BBC055E63B100CA83BE /* QD3DMain.c */; };
- B1756B73080A73C00056134C /* E3Camera.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BE3055E63B100CA83BE /* E3Camera.c */; };
- B1756B74080A73C00056134C /* GNRenderer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C28055E63B100CA83BE /* GNRenderer.c */; };
- B1756B75080A73C00056134C /* IRRegister.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C32055E63B100CA83BE /* IRRegister.c */; };
- B1756B76080A73C00056134C /* E3GeometryCylinder.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8B055E63B100CA83BE /* E3GeometryCylinder.c */; };
- B1756B77080A73C00056134C /* GLDrawContext.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C1D055E63B100CA83BE /* GLDrawContext.c */; };
- B1756B78080A73C00056134C /* E3GeometryMesh.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B99055E63B100CA83BE /* E3GeometryMesh.c */; };
- B1756B79080A73C00056134C /* QD3DController.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB3055E63B100CA83BE /* QD3DController.c */; };
- B1756B7A080A73C00056134C /* E3Style.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C09055E63B100CA83BE /* E3Style.c */; };
- B1756B7B080A73C00056134C /* E3GeometryDisk.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B8D055E63B100CA83BE /* E3GeometryDisk.c */; };
- B1756B7D080A73C00056134C /* E3ErrorManager.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BD1055E63B100CA83BE /* E3ErrorManager.c */; };
- B1756B7E080A73C00056134C /* E3IOData.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF3055E63B100CA83BE /* E3IOData.c */; };
- B1756B7F080A73C00056134C /* E3GeometryBox.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B87055E63B100CA83BE /* E3GeometryBox.c */; };
- B1756B80080A73C00056134C /* E3Renderer.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFF055E63B100CA83BE /* E3Renderer.c */; };
- B1756B81080A73C00056134C /* E3Math.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BF9055E63B100CA83BE /* E3Math.c */; };
- B1756B82080A73C00056134C /* QD3DTransform.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BC6055E63B100CA83BE /* QD3DTransform.c */; };
- B1756B83080A73C00056134C /* E3FFR_3DMF_Geometry.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C51055E63B100CA83BE /* E3FFR_3DMF_Geometry.c */; };
- B1756B84080A73C00056134C /* E3GeometryTriangle.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BAB055E63B100CA83BE /* E3GeometryTriangle.c */; };
- B1756B85080A73C00056134C /* IRTexture.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7C36055E63B100CA83BE /* IRTexture.c */; };
- B1756B86080A73C00056134C /* E3MacStorage.c in Sources */ = {isa = PBXBuildFile; fileRef = AB83B964055E77870034F56A /* E3MacStorage.c */; };
- B1756B87080A73C00056134C /* QD3DErrors.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB6055E63B100CA83BE /* QD3DErrors.c */; };
- B1756B88080A73C00056134C /* E3Pick.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BFD055E63B100CA83BE /* E3Pick.c */; };
- B1756B89080A73C00056134C /* QD3DGroup.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB9055E63B100CA83BE /* QD3DGroup.c */; };
- B1756B8A080A73C00056134C /* QD3DExtension.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7BB7055E63B100CA83BE /* QD3DExtension.c */; };
- B1756B8B080A73C00056134C /* E3GeometryEllipsoid.c in Sources */ = {isa = PBXBuildFile; fileRef = AB3A7B91055E63B100CA83BE /* E3GeometryEllipsoid.c */; };
- B1756B8C080A73C00056134C /* IRGeometryTriMesh.c in Sources */ =...
[truncated message content] |
|
From: <jww...@us...> - 2016-10-18 01:46:31
|
Revision: 3349
http://sourceforge.net/p/quesa/code/3349
Author: jwwalker
Date: 2016-10-18 01:46:29 +0000 (Tue, 18 Oct 2016)
Log Message:
-----------
Use zeroing weak references in texture cache.
Modified Paths:
--------------
trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.c
Modified: trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.c
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.c 2016-10-18 00:59:36 UTC (rev 3348)
+++ trunk/quesa/Development/Source/Renderers/Common/GLTextureManager.c 2016-10-18 01:46:29 UTC (rev 3349)
@@ -13,7 +13,7 @@
performance optimization.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -55,6 +55,8 @@
#include "GLTextureManager.h"
#include "GLGPUSharing.h"
#include "E3Texture.h"
+#include "E3CustomElements.h"
+#include "CQ3WeakObjectRef.h"
#ifndef __cplusplus
#error This file must be compiled as C++.
@@ -73,7 +75,12 @@
// Cached texture data
struct TQ3CachedTexture
{
- CQ3ObjectRef cachedTextureObject;
+ TQ3CachedTexture();
+ TQ3CachedTexture( TQ3TextureObject inQuesaTexture, GLuint inGLTexture );
+ ~TQ3CachedTexture();
+
+ CQ3WeakObjectRef cachedTextureObject;
+ TQ3Object sortKey;
TQ3Uns32 editIndexTexture;
TQ3Uns32 editIndexStorage;
GLuint glTextureName;
@@ -85,55 +92,19 @@
{
bool operator()( TQ3CachedTexturePtr inOne, TQ3CachedTexturePtr inTwo ) const
{
- return inOne->cachedTextureObject.get() < inTwo->cachedTextureObject.get();
+ return inOne->sortKey < inTwo->sortKey;
}
};
typedef std::set< TQ3CachedTexturePtr, CompByTexOb > CachedTextureList;
-
-}
-
-// TQ3TextureCache: object holding cached textures for a number of GL contexts
-// that share texture memory. This declaration cannot be in an unnamed namespace,
-// because it needs to match the struct TQ3TextureCache* member of the TQ3InteractiveData
-// structure.
-struct TQ3TextureCache : public CQ3GPSharedCache
-{
- virtual ~TQ3TextureCache();
-
- CachedTextureList cachedTextures;
-};
-
-
-//=============================================================================
-// Internal constants
-//-----------------------------------------------------------------------------
-
-namespace
-{
- const TQ3Uns32 kTextureCacheKey = Q3_FOUR_CHARACTER_CONSTANT('t', 'x', 'c', 'k');
+#if Q3_DEBUG
+ int sCachedTextureCount = 0;
+ long long sCachedTextureByteCount = 0;
+#endif
}
-//=============================================================================
-// Static variables
-//-----------------------------------------------------------------------------
-
-
-//=============================================================================
-// Internal functions
-//-----------------------------------------------------------------------------
-
-TQ3TextureCache::~TQ3TextureCache()
-{
- for (CachedTextureList::iterator i = cachedTextures.begin();
- i != cachedTextures.end(); ++i)
- {
- delete *i;
- }
-}
-
/*!
@function GetPixmapTextureStorage
@abstract Get the data from a pixmap texture object.
@@ -211,9 +182,76 @@
}
+TQ3CachedTexture::TQ3CachedTexture()
+ : editIndexTexture( 0 )
+ , editIndexStorage( 0 )
+ , glTextureName( 0 )
+{
+}
+TQ3CachedTexture::TQ3CachedTexture( TQ3TextureObject inQuesaTexture, GLuint inGLTexture )
+ : cachedTextureObject( inQuesaTexture )
+ , sortKey( inQuesaTexture )
+ , editIndexTexture( Q3Shared_GetEditIndex( inQuesaTexture ) )
+ , editIndexStorage( GetStorageEditIndex( inQuesaTexture ) )
+ , glTextureName( inGLTexture )
+{
+}
+TQ3CachedTexture::~TQ3CachedTexture()
+{
+}
+// TQ3TextureCache: object holding cached textures for a number of GL contexts
+// that share texture memory. This declaration cannot be in an unnamed namespace,
+// because it needs to match the struct TQ3TextureCache* member of the TQ3InteractiveData
+// structure.
+struct TQ3TextureCache : public CQ3GPSharedCache
+{
+ TQ3TextureCache();
+ virtual ~TQ3TextureCache();
+
+ CachedTextureList cachedTextures;
+};
+
+
+//=============================================================================
+// Internal constants
+//-----------------------------------------------------------------------------
+
+namespace
+{
+ const TQ3Uns32 kTextureCacheKey = Q3_FOUR_CHARACTER_CONSTANT('t', 'x', 'c', 'k');
+}
+
+//=============================================================================
+// Static variables
+//-----------------------------------------------------------------------------
+
+
+
+//=============================================================================
+// Internal functions
+//-----------------------------------------------------------------------------
+
+TQ3TextureCache::TQ3TextureCache()
+{
+ Q3_MESSAGE_FMT("+TQ3TextureCache");
+}
+
+TQ3TextureCache::~TQ3TextureCache()
+{
+ Q3_MESSAGE_FMT("-TQ3TextureCache");
+ for (CachedTextureList::iterator i = cachedTextures.begin();
+ i != cachedTextures.end(); ++i)
+ {
+ delete *i;
+ }
+}
+
+
+
+
/*!
@function RemoveCachedTexture
@abstract Remove a texture record from a texture cache.
@@ -233,7 +271,7 @@
Q3_ASSERT( !glIsTexture( textureName ) );
txCache->cachedTextures.erase( toRemove );
-
+
delete theRec;
}
CATCH_ALL
@@ -318,7 +356,7 @@
TRY
{
TQ3CachedTexture toFind;
- toFind.cachedTextureObject = CQ3ObjectRef( Q3Shared_GetReference( texture ) );
+ toFind.sortKey = texture;
CachedTextureList::iterator foundIt = txCache->cachedTextures.find( &toFind );
@@ -365,15 +403,8 @@
TRY
{
- TQ3CachedTexture* newRec = new TQ3CachedTexture;
+ theResult = new TQ3CachedTexture( inTexture, inGLTextureName );
- newRec->cachedTextureObject = CQ3ObjectRef( Q3Shared_GetReference(
- inTexture ) );
- newRec->editIndexTexture = Q3Shared_GetEditIndex( inTexture );
- newRec->editIndexStorage = GetStorageEditIndex( inTexture );
- newRec->glTextureName = inGLTextureName;
- theResult = newRec;
-
txCache->cachedTextures.insert( theResult );
}
CATCH_ALL
@@ -415,10 +446,8 @@
TQ3CachedTexturePtr cachedTexture = *iter;
- // If we hold the last reference to this texture, release it
- TQ3TextureObject theTexture = cachedTexture->cachedTextureObject.get();
-
- if ( (theTexture != NULL) && ! Q3Shared_IsReferenced( theTexture ) )
+ // If we our reference to this texture has been zeroed, forget it.
+ if ( ! cachedTexture->cachedTextureObject.isvalid() )
{
RemoveCachedTexture( txCache, iter );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2016-10-18 00:59:38
|
Revision: 3348
http://sourceforge.net/p/quesa/code/3348
Author: jwwalker
Date: 2016-10-18 00:59:36 +0000 (Tue, 18 Oct 2016)
Log Message:
-----------
Fix autorelease bug in Quesa for Cocoa.
Modified Paths:
--------------
trunk/quesa/Development/Source/Renderers/Common/GLCocoaContext.m
Modified: trunk/quesa/Development/Source/Renderers/Common/GLCocoaContext.m
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLCocoaContext.m 2016-09-27 17:06:31 UTC (rev 3347)
+++ trunk/quesa/Development/Source/Renderers/Common/GLCocoaContext.m 2016-10-18 00:59:36 UTC (rev 3348)
@@ -9,7 +9,7 @@
access the Cocoa OpenGL API then this is handled as a special case.
COPYRIGHT:
- Copyright (c) 1999-2014 , Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -270,9 +270,15 @@
void CocoaGLContext::SetCurrentBase( TQ3Boolean inForceSet )
{
- // Activate the context
- if(inForceSet || ![[NSOpenGLContext currentContext] isEqual:glContext])
- [glContext makeCurrentContext];
+ // The autorelease pool fixes a strange bug seen on OS 10.10 and later.
+ // When one CocoaGLContext was destroyed and another was created for the
+ // same NSView, the new one disappeared after the first render.
+ @autoreleasepool
+ {
+ // Activate the context
+ if (inForceSet || ![[NSOpenGLContext currentContext] isEqual:glContext])
+ [glContext makeCurrentContext];
+ }
}
void CocoaGLContext::SetCurrent( TQ3Boolean inForceSet )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2016-09-27 17:06:34
|
Revision: 3347
http://sourceforge.net/p/quesa/code/3347
Author: jwwalker
Date: 2016-09-27 17:06:31 +0000 (Tue, 27 Sep 2016)
Log Message:
-----------
Implemented face tolerance when picking 2D geometry with window point or world ray picks.
Modified Paths:
--------------
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.c
trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.c
trunk/quesa/Development/Source/Core/Glue/QD3DMath.c
trunk/quesa/Development/Source/Core/Glue/QD3DPick.c
trunk/quesa/Development/Source/Core/System/E3Math.c
trunk/quesa/Development/Source/Core/System/E3Math_Intersect.cpp
trunk/quesa/Development/Source/Core/System/E3Math_Intersect.h
trunk/quesa/Development/Source/Core/System/E3Pick.c
trunk/quesa/Development/Source/Core/System/E3Pick.h
trunk/quesa/Development/Source/Core/System/E3View.c
trunk/quesa/SDK/Includes/Quesa/QuesaMathOperators.hpp
trunk/quesa/SDK/Includes/Quesa/QuesaPick.h
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.c
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.c 2016-08-09 23:40:33 UTC (rev 3346)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriMesh.c 2016-09-27 17:06:31 UTC (rev 3347)
@@ -5,7 +5,7 @@
Implementation of Quesa Pixmap Marker geometry class.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -52,6 +52,7 @@
#include "E3Geometry.h"
#include "E3GeometryTriMesh.h"
#include "E3ErrorManager.h"
+#include "QuesaMathOperators.hpp"
@@ -951,10 +952,10 @@
// e3geom_trimesh_pick_with_ray : TriMesh ray picking method.
//-----------------------------------------------------------------------------
static TQ3Status
-e3geom_trimesh_pick_with_ray(TQ3ViewObject theView,
+e3geom_trimesh_pick_with_ray( TQ3ViewObject theView,
TQ3PickObject thePick,
const TQ3Ray3D *theRay,
- const TQ3TriMeshData *geomData)
+ const TQ3TriMeshData *geomData )
{ TQ3Uns32 n, numPoints, v0, v1, v2;
TQ3Boolean haveUV, cullBackface;
TQ3Param2D hitUV, *resultUV;
@@ -965,10 +966,90 @@
TQ3Vector3D hitNormal;
TQ3Point3D hitXYZ;
TQ3Param3D theHit;
+ TQ3BoundingBox worldBounds;
+
- // Transform our points
+ // Check for face tolerance
+ float faceTolerance;
+ E3Pick_GetFaceTolerance( thePick, &faceTolerance );
+ float toleranceSquared = faceTolerance * faceTolerance;
+ bool useTolerance = toleranceSquared > kQ3RealZero;
+
+
+ // In case we are using face tolerance, find out whether we are doing a
+ // window point pick.
+ bool isWindowPointPick = (E3Pick_GetType( thePick ) == kQ3PickTypeWindowPoint);
+
+
+ // If using tolerance in window space, we will need to transform from
+ // world to window space.
+ TQ3Matrix4x4 worldToWindow;
+ if ( useTolerance && isWindowPointPick )
+ {
+ TQ3Matrix4x4 worldToFrustum, frustumToWindow;
+ E3View_GetWorldToFrustumMatrixState( theView, &worldToFrustum );
+ E3View_GetFrustumToWindowMatrixState( theView, &frustumToWindow );
+ worldToWindow = worldToFrustum * frustumToWindow;
+ }
+
+
+ // Test whether the ray hits the bounding box, as a first approximation.
+ const TQ3Matrix4x4* localToWorld = E3View_State_GetMatrixLocalToWorld(theView);
+ if (useTolerance)
+ {
+ if (isWindowPointPick)
+ {
+ TQ3Matrix4x4 localToWindow = *localToWorld * worldToWindow;
+ TQ3BoundingBox windowBounds;
+ E3BoundingBox_Transform( &geomData->bBox, &localToWindow, &windowBounds );
+ // Expand window bounds by tolerance in x and y directions.
+ windowBounds.min.x -= faceTolerance;
+ windowBounds.min.y -= faceTolerance;
+ windowBounds.max.x += faceTolerance;
+ windowBounds.max.y += faceTolerance;
+ // Get the original window point from the pick.
+ TQ3Point2D pickPt;
+ E3WindowPointPick_GetPoint( thePick, &pickPt );
+ // If the pick point is outside the window bounds, we know it is a miss.
+ if ( (pickPt.x < windowBounds.min.x) ||
+ (pickPt.x > windowBounds.max.x) ||
+ (pickPt.y < windowBounds.min.y) ||
+ (pickPt.y > windowBounds.max.y) )
+ {
+ return kQ3Success;
+ }
+ }
+ else // world space test
+ {
+ E3BoundingBox_Transform( &geomData->bBox, localToWorld, &worldBounds );
+ // expand world bounds by tolerance in each direction.
+ worldBounds.min.x -= faceTolerance;
+ worldBounds.min.y -= faceTolerance;
+ worldBounds.min.z -= faceTolerance;
+ worldBounds.max.x += faceTolerance;
+ worldBounds.max.y += faceTolerance;
+ worldBounds.max.z += faceTolerance;
+ if (! E3Ray3D_IntersectBoundingBox( theRay, &worldBounds, NULL ))
+ {
+ // The ray misses the bounds, so it misses the mesh.
+ return kQ3Success;
+ }
+ }
+ }
+ else // no tolerance to worry about, look for exact hit in world space
+ {
+ E3BoundingBox_Transform( &geomData->bBox, localToWorld, &worldBounds );
+ if (! E3Ray3D_IntersectBoundingBox( theRay, &worldBounds, NULL ))
+ {
+ // The ray misses the bounds, so it misses the mesh.
+ return kQ3Success;
+ }
+ }
+
+
+ // Transform our points from local to world coordinates
numPoints = geomData->numPoints;
worldPoints = (TQ3Point3D *) Q3Memory_Allocate(static_cast<TQ3Uns32>(numPoints * sizeof(TQ3Point3D)));
if (worldPoints == NULL)
@@ -993,8 +1074,8 @@
//
// Note we do not use any vertex/edge tolerances supplied for the pick, since
// QD3D's blue book appears to suggest neither are used for triangles.
- for (n = 0; n < geomData->numTriangles && qd3dStatus == kQ3Success; n++)
- {
+ for (n = 0; n < geomData->numTriangles && qd3dStatus == kQ3Success; ++n)
+ {
// Grab the vertex indicies
v0 = geomData->triangles[n].pointIndices[0];
v1 = geomData->triangles[n].pointIndices[1];
@@ -1003,21 +1084,56 @@
Q3_ASSERT(v1 >= 0 && v1 < geomData->numPoints);
Q3_ASSERT(v2 >= 0 && v2 < geomData->numPoints);
+ // For convenience, name the 3 world-space corners of the triangle
+ const TQ3Point3D& p0( worldPoints[v0] );
+ const TQ3Point3D& p1( worldPoints[v1] );
+ const TQ3Point3D& p2( worldPoints[v2] );
-
// Pick the triangle
- if (E3Ray3D_IntersectTriangle(theRay, &worldPoints[v0], &worldPoints[v1], &worldPoints[v2], cullBackface, &theHit))
+ TQ3Boolean didHit = kQ3False;
+ if (useTolerance)
+ {
+ if (E3Ray3D_NearTriangle( *theRay,
+ p0, p1, p2, cullBackface, theHit ))
{
+ TQ3Point3D triNearPt = (1.0f - theHit.u - theHit.v) * p0 +
+ theHit.u * p1 + theHit.v * p2;
+ TQ3Point3D rayNearPt = theRay->origin + theHit.w * theRay->direction;
+
+ if (isWindowPointPick)
+ {
+ TQ3Point3D triNearWin = triNearPt * worldToWindow;
+ TQ3Point3D rayNearWin = rayNearPt * worldToWindow;
+ triNearWin.z = rayNearWin.z = 0.0f;
+ float winDistSq = Q3LengthSquared3D( triNearWin - rayNearWin );
+ didHit = (winDistSq < toleranceSquared)? kQ3True : kQ3False;
+ }
+ else
+ {
+ float worldDistSq = Q3LengthSquared3D( rayNearPt - triNearPt );
+ didHit = (worldDistSq < toleranceSquared)? kQ3True : kQ3False;
+ }
+ }
+ }
+ else // require exact hits
+ {
+ didHit = E3Ray3D_IntersectTriangle( *theRay,
+ p0, p1, p2, cullBackface, theHit );
+ }
+
+ if (didHit)
+ {
// Create the triangle, and update the vertices to the transformed coordinates
e3geom_trimesh_triangle_new(theView, geomData, n, &worldTriangle);
- worldTriangle.vertices[0].point = worldPoints[v0];
- worldTriangle.vertices[1].point = worldPoints[v1];
- worldTriangle.vertices[2].point = worldPoints[v2];
+ worldTriangle.vertices[0].point = p0;
+ worldTriangle.vertices[1].point = p1;
+ worldTriangle.vertices[2].point = p2;
// Obtain the XYZ, normal, and UV for the hit point. We always return an
// XYZ and normal for the hit, however we need to cope with missing UVs.
- E3Triangle_InterpolateHit(theView,&worldTriangle, &theHit, &hitXYZ, &hitNormal, &hitUV, &haveUV);
+ E3Triangle_InterpolateHit(theView,&worldTriangle, &theHit,
+ &hitXYZ, &hitNormal, &hitUV, &haveUV);
resultUV = (haveUV ? &hitUV : NULL);
@@ -1028,11 +1144,10 @@
// Clean up
e3geom_trimesh_triangle_delete(&worldTriangle);
- }
}
+ }
-
// Clean up
Q3Memory_Free(&worldPoints);
@@ -1246,35 +1361,16 @@
//-----------------------------------------------------------------------------
static TQ3Status
e3geom_trimesh_pick_window_point(TQ3ViewObject theView, TQ3PickObject thePick, const TQ3TriMeshData *geomData)
-{ TQ3BoundingBox worldBounds;
- TQ3Point3D corners[8];
+{
TQ3Status qd3dStatus;
- TQ3WindowPointPickData pickData;
TQ3Ray3D theRay;
- // Get the pick data
- Q3WindowPointPick_GetData(thePick, &pickData);
-
-
-
- // Calculate the world-coordinate bounding box
- E3BoundingBox_Transform( &geomData->bBox,
- E3View_State_GetMatrixLocalToWorld(theView),
- &worldBounds );
- E3BoundingBox_GetCorners( &geomData->bBox, corners );
-
-
-
- // See if the pick ray falls within our bounding box
- //
- // If it does, we proceed to the actual triangle-level hit test.
E3View_GetRayThroughPickPoint(theView, &theRay);
- if (E3Ray3D_IntersectBoundingBox(&theRay, &worldBounds, NULL))
- qd3dStatus = e3geom_trimesh_pick_with_ray(theView, thePick, &theRay, geomData);
- else
- qd3dStatus = kQ3Success;
+
+ qd3dStatus = e3geom_trimesh_pick_with_ray( theView, thePick, &theRay,
+ geomData );
return(qd3dStatus);
}
@@ -1343,41 +1439,20 @@
static TQ3Status
e3geom_trimesh_pick_world_ray(TQ3ViewObject theView, TQ3PickObject thePick, const TQ3TriMeshData *geomData)
{
- TQ3BoundingBox worldBounds;
TQ3Status qd3dStatus;
- TQ3WorldRayPickData pickData;
- TQ3Point3D hitHYZ;
+ TQ3Ray3D pickRay;
// Get the pick data
- Q3WorldRayPick_GetData(thePick, &pickData);
+ E3WorldRayPick_GetRay(thePick, &pickRay);
- // Calculate the bounding box
- //
- // To get an exact bounding box, we'd have to transform all the points and then
- // use Q3BoundingBox_SetFromPoints3D, but that seems too much work for present
- // purposes.
- //
- // As a cheaper alternative we find the 8 corners of the local bounding box,
- // transform them, and then find the bounding box of those points.
- //
- // Note that simply transforming the min and max corners of the local bounding
- // box would be incorrect.
- E3BoundingBox_Transform( &geomData->bBox,
- E3View_State_GetMatrixLocalToWorld(theView),
- &worldBounds );
+ qd3dStatus = e3geom_trimesh_pick_with_ray( theView, thePick,
+ &pickRay, geomData );
-
- // See if we fall within the pick
- if (Q3Ray3D_IntersectBoundingBox(&pickData.ray, &worldBounds, &hitHYZ))
- qd3dStatus = e3geom_trimesh_pick_with_ray(theView, thePick, &pickData.ray, geomData);
- else
- qd3dStatus = kQ3Success;
-
return(qd3dStatus);
}
@@ -1435,7 +1510,8 @@
// e3geom_trimesh_bounds : TriMesh bounds method.
//-----------------------------------------------------------------------------
static TQ3Status
-e3geom_trimesh_bounds(TQ3ViewObject theView, TQ3ObjectType objectType, TQ3Object theObject, const void *objectData)
+e3geom_trimesh_bounds(TQ3ViewObject theView, TQ3ObjectType objectType,
+ TQ3Object theObject, const void *objectData)
{ TQ3Point3D boundCorners[8];
TQ3BoundingMethod boundingMethod;
const TQ3TriMeshData *geomData;
@@ -1483,10 +1559,10 @@
//-----------------------------------------------------------------------------
static TQ3AttributeSet *
e3geom_trimesh_get_attribute ( E3TriMesh* triMesh )
- {
+{
// Return the address of the geometry attribute set
return & triMesh->instanceData.geomData.triMeshAttributeSet ;
- }
+}
Modified: trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.c
===================================================================
--- trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.c 2016-08-09 23:40:33 UTC (rev 3346)
+++ trunk/quesa/Development/Source/Core/Geometry/E3GeometryTriangle.c 2016-09-27 17:06:31 UTC (rev 3347)
@@ -5,7 +5,7 @@
Implementation of Quesa Triangle geometry class.
COPYRIGHT:
- Copyright (c) 1999-2012, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -48,6 +48,8 @@
#include "E3Pick.h"
#include "E3Geometry.h"
#include "E3GeometryTriangle.h"
+#include "E3Math_Intersect.h"
+#include "QuesaMathOperators.hpp"
@@ -160,11 +162,11 @@
// e3geom_triangle_pick_with_ray : Triangle ray picking method.
//-----------------------------------------------------------------------------
static TQ3Status
-e3geom_triangle_pick_with_ray(TQ3ViewObject theView,
+e3geom_triangle_pick_with_ray( TQ3ViewObject theView,
TQ3PickObject thePick,
const TQ3Ray3D *theRay,
TQ3Object theObject,
- const void *objectData)
+ const void *objectData )
{ const TQ3TriangleData *instanceData = (const TQ3TriangleData *) objectData;
TQ3Boolean haveUV, cullBackface;
TQ3Param2D hitUV, *resultUV;
@@ -181,7 +183,8 @@
// Transform our points
for (n = 0; n < 3; n++)
- Q3View_TransformLocalToWorld(theView, &instanceData->vertices[n].point, &worldPoints[n]);
+ Q3View_TransformLocalToWorld(theView, &instanceData->vertices[n].point,
+ &worldPoints[n]);
@@ -191,12 +194,48 @@
+ // Check for face tolerance
+ float faceTolerance;
+ E3Pick_GetFaceTolerance( thePick, &faceTolerance );
+ float toleranceSquared = faceTolerance * faceTolerance;
+ bool useTolerance = toleranceSquared > kQ3RealZero;
+
+
// See if we fall within the pick
- //
- // Note we do not use any vertex/edge tolerances supplied for the pick, since
- // QD3D's blue book appears to suggest neither are used for triangles.
- if (Q3Ray3D_IntersectTriangle(theRay, &worldPoints[0], &worldPoints[1], &worldPoints[2], cullBackface, &theHit))
+ TQ3Boolean didHit = kQ3False;
+ if (useTolerance)
+ {
+ if (E3Ray3D_NearTriangle( *theRay,
+ worldPoints[0], worldPoints[1], worldPoints[2], cullBackface, theHit ))
{
+ TQ3Point3D triNearPt = (1.0f - theHit.u - theHit.v) * worldPoints[0] +
+ theHit.u * worldPoints[1] + theHit.v * worldPoints[2];
+ TQ3Point3D rayNearPt = theRay->origin + theHit.w * theRay->direction;
+
+ if (E3Pick_GetType( thePick ) == kQ3PickTypeWindowPoint)
+ {
+ TQ3Point2D triNearWin, rayNearWin;
+ E3View_TransformWorldToWindow( theView, &triNearPt, &triNearWin );
+ E3View_TransformWorldToWindow( theView, &rayNearPt, &rayNearWin );
+
+ float winDistSq = Q3LengthSquared2D( triNearWin - rayNearWin );
+ didHit = (winDistSq < toleranceSquared)? kQ3True : kQ3False;
+ }
+ else
+ {
+ float worldDistSq = Q3LengthSquared3D( rayNearPt - triNearPt );
+ didHit = (worldDistSq < toleranceSquared)? kQ3True : kQ3False;
+ }
+ }
+ }
+ else
+ {
+ didHit = E3Ray3D_IntersectTriangle( *theRay,
+ worldPoints[0], worldPoints[1], worldPoints[2], cullBackface, theHit );
+ }
+
+ if (didHit)
+ {
// Set up a temporary triangle that holds the world points
worldTriangle = *instanceData;
for (n = 0; n < 3; n++)
@@ -211,7 +250,7 @@
// Record the hit
qd3dStatus = E3Pick_RecordHit(thePick, theView, &hitXYZ, &hitNormal, resultUV, NULL, &theHit);
- }
+ }
return(qd3dStatus);
}
Modified: trunk/quesa/Development/Source/Core/Glue/QD3DMath.c
===================================================================
--- trunk/quesa/Development/Source/Core/Glue/QD3DMath.c 2016-08-09 23:40:33 UTC (rev 3346)
+++ trunk/quesa/Development/Source/Core/Glue/QD3DMath.c 2016-09-27 17:06:31 UTC (rev 3347)
@@ -6,7 +6,7 @@
then forwards each API call to the equivalent E3xxxxx routine.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -5138,7 +5138,9 @@
// Q3Ray3D_IntersectTriangle : Quesa API entry point.
//-----------------------------------------------------------------------------
TQ3Boolean
-Q3Ray3D_IntersectTriangle(const TQ3Ray3D *theRay, const TQ3Point3D *point1, const TQ3Point3D *point2, const TQ3Point3D *point3, TQ3Boolean cullBackfacing, TQ3Param3D *hitPoint)
+Q3Ray3D_IntersectTriangle(const TQ3Ray3D *theRay,
+ const TQ3Point3D *point1, const TQ3Point3D *point2, const TQ3Point3D *point3,
+ TQ3Boolean cullBackfacing, TQ3Param3D *hitPoint)
{
@@ -5161,7 +5163,8 @@
// Call our implementation
- return(E3Ray3D_IntersectTriangle(theRay, point1, point2, point3, cullBackfacing, hitPoint));
+ return(E3Ray3D_IntersectTriangle( *theRay, *point1, *point2, *point3,
+ cullBackfacing, *hitPoint));
}
Modified: trunk/quesa/Development/Source/Core/Glue/QD3DPick.c
===================================================================
--- trunk/quesa/Development/Source/Core/Glue/QD3DPick.c 2016-08-09 23:40:33 UTC (rev 3346)
+++ trunk/quesa/Development/Source/Core/Glue/QD3DPick.c 2016-09-27 17:06:31 UTC (rev 3347)
@@ -6,7 +6,7 @@
then forwards each API call to the equivalent E3xxxxx routine.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -236,6 +236,37 @@
//=============================================================================
+// Q3Pick_GetFaceTolerance : Quesa API entry point.
+//-----------------------------------------------------------------------------
+TQ3Status
+Q3Pick_GetFaceTolerance(TQ3PickObject pick, float *faceTolerance)
+{
+
+
+ // Release build checks
+ Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
+ Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(faceTolerance), kQ3Failure);
+
+
+
+ // Debug build checks
+
+
+
+ // Call the bottleneck
+ E3System_Bottleneck();
+
+
+
+ // Call our implementation
+ return(E3Pick_GetFaceTolerance(pick, faceTolerance));
+}
+
+
+
+
+
+//=============================================================================
// Q3Pick_SetVertexTolerance : Quesa API entry point.
//-----------------------------------------------------------------------------
TQ3Status
@@ -296,6 +327,36 @@
//=============================================================================
+// Q3Pick_SetFaceTolerance : Quesa API entry point.
+//-----------------------------------------------------------------------------
+TQ3Status
+Q3Pick_SetFaceTolerance(TQ3PickObject pick, float faceTolerance)
+{
+
+
+ // Release build checks
+ Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
+
+
+
+ // Debug build checks
+
+
+
+ // Call the bottleneck
+ E3System_Bottleneck();
+
+
+
+ // Call our implementation
+ return(E3Pick_SetFaceTolerance(pick, faceTolerance));
+}
+
+
+
+
+
+//=============================================================================
// Q3Pick_GetNumHits : Quesa API entry point.
//-----------------------------------------------------------------------------
TQ3Status
Modified: trunk/quesa/Development/Source/Core/System/E3Math.c
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Math.c 2016-08-09 23:40:33 UTC (rev 3346)
+++ trunk/quesa/Development/Source/Core/System/E3Math.c 2016-09-27 17:06:31 UTC (rev 3347)
@@ -8,7 +8,7 @@
speed, to avoid the trip back out through the Q3foo interface.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -4344,13 +4344,96 @@
else
{
const char* in = (const char*) points3D;
- TQ3Uns32 i;
+ TQ3Uns32 i = 0;
Q3FastBoundingBox_Set(bBox, points3D, points3D, kQ3False);
- in += structSize;
- for (i = 1; i < numPoints; ++i, in += structSize)
- e3bounding_box_accumulate_point3D(bBox, (const TQ3Point3D*)(const void*) in);
+ // We have already accounted for the first point, so if the number of
+ // points is odd, we can handle the other points in pairs, and need not
+ // look at the first point again. But if the number of points is even,
+ // we will start at the first point just so we can work in pairs.
+ if ( (numPoints % 2) == 1 )
+ {
+ in += structSize;
+ i = 1;
+ }
+
+ for (; i < numPoints; i += 2)
+ {
+ TQ3Point3D pt0 = *(const TQ3Point3D*)(const void*) in;
+ in += structSize;
+ TQ3Point3D pt1 = *(const TQ3Point3D*)(const void*) in;
+ in += structSize;
+
+ if (pt0.x < pt1.x)
+ {
+ if (pt0.x < bBox->min.x)
+ {
+ bBox->min.x = pt0.x;
+ }
+ if (pt1.x > bBox->max.x)
+ {
+ bBox->max.x = pt1.x;
+ }
+ }
+ else // pt1.x <= pt0.x
+ {
+ if (pt1.x < bBox->min.x)
+ {
+ bBox->min.x = pt1.x;
+ }
+ if (pt0.x > bBox->max.x)
+ {
+ bBox->max.x = pt0.x;
+ }
+ }
+
+ if (pt0.y < pt1.y)
+ {
+ if (pt0.y < bBox->min.y)
+ {
+ bBox->min.y = pt0.y;
+ }
+ if (pt1.y > bBox->max.y)
+ {
+ bBox->max.y = pt1.y;
+ }
+ }
+ else // pt1.y <= pt0.y
+ {
+ if (pt1.y < bBox->min.y)
+ {
+ bBox->min.y = pt1.y;
+ }
+ if (pt0.y > bBox->max.y)
+ {
+ bBox->max.y = pt0.y;
+ }
+ }
+
+ if (pt0.z < pt1.z)
+ {
+ if (pt0.z < bBox->min.z)
+ {
+ bBox->min.z = pt0.z;
+ }
+ if (pt1.z > bBox->max.z)
+ {
+ bBox->max.z = pt1.z;
+ }
+ }
+ else // pt1.z <= pt0.z
+ {
+ if (pt1.z < bBox->min.z)
+ {
+ bBox->min.z = pt1.z;
+ }
+ if (pt0.z > bBox->max.z)
+ {
+ bBox->max.z = pt0.z;
+ }
+ }
+ }
}
return(bBox);
Modified: trunk/quesa/Development/Source/Core/System/E3Math_Intersect.cpp
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Math_Intersect.cpp 2016-08-09 23:40:33 UTC (rev 3346)
+++ trunk/quesa/Development/Source/Core/System/E3Math_Intersect.cpp 2016-09-27 17:06:31 UTC (rev 3347)
@@ -8,7 +8,7 @@
speed, to avoid the trip back out through the Q3foo interface.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -73,7 +73,6 @@
kHalfPlaneResult_AllOutside
};
-const float kQ3Infinity = std::numeric_limits<float>::infinity();
//=============================================================================
@@ -169,6 +168,12 @@
// Internal functions
//-----------------------------------------------------------------------------
+static float Infinity()
+{
+ static float sInfinity = std::numeric_limits<float>::infinity();
+ return sInfinity;
+}
+
static TQ3Vector3D InfinitePointToVector( const TQ3RationalPoint4D& inInfinitePt )
{
TQ3Vector3D vec = {
@@ -204,7 +209,7 @@
{
outEdgeRay.ray.origin = FinitePointToPoint( inEdge.start );
outEdgeRay.ray.direction = InfinitePointToVector( inEdge.end );
- outEdgeRay.paramRange.maximum = kQ3Infinity;
+ outEdgeRay.paramRange.maximum = Infinity();
outEdgeRay.isRayAtInfinity = false;
}
else // both are finite points
@@ -259,7 +264,7 @@
if (originDotP <= 0.0f) // whole ray
{
solutions.minimum = 0.0f;
- solutions.maximum = kQ3Infinity;
+ solutions.maximum = Infinity();
}
else // no solution
{
@@ -275,7 +280,7 @@
else // dirDotP < 0.0f
{
solutions.minimum = std::max( 0.0f, - originDotP / dirDotP );
- solutions.maximum = kQ3Infinity;
+ solutions.maximum = Infinity();
}
return solutions;
@@ -292,7 +297,7 @@
{
Interval solution;
solution.minimum = 0.0f;
- solution.maximum = kQ3Infinity;
+ solution.maximum = Infinity();
for (int i = 0; i < 6; ++i)
{
@@ -319,7 +324,7 @@
{
Interval solution;
solution.minimum = 0.0f;
- solution.maximum = kQ3Infinity;
+ solution.maximum = Infinity();
// In order for a ray point, rayOrigin + t * rayDir, to be on the right side of the
// cylinder's base plane, we need
@@ -447,7 +452,7 @@
{
Interval solution;
solution.minimum = 0.0f;
- solution.maximum = kQ3Infinity;
+ solution.maximum = Infinity();
// In order for a ray point, rayOrigin + t * rayDir, to be on the right side of the
// cone's base plane, we need
@@ -565,7 +570,7 @@
// Note that here denom < 0, so we get the higher root
// by choosing the minus sign before rootDiscrim.
quadSol.minimum = (-B - rootDiscrim) * denom;
- quadSol.maximum = kQ3Infinity;
+ quadSol.maximum = Infinity();
}
else
{
@@ -1022,11 +1027,11 @@
{
if (theDot > 0.0f)
{
- theDot = kQ3Infinity;
+ theDot = Infinity();
}
else if (theDot < 0.0f)
{
- theDot = - kQ3Infinity;
+ theDot = - Infinity();
}
}
else
@@ -1293,21 +1298,45 @@
// Details at:
// <http://www.graphics.cornell.edu/pubs/1997/MT97.pdf>
//-----------------------------------------------------------------------------
+/*!
+ @function E3Ray3D_IntersectTriangle
+ @abstract Find the intersection between a ray and a triangle.
+ @discussion If the ray is in the plane of the triangle, we report no hit
+ even though there may mathematically be infinitely many points
+ of intersection.
+
+ If we do detect a hit, then hitPoint->u and hitPoint->v are two
+ barycentric coordinates of the intersection point, and
+ hitPoint->w is the distance along the ray. To be precise,
+ theRay->origin + hitPoint->w * theRay->direction ==
+ (1.0 - hitPoint->u - hitPoint->v) * point1 +
+ hitPoint->u * point2 + hitPoint->v * point3.
+
+ If the result is true, then the computed parameters will satisfy
+ u >= 0, v >= 0, u + v <= 1, and w >= 0.
+ @param theRay A ray.
+ @param point1 A point (a vertex of a triangle).
+ @param point2 A point (a vertex of a triangle).
+ @param point3 A point (a vertex of a triangle).
+ @param cullBackfacing Whether to omit a hit on the back face.
+ @param outHitPoint Receives intersection data as described above.
+ @result True if we detected a hit.
+*/
TQ3Boolean
-E3Ray3D_IntersectTriangle(const TQ3Ray3D *theRay,
- const TQ3Point3D *point1,
- const TQ3Point3D *point2,
- const TQ3Point3D *point3,
+E3Ray3D_IntersectTriangle( const TQ3Ray3D& theRay,
+ const TQ3Point3D& point1,
+ const TQ3Point3D& point2,
+ const TQ3Point3D& point3,
TQ3Boolean cullBackfacing,
- TQ3Param3D *hitPoint)
+ TQ3Param3D& outHitPoint)
{ TQ3Vector3D edge1, edge2, tvec, pvec, qvec;
float det, invDet;
// Calculate the two edges which share vertex 1
- Q3FastPoint3D_Subtract(point2, point1, &edge1);
- Q3FastPoint3D_Subtract(point3, point1, &edge2);
+ edge1 = point2 - point1;
+ edge2 = point3 - point1;
@@ -1315,56 +1344,54 @@
// determinant is near zero, the ray lies in the plane of the triangle.
// However, some care is needed; we can get a false positive on "near zero"
// if the triangle is small.
- Q3FastVector3D_Cross(&theRay->direction, &edge2, &pvec);
- det = Q3FastVector3D_Dot(&edge1, &pvec);
+ pvec = Q3Cross3D( theRay.direction, edge2 );
+ det = Q3Dot3D( edge1, pvec );
float testDet = det;
if (fabsf( det ) < kQ3RealZero)
{
- TQ3Vector3D faceNorm;
- Q3FastVector3D_Cross( &edge2, &edge1, &faceNorm );
- Q3FastVector3D_Normalize( &faceNorm, &faceNorm );
- testDet = Q3FastVector3D_Dot( &faceNorm, &theRay->direction );
+ TQ3Vector3D faceNorm = Q3Normalize3D( Q3Cross3D( edge2, edge1 ) );
+ testDet = Q3Dot3D( faceNorm, theRay.direction );
}
// Handle triangles with back-face culling
if (cullBackfacing)
- {
+ {
// Test for ray coinciding with triangle plane, or backface hit
if (testDet < kQ3RealZero)
return(kQ3False);
// Calculate the distance between vertex 1 and the ray origin
- Q3FastPoint3D_Subtract(&theRay->origin, point1, &tvec);
+ tvec = theRay.origin - point1;
// Calculate u, and test for a miss
- hitPoint->u = Q3FastVector3D_Dot(&tvec, &pvec);
- if (hitPoint->u < 0.0f || hitPoint->u > det)
+ outHitPoint.u = Q3Dot3D( tvec, pvec );
+ if (outHitPoint.u < 0.0f || outHitPoint.u > det)
return(kQ3False);
// Calculate v, and test for a miss
- Q3FastVector3D_Cross(&tvec, &edge1, &qvec);
- hitPoint->v = Q3FastVector3D_Dot(&theRay->direction, &qvec);
- if (hitPoint->v < 0.0f || (hitPoint->u + hitPoint->v) > det)
+ qvec = Q3Cross3D( tvec, edge1 );
+ outHitPoint.v = Q3Dot3D( theRay.direction, qvec );
+ if (outHitPoint.v < 0.0f || (outHitPoint.u + outHitPoint.v) > det)
return(kQ3False);
// Calculate w, and scale the parameters
- hitPoint->w = Q3FastVector3D_Dot(&edge2, &qvec);
+ outHitPoint.w = Q3Dot3D( edge2, qvec );
invDet = 1.0f / det;
- hitPoint->w *= invDet;
- hitPoint->u *= invDet;
- hitPoint->v *= invDet;
- }
+ outHitPoint.w *= invDet;
+ outHitPoint.u *= invDet;
+ outHitPoint.v *= invDet;
+ }
// Handle triangles with no culling
else
- {
+ {
// Test for ray coinciding with triangle plane
if (testDet > -kQ3RealZero && testDet < kQ3RealZero)
return(kQ3False);
@@ -1373,37 +1400,224 @@
// Calculate the distance between vertex 1 and the ray origin
- Q3FastPoint3D_Subtract(&theRay->origin, point1, &tvec);
+ tvec = theRay.origin - point1;
// Calculate u, and test for a miss
- hitPoint->u = Q3FastVector3D_Dot(&tvec, &pvec) * invDet;
- if (hitPoint->u < 0.0f || hitPoint->u > 1.0f)
+ outHitPoint.u = Q3Dot3D( tvec, pvec ) * invDet;
+ if (outHitPoint.u < 0.0f || outHitPoint.u > 1.0f)
return(kQ3False);
// Calculate v, and test for a miss
- Q3FastVector3D_Cross(&tvec, &edge1, &qvec);
- hitPoint->v = Q3FastVector3D_Dot(&theRay->direction, &qvec) * invDet;
- if (hitPoint->v < 0.0f || (hitPoint->u + hitPoint->v) > 1.0f)
+ qvec = Q3Cross3D( tvec, edge1 );
+ outHitPoint.v = Q3Dot3D( theRay.direction, qvec ) * invDet;
+ if (outHitPoint.v < 0.0f || (outHitPoint.u + outHitPoint.v) > 1.0f)
return(kQ3False);
// Calculate w
- hitPoint->w = Q3FastVector3D_Dot(&edge2, &qvec) * invDet;
- }
+ outHitPoint.w = Q3Dot3D( edge2, qvec ) * invDet;
+ }
// The ray intersects the triangle
- return (hitPoint->w >= 0.0f ? kQ3True : kQ3False);
+ return (outHitPoint.w >= 0.0f ? kQ3True : kQ3False);
}
+/*!
+ @function E3Ray3D_IntersectPlaneOfTriangle
+ @abstract Find the intersection between a ray and the plane of a triangle.
+ @discussion If the ray is in the plane of the triangle, we report no hit
+ even though there may mathematically be infinitely many points
+ of intersection.
+
+ This function is similar to E3Ray3D_IntersectTriangle, but finds
+ any intersection with the plane of the triangle. Therefore,
+ there are no constraints on the barycentric coordinates u and v,
+ but we do still require that w >= 0.
+
+ If we do detect a hit, then hitPoint->u and hitPoint->v are two
+ barycentric coordinates of the intersection point, and
+ hitPoint->w is the distance along the ray. To be precise,
+ theRay->origin + hitPoint->w * theRay->direction ==
+ (1.0 - hitPoint->u - hitPoint->v) * point1 +
+ hitPoint->u * point2 + hitPoint->v * point3.
+ @param theRay A ray.
+ @param point1 A point (a vertex of a triangle).
+ @param point2 A point (a vertex of a triangle).
+ @param point3 A point (a vertex of a triangle).
+ @param cullBackfacing Whether to omit a hit on the back face.
+ @param outHitPoint Receives intersection data as described above.
+ @result True if we detected a hit.
+*/
+TQ3Boolean E3Ray3D_IntersectPlaneOfTriangle(
+ const TQ3Ray3D& theRay,
+ const TQ3Point3D& point1,
+ const TQ3Point3D& point2,
+ const TQ3Point3D& point3,
+ TQ3Boolean cullBackfacing,
+ TQ3Param3D& outHitPoint)
+{
+ // Calculate the two edges which share vertex 1
+ TQ3Vector3D edge1 = point2 - point1;
+ TQ3Vector3D edge2 = point3 - point1;
+
+ // Begin calculating the determinant - also used to calculate u. If the
+ // determinant is near zero, the ray lies in the plane of the triangle.
+ // However, some care is needed; we can get a false positive on "near zero"
+ // if the triangle is small.
+ TQ3Vector3D pvec = Q3Cross3D( theRay.direction, edge2 );
+ float det = Q3Dot3D( edge1, pvec );
+ float testDet = det;
+ if (fabsf( det ) < kQ3RealZero)
+ {
+ TQ3Vector3D faceNorm = Q3Normalize3D( Q3Cross3D( edge2, edge1 ) );
+ testDet = Q3Dot3D( faceNorm, theRay.direction );
+ }
+
+ // Test for misses by back-face culling or ray parallel to plane
+ if (cullBackfacing)
+ {
+ if (testDet < kQ3RealZero)
+ {
+ return kQ3False;
+ }
+ }
+ else
+ {
+ if (fabsf( testDet ) < kQ3RealZero)
+ {
+ return kQ3False;
+ }
+ }
+
+ float invDet = 1.0f / det;
+
+ // Calculate the vector between vertex 1 and the ray origin
+ TQ3Vector3D tvec = theRay.origin - point1;
+
+ // Calculate u
+ outHitPoint.u = Q3Dot3D( tvec, pvec ) * invDet;
+
+ // Calculate v
+ TQ3Vector3D qvec = Q3Cross3D( tvec, edge1 );
+ outHitPoint.v = Q3Dot3D( theRay.direction, qvec ) * invDet;
+
+ // Calculate w
+ outHitPoint.w = Q3Dot3D( edge2, qvec ) * invDet;
+
+ return (outHitPoint.w >= 0.0f ? kQ3True : kQ3False);
+}
+
+
+
+
/*!
+ @function E3Ray3D_NearTriangle
+ @abstract Find the nearest points of a ray and a triangle.
+ @discussion This function can return kQ3False under 2 conditions:
+ (1) The triangle is edge-on to the ray, i.e.,
+ Dot( frontFaceVec, theRay.direction ) = 0.
+ (2) cullBackfacing == kQ3True, and the ray faces the back face
+ of the triangle, i.e.,
+ Dot( frontFaceVec, theRay.direction ) > 0.
+
+ Otherwise, we find parameters u, v, w such that
+ u >= 0,
+ v >= 0;
+ u + v <= 1;
+ w >= 0;
+ and the distance between the ray point
+ theRay.origin + w * theRay.direction
+ and the triangle point
+ (1 - u - v) * point1 + u * point2 + v * point3
+ is minimized.
+ @param theRay A ray.
+ @param point1 A point (a vertex of a triangle).
+ @param point2 A point (a vertex of a triangle).
+ @param point3 A point (a vertex of a triangle).
+ @param cullBackfacing Whether to omit a hit on the back face.
+ @param outHitPoint Receives intersection data as described above.
+ @result True if we detected a hit.
+*/
+TQ3Boolean E3Ray3D_NearTriangle(
+ const TQ3Ray3D& theRay,
+ const TQ3Point3D& point1,
+ const TQ3Point3D& point2,
+ const TQ3Point3D& point3,
+ TQ3Boolean cullBackfacing,
+ TQ3Param3D& outHitPoint )
+{
+ TQ3Param3D planeHit;
+ TQ3Boolean didHit = E3Ray3D_IntersectPlaneOfTriangle( theRay,
+ point1, point2, point3, cullBackfacing, planeHit );
+
+ if (didHit)
+ {
+ // If the ray hit inside the triangle, then the work is done.
+ if ( (planeHit.u >= 0.0f) && (planeHit.v >= 0.0f) &&
+ (planeHit.u + planeHit.v <= 1.0f) )
+ {
+ outHitPoint = planeHit;
+ }
+ else // missed the triangle, nearest point is along an edge
+ {
+ float rayParam12, segParam12;
+ E3Math_RayNearestLineSegment( theRay, point1, point2,
+ rayParam12, segParam12 );
+ TQ3Point3D rayPt12 = theRay.origin + rayParam12 * theRay.direction;
+ TQ3Point3D triPt12 = (1.0f - segParam12) * point1 + segParam12 * point2;
+ float lenSq12 = Q3LengthSquared3D( rayPt12 - triPt12 );
+
+ float rayParam13, segParam13;
+ E3Math_RayNearestLineSegment( theRay, point1, point3,
+ rayParam13, segParam13 );
+ TQ3Point3D rayPt13 = theRay.origin + rayParam13 * theRay.direction;
+ TQ3Point3D triPt13 = (1.0f - segParam13) * point1 + segParam13 * point3;
+ float lenSq13 = Q3LengthSquared3D( rayPt13 - triPt13 );
+
+ float rayParam23, segParam23;
+ E3Math_RayNearestLineSegment( theRay, point2, point3,
+ rayParam23, segParam23 );
+ TQ3Point3D rayPt23 = theRay.origin + rayParam23 * theRay.direction;
+ TQ3Point3D triPt23 = (1.0f - segParam23) * point2 + segParam23 * point3;
+ float lenSq23 = Q3LengthSquared3D( rayPt23 - triPt23 );
+
+ if ( (lenSq12 <= lenSq13) && (lenSq12 <= lenSq23) )
+ {
+ outHitPoint.w = rayParam12;
+ outHitPoint.u = segParam12;
+ outHitPoint.v = 0.0f;
+ }
+ else if ( (lenSq13 <= lenSq12) && (lenSq13 <= lenSq23) )
+ {
+ outHitPoint.w = rayParam13;
+ outHitPoint.u = 0.0f;
+ outHitPoint.v = segParam13;
+ }
+ else // (lenSq23 <= lenSq12) && (lenSq23 <= lenSq13)
+ {
+ outHitPoint.w = rayParam23;
+ outHitPoint.u = 1.0f - segParam23;
+ outHitPoint.v = segParam23;
+ }
+ }
+ }
+
+ return didHit;
+}
+
+
+
+
+
+/*!
@function E3Ray3D_IntersectCone
@abstract Compute the intersections between a ray and a cone surface.
@discussion This function computes the minimum and maximum values of t
@@ -1493,13 +1707,13 @@
if (isRayOriginInCone)
{
outMinParam = 0.0f;
- outMaxParam = kQ3Infinity;
+ outMaxParam = Infinity();
didIntersect = true;
}
else
{
outMinParam = diffLen;
- outMaxParam = kQ3Infinity;
+ outMaxParam = Infinity();
didIntersect = true;
}
}
@@ -1530,7 +1744,7 @@
if (isRayEndInCone)
{
outMinParam = t;
- outMaxParam = kQ3Infinity;
+ outMaxParam = Infinity();
didIntersect = true;
}
}
@@ -1539,7 +1753,7 @@
if (isRayEndInCone)
{
outMinParam = 0.0f;
- outMaxParam = kQ3Infinity;
+ outMaxParam = Infinity();
didIntersect = true;
}
}
@@ -1596,13 +1810,13 @@
if (root2 >= 0.0f)
{
outMinParam = root2;
- outMaxParam = kQ3Infinity;
+ outMaxParam = Infinity();
didIntersect = true;
}
else
{
outMinParam = 0.0f;
- outMaxParam = kQ3Infinity;
+ outMaxParam = Infinity();
didIntersect = true;
}
Q3_ASSERT( isRayEndInCone );
@@ -1618,6 +1832,157 @@
/*!
+ @function E3Math_LineNearestPoint
+
+ @abstract Find the point on a line that is nearest to a given point.
+
+ @discussion If what you really want is the point on a RAY nearest a given
+ point, then just clamp the result to be nonnegative.
+
+ @param inRay A 3D ray. The direction need not be normalized,
+ but must be nonzero.
+ @param inPt A point.
+ @result A number t such that inRay.origin + t * inRay.direction is as
+ near as possible to inPt.
+*/
+float E3Math_LineNearestPoint(
+ const TQ3Ray3D& inRay,
+ const TQ3Point3D& inPt )
+{
+ float t = Q3Dot3D( inPt - inRay.origin, inRay.direction ) /
+ Q3Dot3D( inRay.direction, inRay.direction );
+ return t;
+}
+
+
+
+
+
+/*!
+ @function E3Math_RayNearestLineSegment
+
+ @abstract Find points on a ray and a line segment that are as near as
+ possible to each other.
+
+ @discussion Find outRayParam >= 0 and outSegParam in [0,1] such that the
+ points inRay.origin + outRayParam * inRay.direction and
+ (1.0 - outSegParam) * inPtA + outSegParam * inPtB are as near
+ to each other as possible.
+
+ If the ray and the segment happen to be parallel, then the
+ solution is not unique, and this function just returns one of
+ the solutions.
+
+ @param inRay A 3D ray. The direction need not be normalized,
+ but must be nonzero.
+ @param inPtA A point.
+ @param inPtB A point.
+ @param outRayParam Returns a parameter for the ray, always nonnegative.
+ @param outSegParam Returns a parameter for the line segment, between
+ 0 and 1 inclusive.
+*/
+void E3Math_RayNearestLineSegment(
+ const TQ3Ray3D& inRay,
+ const TQ3Point3D& inPtA,
+ const TQ3Point3D& inPtB,
+ float& outRayParam,
+ float& outSegParam )
+{
+ TQ3Vector3D v = inPtB - inPtA;
+ // We want to find numbers s, t to minimize the distance between
+ // inRay.origin + s * inRay.direction and inPtA + t * v. In other words,
+ // we want to minimize the length of the vector
+ // inRay.origin + s * inRay.direction - (inPtA + t * v).
+ TQ3Vector3D g = inRay.origin - inPtA;
+ // Now we want to minimize the length of the vector
+ // w = g + s * inRay.direction - t * v.
+ // To keep thing briefer, let's use r to stand for inRay.direction, so that
+ // we want to minimize the length of w = g + s * r - t * v.
+ // This will happen when w is orthogonal to both r and v.
+ // That gives us two linear equations,
+ // 0 = Dot( w, r ) = Dot( g, r ) + s * Dot( r, r ) - t * Dot( v, r ), and
+ // 0 = Dot( w, v ) = Dot( g, v ) + s * Dot( r, v ) - t * Dot( v, v ).
+ // If we let a = Dot( r, r ), b = Dot( r, v ), c = Dot( v, v ),
+ // d = Dot( g, r ), and e = Dot( g, v ), then the equations are
+ // s * a - t * b = -d
+ // s * b - t * c = -e
+ // or in matrix form
+ // a -b | -d
+ // b -c | -e .
+ // This system has the solution
+ // s = (d*c - b*e) / (b*b - a*c), t = (b*d - a*e) / (b*b - a*c) .
+ // Of course, we need to avoid division by zero. The denominator is
+ // b*b - a*c = Dot( r, v ) * Dot( r, v ) - Dot( r, r ) * Dot( v, v )
+ // = |r|^2 |v|^2 cos^2(angle) - |r|^2 |v|^2
+ // = |r|^2 |v|^2 (cos^2(angle) - 1)
+ // = - sin^2(angle) |r|^2 |v|^2.
+ // This is zero when the sine of the angle is 0 (meaning that r and v have
+ // the same or opposite directions) or if r or v are zero. However we
+ // assumed that r is not zero.
+ float c = Q3Dot3D( v, v );
+ if (c < kQ3RealZero) // i.e., inPtA and inPtB are essentially the same
+ {
+ outRayParam = std::max( 0.0f, E3Math_LineNearestPoint( inRay, inPtA ) );
+ outSegParam = 0.0f;
+ }
+ else
+ {
+ float a = Q3Dot3D( inRay.direction, inRay.direction );
+ float b = Q3Dot3D( inRay.direction, v );
+ float denom = b*b - a*c;
+ if (fabsf( denom ) < kQ3RealZero) // ray & segment parallel or opposite
+ {
+ // Test segment ends
+ float rayParamA = std::max( 0.0f, E3Math_LineNearestPoint( inRay, inPtA ) );
+ TQ3Point3D rayPtA = inRay.origin + rayParamA * inRay.direction;
+ float rayParamB = std::max( 0.0f, E3Math_LineNearestPoint( inRay, inPtB ) );
+ TQ3Point3D rayPtB = inRay.origin + rayParamB * inRay.direction;
+ if ( Q3LengthSquared3D( inPtA - rayPtA ) <
+ Q3LengthSquared3D( inPtB - rayPtB ) )
+ {
+ outRayParam = rayParamA;
+ outSegParam = 0.0f;
+ }
+ else
+ {
+ outRayParam = rayParamB;
+ outSegParam = 1.0f;
+ }
+ }
+ else // general case
+ {
+ float d = Q3Dot3D( inRay.direction, g );
+ float e = Q3Dot3D( v, g );
+ outRayParam = (d*c - b*e) / denom;
+ outSegParam = (b*d - a*e) / denom;
+ if ( (outSegParam < 0.0f) || (outSegParam > 1.0f) )
+ {
+ TQ3Point3D segNearPt;
+ if (outSegParam < 0.0f)
+ {
+ outSegParam = 0.0f;
+ segNearPt = inPtA;
+ }
+ else
+ {
+ outSegParam = 1.0f;
+ segNearPt = inPtB;
+ }
+ outRayParam = E3Math_LineNearestPoint( inRay, segNearPt );
+ }
+ if (outRayParam < 0.0f)
+ {
+ outRayParam = 0.0f;
+ }
+ }
+ }
+}
+
+
+
+
+
+/*!
@function E3Cone_IntersectBoundingBox
@abstract Determine whether a cone intersects a bounding box.
@param inConeAxis Axis ray of cone with a normalized direction.
Modified: trunk/quesa/Development/Source/Core/System/E3Math_Intersect.h
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Math_Intersect.h 2016-08-09 23:40:33 UTC (rev 3346)
+++ trunk/quesa/Development/Source/Core/System/E3Math_Intersect.h 2016-09-27 17:06:31 UTC (rev 3347)
@@ -5,7 +5,7 @@
Header file for E3Math_Intersect.cpp.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -65,24 +65,98 @@
theRay->origin + hitPoint->w * theRay->direction ==
(1.0 - hitPoint->u - hitPoint->v) * point1 +
hitPoint->u * point2 + hitPoint->v * point3.
+
+ If the result is true, then the computed parameters will satisfy
+ u >= 0, v >= 0, u + v <= 1, and w >= 0.
@param theRay A ray.
@param point1 A point (a vertex of a triangle).
@param point2 A point (a vertex of a triangle).
@param point3 A point (a vertex of a triangle).
@param cullBackfacing Whether to omit a hit on the back face.
- @param hitPoint Receives intersection data as described above.
+ @param outHitPoint Receives intersection data as described above.
@result True if we detected a hit.
*/
-TQ3Boolean E3Ray3D_IntersectTriangle(const TQ3Ray3D *theRay,
- const TQ3Point3D *point1,
- const TQ3Point3D *point2,
- const TQ3Point3D *point3,
- TQ3Boolean cullBackfacing,
- TQ3Param3D *hitPoint);
+TQ3Boolean E3Ray3D_IntersectTriangle( const TQ3Ray3D& theRay,
+ const TQ3Point3D& point1,
+ const TQ3Point3D& point2,
+ const TQ3Point3D& point3,
+ TQ3Boolean cullBackfacing,
+ TQ3Param3D& outHitPoint);
+/*!
+ @function E3Ray3D_IntersectPlaneOfTriangle
+ @abstract Find the intersection between a ray and the plane of a triangle.
+ @discussion If the ray is in the plane of the triangle, we report no hit
+ even though there may mathematically be infinitely many points
+ of intersection.
+
+ This function is similar to E3Ray3D_IntersectTriangle, but finds
+ any intersection with the plane of the triangle. Therefore,
+ there are no constraints on the barycentric coordinates u and v,
+ but we do still require that w >= 0.
+
+ If we do detect a hit, then hitPoint->u and hitPoint->v are two
+ barycentric coordinates of the intersection point, and
+ hitPoint->w is the distance along the ray. To be precise,
+ theRay->origin + hitPoint->w * theRay->direction ==
+ (1.0 - hitPoint->u - hitPoint->v) * point1 +
+ hitPoint->u * point2 + hitPoint->v * point3.
+ @param theRay A ray.
+ @param point1 A point (a vertex of a triangle).
+ @param point2 A point (a vertex of a triangle).
+ @param point3 A point (a vertex of a triangle).
+ @param cullBackfacing Whether to omit a hit on the back face.
+ @param outHitPoint Receives intersection data as described above.
+ @result True if we detected a hit.
+*/
+TQ3Boolean E3Ray3D_IntersectPlaneOfTriangle(
+ const TQ3Ray3D& theRay,
+ const TQ3Point3D& point1,
+ const TQ3Point3D& point2,
+ const TQ3Point3D& point3,
+ TQ3Boolean cullBackfacing,
+ TQ3Param3D& outHitPoint );
+
/*!
+ @function E3Ray3D_NearTriangle
+ @abstract Find the nearest points of a ray and a triangle.
+ @discussion This function can return kQ3False under 2 conditions:
+ (1) The triangle is edge-on to the ray, i.e.,
+ Dot( frontFaceVec, theRay.direction ) = 0.
+ (2) cullBackfacing == kQ3True, and the ray faces the back face
+ of the triangle, i.e.,
+ Dot( frontFaceVec, theRay.direction ) > 0.
+
+ Otherwise, we find parameters u, v, w such that
+ u >= 0,
+ v >= 0;
+ u + v <= 1;
+ w >= 0;
+ and the distance between the ray point
+ theRay.origin + w * theRay.direction
+ and the triangle point
+ (1 - u - v) * point1 + u * point2 + v * point3
+ is minimized.
+ @param theRay A ray.
+ @param point1 A point (a vertex of a triangle).
+ @param point2 A point (a vertex of a triangle).
+ @param point3 A point (a vertex of a triangle).
+ @param cullBackfacing Whether to omit a hit on the back face.
+ @param outHitPoint Receives intersection data as described above.
+ @result True if we detected a hit.
+*/
+TQ3Boolean E3Ray3D_NearTriangle(
+ const TQ3Ray3D& theRay,
+ const TQ3Point3D& point1,
+ const TQ3Point3D& point2,
+ const TQ3Point3D& point3,
+ TQ3Boolean cullBackfacing,
+ TQ3Param3D& outHitPoint );
+
+
+/*!
@function E3Ray3D_IntersectCone
@abstract Compute the intersections between a ray and a cone surface.
@discussion This function computes the minimum and maximum values of t
@@ -112,6 +186,55 @@
/*!
+ @function E3Math_LineNearestPoint
+
+ @abstract Find the point on a line that is nearest to a given point.
+
+ @discussion If what you really want is the point on a RAY nearest a given
+ point, then just clamp the result to be nonnegative.
+
+ @param inRay A 3D ray. The direction need not be normalized,
+ but must be nonzero.
+ @param inPt A point.
+ @result A number t such that inRay.origin + t * inRay.direction is as
+ near as possible to inPt.
+*/
+float E3Math_LineNearestPoint(
+ const TQ3Ray3D& inRay,
+ const TQ3Point3D& inPt );
+
+
+/*!
+ @function E3Math_RayNearestLineSegment
+
+ @abstract Find points on a ray and a line segment that are as near as
+ possible to each other.
+
+ @discussion Find outRayParam >= 0 and outSegParam in [0,1] such that the
+ points inRay.origin + outRayParam * inRay.direction and
+ (1.0 - outSegParam) * inPtA + outSegParam * inPtB are as near
+ to each other as possible.
+
+ If the ray and the segment happen to be parallel, then the
+ solution is not unique, and this function just returns one of
+ the solutions.
+
+ @param inRay A 3D ray. The direction need not be normalized,
+ but must be nonzero.
+ @param inPtA A point.
+ @param inPtB A point.
+ @param outRayParam Returns a parameter for the ray, always nonnegative.
+ @param outSegParam Returns a parameter for the line segment, between
+ 0 and 1 inclusive.
+*/
+void E3Math_RayNearestLineSegment(
+ const TQ3Ray3D& inRay,
+ const TQ3Point3D& inPtA,
+ const TQ3Point3D& inPtB,
+ float& outRayParam,
+ float& outSegParam );
+
+/*!
@function E3Cone_IntersectBoundingBox
@abstract Determine whether a cone intersects a bounding box.
@param inConeAxis Axis ray of cone with a normalized direction.
Modified: trunk/quesa/Development/Source/Core/System/E3Pick.c
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Pick.c 2016-08-09 23:40:33 UTC (rev 3346)
+++ trunk/quesa/Development/Source/Core/System/E3Pick.c 2016-09-27 17:06:31 UTC (rev 3347)
@@ -5,7 +5,7 @@
Implementation of Quesa API calls.
COPYRIGHT:
- Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -62,6 +62,7 @@
//=============================================================================
// Internal types
//-----------------------------------------------------------------------------
+#pragma mark struct TQ3PickHit
// Pick hit result
struct TQ3PickHit
{
@@ -88,28 +89,33 @@
TQ3Param3D hitBarycentric;
};
+struct TQ3WindowPointPickSpecificData
+{
+ TQ3Point2D point;
+};
-// Pick object instance data
-struct TQ3PickUnionData
+struct TQ3WorldRayPickSpecificData
{
- // Common data
+ TQ3Ray3D ray;
+};
+
+struct TQ3WindowRectPickSpecificData
+{
+ TQ3Area rect;
+};
+
+
+struct TQ3PickBaseData
+{
+ TQ3PickData commonData;
std::vector<TQ3PickHit*>* pickHits;
bool isSorted;
-
-
- // Pick specific. Note that we assume that a TQ3PickData structure
- // is the first item within each pick structure, since this lets us
- // use a union and have the common data overlap.
- union {
- TQ3PickData common;
- TQ3WindowPointPickData windowPointData;
- TQ3WindowRectPickData windowRectData;
- TQ3WorldRayPickData worldRayData;
- } data;
+ float vertexTolerance;
+ float edgeTolerance;
+ float faceTolerance;
};
-
struct CompPickNearToFar
{
bool operator()( TQ3PickHit* inOne, TQ3PickHit* inTwo ) const;
@@ -127,12 +133,11 @@
// the .c file rather than in the .h file, hence all
// the fields can be public as nobody should be
// including this file.
- {
+{
Q3_CLASS_ENUMS ( kQ3ObjectTypePick, E3Pick, OpaqueTQ3Object )
public :
-
- // There is no extra data for this class
- } ;
+ TQ3PickBaseData baseInstanceData;
+};
@@ -140,12 +145,12 @@
// so it can be here in the .c file rather than in
// the .h file, hence all the fields can be public
// as nobody should be including this file
- {
+{
Q3_CLASS_ENUMS ( kQ3PickTypeWindowPoint, E3WindowPointPick, E3Pick )
public :
- TQ3PickUnionData instanceData ;
- } ;
+ TQ3WindowPointPickSpecificData instanceData ;
+} ;
@@ -153,12 +158,12 @@
// so it can be here in the .c file rather than in
// the .h file, hence all the fields can be public
// as nobody should be including this file
- {
+{
Q3_CLASS_ENUMS ( kQ3PickTypeWindowRect, E3WindowRectPick, E3Pick )
public :
- TQ3PickUnionData instanceData ;
- } ;
+ TQ3WindowRectPickSpecificData instanceData ;
+} ;
@@ -166,12 +171,12 @@
// so it can be here in the .c file rather than in
// the .h file, hence all the fields can be public
// as nobody should be including this file
- {
+{
Q3_CLASS_ENUMS ( kQ3PickTypeWorldRay, E3WorldRayPick, E3Pick )
public :
- TQ3PickUnionData instanceData ;
- } ;
+ TQ3WorldRayPickSpecificData instanceData ;
+} ;
@@ -531,15 +536,15 @@
// e3pick_hit_find : Find the nth pick hit in a list.
//-----------------------------------------------------------------------------
static TQ3PickHit *
-e3pick_hit_find(TQ3PickUnionData *pickInstanceData, TQ3Uns32 n)
+e3pick_hit_find(TQ3PickBaseData *pickInstanceData, TQ3Uns32 n)
{
// Check we're not out of range
if (n >= pickInstanceData->pickHits->size())
return(NULL);
- if (pickInstanceData->data.common.numHitsToReturn != kQ3ReturnAllHits)
+ if (pickInstanceData->commonData.numHitsToReturn != kQ3ReturnAllHits)
{
- if (n >= pickInstanceData->data.common.numHitsToReturn)
+ if (n >= pickInstanceData->commonData.numHitsToReturn)
return(NULL);
}
@@ -547,7 +552,7 @@
// just in time sort
if (!pickInstanceData->isSorted)
{
- switch (pickInstanceData->data.common.sort)
+ switch (pickInstanceData->commonData.sort)
{
case kQ3PickSortNearToFar:
std::sort( pickInstanceData->pickHits->begin(),
@@ -584,8 +589,6 @@
static void
e3pick_set_sort_mask(TQ3PickData *pickData)
{
-
-
// Turn on the distance flag if any kind of sorting is requested
if (pickData->sort != kQ3PickSortNone)
pickData->mask |= kQ3PickDetailMaskDistance;
@@ -595,21 +598,26 @@
+#pragma mark -
//=============================================================================
-// e3pick_windowpoint_new : Window point pick new method.
+// e3pick_new : Base pick new method.
//-----------------------------------------------------------------------------
static TQ3Status
-e3pick_windowpoint_new(TQ3Object theObject, void *privateData, const void *paramData)
-{ TQ3PickUnionData *instanceData = (TQ3PickUnionData *) privateData;
- const TQ3WindowPointPickData *pickData = (const TQ3WindowPointPickData *) paramData;
+e3pick_new(TQ3Object theObject, void *privateData, const void *paramData)
+{ TQ3PickBaseData* instanceData = (TQ3PickBaseData *) privateData;
+ const TQ3PickData *pickData = (const TQ3PickData *) paramData;
// Initialise our instance data
instanceData->pickHits = new std::vector<TQ3PickHit*>;
- instanceData->data.windowPointData = *pickData;
+ instanceData->commonData = *pickData;
+ instanceData->isSorted = false;
+ instanceData->vertexTolerance = 0.0f;
+ instanceData->edgeTolerance = 0.0f;
+ instanceData->faceTolerance = 0.0f;
- e3pick_set_sort_mask(&instanceData->data.windowPointData.data);
+ e3pick_set_sort_mask( &instanceData->commonData );
return(kQ3Success);
}
@@ -619,17 +627,17 @@
//=============================================================================
-// e3pick_windowpoint_delete : Window point pick delete method.
+// e3pick_delete : Base pick delete method.
//-----------------------------------------------------------------------------
static void
-e3pick_windowpoint_delete(TQ3Object theObject, void *privateData)
+e3pick_delete(TQ3Object theObject, void *privateData)
{
// Empty the pick list
E3Pick_EmptyHitList(theObject);
// Free data held by the instance data
- TQ3PickUnionData* instanceData = (TQ3PickUnionData*) privateData;
+ TQ3PickBaseData* instanceData = (TQ3PickBaseData*) privateData;
delete instanceData->pickHits;
instanceData->pickHits = NULL;
}
@@ -639,6 +647,69 @@
//=============================================================================
+// e3pick_metahandler : Base pick metahandler.
+//-----------------------------------------------------------------------------
+static TQ3XFunctionPointer
+e3pick_metahandler(TQ3XMethodType methodType)
+{ TQ3XFunctionPointer theMethod = NULL;
+
+
+
+ // Return our methods
+ switch (methodType) {
+ case kQ3XMethodTypeObjectNew:
+ theMethod = (TQ3XFunctionPointer) e3pick_new;
+ break;
+
+ case kQ3XMethodTypeObjectDelete:
+ theMethod = (TQ3XFunctionPointer) e3pick_delete;
+ break;
+ }
+
+ return(theMethod);
+}
+
+
+
+
+
+#pragma mark -
+//=============================================================================
+// e3pick_windowpoint_new : Window point pick new method.
+//-----------------------------------------------------------------------------
+static TQ3Status
+e3pick_windowpoint_new(TQ3Object theObject, void *privateData, const void *paramData)
+{
+ TQ3WindowPointPickSpecificData* instanceData = (TQ3WindowPointPickSpecificData *) privateData;
+ const TQ3WindowPointPickData *pickData = (const TQ3WindowPointPickData *) paramData;
+ E3Pick* parentOb = (E3Pick*) theObject;
+
+
+ // Initialise our instance data
+ instanceData->point = pickData->point;
+ parentOb->baseInstanceData.vertexTolerance = pickData->vertexTolerance;
+ parentOb->baseInstanceData.edgeTolerance = pickData->edgeTolerance;
+
+ return(kQ3Success);
+}
+
+
+
+
+
+//=============================================================================
+// e3pick_windowpoint_delete : Window point pick delete method.
+//-----------------------------------------------------------------------------
+static void
+e3pick_windowpoint_delete(TQ3Object theObject, void *privateData)
+{
+}
+
+
+
+
+
+//=============================================================================
// e3pick_windowpoint_metahandler : Window point pick metahandler.
//-----------------------------------------------------------------------------
static TQ3XFunctionPointer
@@ -665,19 +736,20 @@
+#pragma mark -
//=============================================================================
// e3pick_windowrect_new : Window rect pick new method.
//-----------------------------------------------------------------------------
static TQ3Status
e3pick_windowrect_new(TQ3Object theObject, void *privateData, const void *paramData)
-{ TQ3PickUnionData *instanceData = (TQ3PickUnionData *) privateData;
+{
+ TQ3Area *instanceData = (TQ3Area *) privateData;
const TQ3WindowRectPickData *pickData = (const TQ3WindowRectPickData *) paramData;
// Initialise our instance data
- instanceData->pickHits = new std::vector<TQ3PickHit*>;
- instanceData->data.windowRectData = *pickData;
+ *instanceData = pickData->rect;
return(kQ3Success);
}
@@ -692,14 +764,6 @@
static void
e3pick_windowrect_delete(TQ3Object theObject, void *privateData)
{
- // Empty the pick list
- E3Pick_EmptyHitList(theObject);
-
-
- // Free data held by the instance data
- TQ3PickUnionData* instanceData = (TQ3PickUnionData*) privateData;
- delete instanceData->pickHits;
- instanceData->pickHits = NULL;
}
@@ -732,22 +796,23 @@
-
+#pragma mark -
//=============================================================================
// e3pick_worldray_new : World ray pick new method.
//-----------------------------------------------------------------------------
static TQ3Status
e3pick_worldray_new(TQ3Object theObject, void *privateData, const void *paramData)
-{ TQ3PickUnionData *instanceData = (TQ3PickUnionData *) privateData;
+{
+ TQ3WorldRayPickSpecificData* instanceData = (TQ3WorldRayPickSpecificData *) privateData;
const TQ3WorldRayPickData *pickData = (const TQ3WorldRayPickDa...
[truncated message content] |
|
From: <jww...@us...> - 2016-08-09 23:40:36
|
Revision: 3346
http://sourceforge.net/p/quesa/code/3346
Author: jwwalker
Date: 2016-08-09 23:40:33 +0000 (Tue, 09 Aug 2016)
Log Message:
-----------
New API Q3Memory_GetObjectCount.
Modified Paths:
--------------
trunk/quesa/Development/Source/Core/Glue/QD3DMemory.c
trunk/quesa/Development/Source/Core/System/E3Main.c
trunk/quesa/SDK/Includes/Quesa/QuesaMemory.h
Modified: trunk/quesa/Development/Source/Core/Glue/QD3DMemory.c
===================================================================
--- trunk/quesa/Development/Source/Core/Glue/QD3DMemory.c 2016-08-09 23:32:15 UTC (rev 3345)
+++ trunk/quesa/Development/Source/Core/Glue/QD3DMemory.c 2016-08-09 23:40:33 UTC (rev 3346)
@@ -6,7 +6,7 @@
then forwards each API call to the equivalent E3xxxxx routine.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -52,6 +52,20 @@
//=============================================================================
+// Global Variables
+//-----------------------------------------------------------------------------
+
+#if QUESA_OS_MACINTOSH
+ extern volatile int32_t gObjectCount;
+#elif QUESA_OS_WIN32
+ extern volatile LONG gObjectCount;
+#endif
+
+
+
+
+
+//=============================================================================
// Internal constants
//-----------------------------------------------------------------------------
// Internal constants go here
@@ -498,6 +512,23 @@
+/*!
+ @function Q3Memory_GetObjectCount
+ @abstract Get a count of Quesa objects currently in existence.
+ @discussion Unlike <code>Q3Memory_CountRecords</code>, this function works
+ even in non-debug builds.
+ @result Number of Quesa objects.
+*/
+TQ3Int32
+Q3Memory_GetObjectCount()
+{
+ return gObjectCount;
+}
+
+
+
+
+
//=============================================================================
// Q3SlabMemory_New : Quesa API entry point.
//-----------------------------------------------------------------------------
Modified: trunk/quesa/Development/Source/Core/System/E3Main.c
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Main.c 2016-08-09 23:32:15 UTC (rev 3345)
+++ trunk/quesa/Development/Source/Core/System/E3Main.c 2016-08-09 23:40:33 UTC (rev 3346)
@@ -74,6 +74,10 @@
#include "E3Viewer.h"
#endif
+#if QUESA_OS_MACINTOSH
+ #include <libkern/OSAtomic.h>
+#endif
+
#include <cstring>
#include <map>
#include <set>
@@ -88,7 +92,18 @@
+//=============================================================================
+// Global Variables
+//-----------------------------------------------------------------------------
+#if QUESA_OS_MACINTOSH
+ volatile int32_t gObjectCount = 0;
+#elif QUESA_OS_WIN32
+ volatile LONG gObjectCount = 0;
+#endif
+
+
+
//=============================================================================
// Internal types
//-----------------------------------------------------------------------------
@@ -555,6 +570,13 @@
theObject->theSet = NULL;
theObject->propertyTable = NULL;
+ // Update the global object count.
+#if QUESA_OS_MACINTOSH
+ OSAtomicIncrement32( &gObjectCount );
+#elif QUESA_OS_WIN32
+ InterlockedIncrement( &gObjectCount );
+#endif
+
return kQ3Success;
}
@@ -627,6 +649,15 @@
E3HashTable_Destroy( &instanceData->propertyTable );
}
+
+ // Update the global object count.
+#if QUESA_OS_MACINTOSH
+ OSAtomicDecrement32( &gObjectCount );
+#elif QUESA_OS_WIN32
+ InterlockedDecrement( &gObjectCount );
+#endif
+
+
#if Q3_DEBUG
if ( instanceData->prev != NULL )
{
Modified: trunk/quesa/SDK/Includes/Quesa/QuesaMemory.h
===================================================================
--- trunk/quesa/SDK/Includes/Quesa/QuesaMemory.h 2016-08-09 23:32:15 UTC (rev 3345)
+++ trunk/quesa/SDK/Includes/Quesa/QuesaMemory.h 2016-08-09 23:40:33 UTC (rev 3346)
@@ -8,7 +8,7 @@
Quesa public header.
COPYRIGHT:
- Copyright (c) 1999-2004, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -528,6 +528,22 @@
/*!
+ @function Q3Memory_GetObjectCount
+ @abstract Get a count of Quesa objects currently in existence.
+ @discussion Unlike <code>Q3Memory_CountRecords</code>, this function works
+ even in non-debug builds.
+ @result Number of Quesa objects.
+*/
+#if QUESA_ALLOW_QD3D_EXTENSIONS
+
+Q3_EXTERN_API_C ( TQ3Int32 )
+Q3Memory_GetObjectCount();
+
+#endif // QUESA_ALLOW_QD3D_EXTENSIONS
+
+
+
+/*!
* @function
* Q3SlabMemory_New
* @discussion
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2016-08-09 23:32:18
|
Revision: 3345
http://sourceforge.net/p/quesa/code/3345
Author: jwwalker
Date: 2016-08-09 23:32:15 +0000 (Tue, 09 Aug 2016)
Log Message:
-----------
Implement zeroing weak references, and use them for cleaner caching of VBOs.
Modified Paths:
--------------
trunk/quesa/Development/Source/Core/Glue/QD3DMain.c
trunk/quesa/Development/Source/Core/Support/E3ClassTree.c
trunk/quesa/Development/Source/Core/System/E3Main.c
trunk/quesa/Development/Source/Core/System/E3Main.h
trunk/quesa/Development/Source/Renderers/Common/GLDisplayListManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.h
trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp
trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h
trunk/quesa/SDK/Includes/Quesa/Quesa.h
Added Paths:
-----------
trunk/quesa/SDK/Includes/Quesa/CQ3WeakObjectRef.h
Modified: trunk/quesa/Development/Source/Core/Glue/QD3DMain.c
===================================================================
--- trunk/quesa/Development/Source/Core/Glue/QD3DMain.c 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Core/Glue/QD3DMain.c 2016-08-09 23:32:15 UTC (rev 3345)
@@ -6,7 +6,7 @@
then forwards each API call to the equivalent E3xxxxx routine.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -462,6 +462,74 @@
+/*!
+ * @function
+ * Q3Object_GetWeakReference
+ * @abstract
+ * Register a zeroing weak reference to a Quesa object.
+ * @discussion
+ * A reference that has been registered using this function
+ * will become zero after the object has been deleted.
+ *
+ * The object being referenced is not required to be a
+ * reference-counted object. If it is, getting a zeroing
+ * weak reference does not change the reference count.
+ *
+ * If you are going to deallocate or reuse the given memory
+ * location before it becomes zero, you MUST first
+ * use <code>Q3Object_ReleaseWeakReference</code>.
+ *
+ * @param theRefAddress Address of an object reference.
+*/
+void
+Q3Object_GetWeakReference( TQ3Object* theRefAddress )
+{
+ // Release build checks
+ Q3_REQUIRE( theRefAddress != NULL ) ;
+ Q3_REQUIRE( *theRefAddress != NULL ) ;
+ Q3_REQUIRE( (*theRefAddress)->IsObjectValid() ) ;
+
+
+ // Call the bottleneck
+ E3System_Bottleneck();
+
+
+ E3Object_GetWeakReference( theRefAddress );
+}
+
+
+
+
+
+/*!
+ * @function Q3Object_ReleaseWeakReference
+ * @abstract Deregister a zeroing weak reference to a Quesa object.
+ * @discussion A reference that has been deregistered using this function
+ * will become no longer become zero after the object has been
+ * deleted.
+ *
+ * @param theRefAddress Address of an object reference.
+*/
+void
+Q3Object_ReleaseWeakReference( TQ3Object* theRefAddress )
+{
+ // Release build checks
+ Q3_REQUIRE( theRefAddress != NULL ) ;
+ Q3_REQUIRE( *theRefAddress != NULL ) ;
+ Q3_REQUIRE( (*theRefAddress)->IsObjectValid() ) ;
+
+
+ // Call the bottleneck
+ E3System_Bottleneck();
+
+
+ E3Object_ReleaseWeakReference( theRefAddress );
+}
+
+
+
+
+
//=============================================================================
// Q3Object_Duplicate : Quesa API entry point.
//-----------------------------------------------------------------------------
@@ -1391,6 +1459,8 @@
#endif // QUESA_ALLOW_QD3D_EXTENSIONS
+
+
//=============================================================================
// Q3Shape_GetType : Quesa API entry point.
//-----------------------------------------------------------------------------
Modified: trunk/quesa/Development/Source/Core/Support/E3ClassTree.c
===================================================================
--- trunk/quesa/Development/Source/Core/Support/E3ClassTree.c 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Core/Support/E3ClassTree.c 2016-08-09 23:32:15 UTC (rev 3345)
@@ -20,7 +20,7 @@
to record their relationship to the rest of the tree.
COPYRIGHT:
- Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -913,7 +913,7 @@
//-----------------------------------------------------------------------------
void
OpaqueTQ3Object::DestroyInstance ( void )
- {
+{
// Validate our parameters
Q3_REQUIRE(Q3_VALID_PTR(this));
Q3_CLASS_VERIFY(this);
@@ -934,7 +934,12 @@
// Dispose of the object
TQ3Object theObject = (TQ3Object) this ;
Q3Memory_Free ( & theObject ) ;
- }
+
+
+
+ // Update weak references.
+ E3Object_ZeroWeakReferences( (TQ3Object) this );
+}
Modified: trunk/quesa/Development/Source/Core/System/E3Main.c
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Main.c 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Core/System/E3Main.c 2016-08-09 23:32:15 UTC (rev 3345)
@@ -5,7 +5,7 @@
Implementation of Quesa API calls.
COPYRIGHT:
- Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -75,9 +75,11 @@
#endif
#include <cstring>
+#include <map>
+#include <set>
+#include <utility>
-
//=============================================================================
// Internal constants
//-----------------------------------------------------------------------------
@@ -90,6 +92,9 @@
//=============================================================================
// Internal types
//-----------------------------------------------------------------------------
+namespace
+{
+
struct PropIterData
{
TQ3Object object;
@@ -97,10 +102,22 @@
void* userData;
};
+typedef std::set< TQ3Object* > WeakRefSet;
+typedef std::map< TQ3Object, WeakRefSet > ObToWeakRefs;
+}
+
+
//=============================================================================
+// Internal variables
+//-----------------------------------------------------------------------------
+
+static ObToWeakRefs* sObToWeakRefs = NULL;
+
+
+//=============================================================================
// Internal functions
//-----------------------------------------------------------------------------
// E3ShapeInfo::E3ShapeInfo : Constructor for class info of root class.
@@ -1196,13 +1213,13 @@
#pragma mark -
TQ3Status
OpaqueTQ3Object::Dispose ( void )
- {
+{
// Dispose of the object
- ( (E3Root*) GetClass () )->disposeMethod ( this ) ;
+ ( (E3Root*) GetClass () )->disposeMethod( this );
return kQ3Success ;
- }
+}
@@ -1234,6 +1251,73 @@
//=============================================================================
+// E3Object_GetWeakReference : Record an object reference so that it can
+// be made zero when the object is deleted.
+//-----------------------------------------------------------------------------
+void E3Object_GetWeakReference( TQ3Object* theRefAddress )
+{
+ if (sObToWeakRefs == NULL)
+ {
+ sObToWeakRefs = new ObToWeakRefs;
+ }
+
+ //Q3_MESSAGE_FMT("+ weak ref %p -> %p", theRefAddress, *theRefAddress );
+ (*sObToWeakRefs)[ *theRefAddress ].insert( theRefAddress );
+}
+
+
+
+
+
+//=============================================================================
+// E3Object_ReleaseWeakReference : Forget a zeroing weak reference.
+//-----------------------------------------------------------------------------
+void E3Object_ReleaseWeakReference( TQ3Object* theRefAddress )
+{
+ if (sObToWeakRefs != NULL)
+ {
+ //Q3_MESSAGE_FMT("- weak ref %p -> %p", theRefAddress, *theRefAddress );
+ (*sObToWeakRefs)[ *theRefAddress ].erase( theRefAddress );
+ }
+}
+
+
+
+
+
+
+//=============================================================================
+// E3Object_ZeroWeakReferences : Zero weak references to an object that
+// has been deleted.
+//-----------------------------------------------------------------------------
+void E3Object_ZeroWeakReferences( TQ3Object deletedObject )
+{
+ if (sObToWeakRefs != NULL)
+ {
+ ObToWeakRefs::iterator found = sObToWeakRefs->find( deletedObject );
+ if (found != sObToWeakRefs->end())
+ {
+ //Q3_MESSAGE_FMT("----");
+ WeakRefSet& weakRefs( found->second );
+ WeakRefSet::iterator endIt = weakRefs.end();
+ for (WeakRefSet::iterator i = weakRefs.begin(); i != endIt; ++i)
+ {
+ TQ3Object* theRefAddr( *i );
+ //Q3_MESSAGE_FMT("zeroing reference %p to dead object %p",
+ // theRefAddr, deletedObject );
+ *theRefAddr = NULL;
+ }
+ sObToWeakRefs->erase( found );
+ //Q3_MESSAGE_FMT("----");
+ }
+ }
+}
+
+
+
+
+
+//=============================================================================
// E3Object_Duplicate : Duplicate an object.
//-----------------------------------------------------------------------------
// Note : Draw context and view objects can not be duplicated, since
@@ -1830,7 +1914,7 @@
//-----------------------------------------------------------------------------
E3Shared*
E3Shared::GetReference ( void )
- {
+{
// Increment the reference count and return the object. Note that we
// return the object passed in: this is OK since we're not declared
// to return a different object.
@@ -1845,7 +1929,7 @@
#endif
return this ;
- }
+}
Modified: trunk/quesa/Development/Source/Core/System/E3Main.h
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Main.h 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Core/System/E3Main.h 2016-08-09 23:32:15 UTC (rev 3345)
@@ -5,7 +5,7 @@
Header file for E3Main.c.
COPYRIGHT:
- Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -386,6 +386,9 @@
TQ3Boolean E3Object_IsWritable(TQ3Object theObject, TQ3FileObject theFile);
TQ3ObjectType E3Object_GetType(TQ3Object theObject);
TQ3Boolean E3Object_IsType(TQ3Object theObject, TQ3ObjectType theType);
+void E3Object_GetWeakReference( TQ3Object* theRefAddress );
+void E3Object_ReleaseWeakReference( TQ3Object* theRefAddress );
+void E3Object_ZeroWeakReferences( TQ3Object deletedObject );
TQ3Boolean E3Shared_IsOfMyClass ( TQ3Object object ) ;
TQ3ObjectType E3Shared_GetType(TQ3SharedObject sharedObject);
Modified: trunk/quesa/Development/Source/Renderers/Common/GLDisplayListManager.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLDisplayListManager.cpp 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Renderers/Common/GLDisplayListManager.cpp 2016-08-09 23:32:15 UTC (rev 3345)
@@ -5,7 +5,7 @@
OpenGL display list caching.
COPYRIGHT:
- Copyright (c) 2007-2011, Quesa Developers. All rights reserved.
+ Copyright (c) 2007-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -48,6 +48,7 @@
#include "GLDisplayListManager.h"
#include "GLGPUSharing.h"
#include "CQ3ObjectRef.h"
+#include "CQ3WeakObjectRef.h"
#include <vector>
#include <algorithm>
@@ -74,7 +75,6 @@
#pragma mark struct CachedDisplayList
struct CachedDisplayList
{
- CachedDisplayList() {}
CachedDisplayList( TQ3GeometryObject inGeom,
GLenum inMode );
CachedDisplayList( const CachedDisplayList& inOther );
@@ -84,11 +84,11 @@
bool IsStale() const;
- CQ3ObjectRef mGeomObject;
+ CQ3WeakObjectRef mGeomObject;
+ TQ3GeometryObject mSortKey;
TQ3Uns32 mEditIndex;
GLuint mDisplayList;
GLenum mGLMode;
- TQ3Uns32 mModeCount;
};
typedef std::vector< CachedDisplayList > DisplayListVec;
@@ -96,11 +96,12 @@
class DisplayListCache : public CQ3GPSharedCache
{
public:
+ DisplayListCache() {}
+
CachedDisplayList* FindDisplayList( TQ3GeometryObject inGeom,
GLenum inMode );
void RenderList( const CachedDisplayList* inList );
void AddList( const CachedDisplayList& inList );
- void UpdateModeCount( TQ3GeometryObject inGeom );
void FlushUnreferenced();
void FlushStale();
@@ -110,7 +111,7 @@
DisplayListVec mDisplayLists;
};
- // Comparator for ordering cached display lists by their geometries
+ // Comparator for ordering cached display lists by their modes and geometries
struct GeomLess
{
bool operator()( const CachedDisplayList& inOne,
@@ -119,7 +120,7 @@
return (inOne.mGLMode < inTwo.mGLMode) ||
(
(inOne.mGLMode == inTwo.mGLMode) &&
- (inOne.mGeomObject.get() < inTwo.mGeomObject.get())
+ (inOne.mSortKey < inTwo.mSortKey)
);
}
};
@@ -129,9 +130,7 @@
{
bool operator()( const CachedDisplayList& inCachedDL ) const
{
- return Q3Shared_GetReferenceCount(
- inCachedDL.mGeomObject.get() ) >
- inCachedDL.mModeCount;
+ return inCachedDL.mGeomObject.isvalid();
}
};
@@ -151,36 +150,38 @@
//-----------------------------------------------------------------------------
CachedDisplayList::CachedDisplayList( TQ3GeometryObject inGeom, GLenum inMode )
- : mGeomObject( Q3Shared_GetReference( inGeom ) )
+ : mGeomObject( inGeom )
+ , mSortKey( inGeom )
, mEditIndex( Q3Shared_GetEditIndex( inGeom ) )
+ , mDisplayList( 0 )
, mGLMode( inMode )
- , mModeCount( 1 )
{
// Leave other fields uninitialized for now
}
CachedDisplayList::CachedDisplayList( const CachedDisplayList& inOther )
: mGeomObject( inOther.mGeomObject )
+ , mSortKey( inOther.mSortKey )
, mEditIndex( inOther.mEditIndex )
, mDisplayList( inOther.mDisplayList )
, mGLMode( inOther.mGLMode )
- , mModeCount( inOther.mModeCount )
{
}
CachedDisplayList& CachedDisplayList::operator=( const CachedDisplayList& inOther )
{
mGeomObject = inOther.mGeomObject;
+ mSortKey = inOther.mSortKey;
mEditIndex = inOther.mEditIndex;
mDisplayList = inOther.mDisplayList;
mGLMode = inOther.mGLMode;
- mModeCount = inOther.mModeCount;
return *this;
}
bool CachedDisplayList::IsStale() const
{
- return Q3Shared_GetEditIndex( mGeomObject.get() ) != mEditIndex;
+ return mGeomObject.isvalid() &&
+ (Q3Shared_GetEditIndex( mGeomObject.get() ) != mEditIndex);
}
static DisplayListCache* GetDisplayListCache( TQ3GLContext glContext )
@@ -235,38 +236,12 @@
mDisplayLists.begin(), mDisplayLists.end(), inList, GeomLess() );
mDisplayLists.insert( placeIt, inList );
-
- UpdateModeCount( inList.mGeomObject.get() );
}
catch (...)
{
}
}
-void DisplayListCache::UpdateModeCount( TQ3GeometryObject inGeom )
-{
- CachedDisplayList* stripDL = FindDisplayList( inGeom, GL_TRIANGLE_STRIP );
- CachedDisplayList* triDL = FindDisplayList( inGeom, GL_TRIANGLES );
- CachedDisplayList* lineDL = FindDisplayList( inGeom, GL_LINES );
-
- int modeCount = (stripDL? 1 : 0) + (triDL? 1 : 0) + (lineDL? 1 : 0);
-
- if (modeCount > 0)
- {
- if (stripDL)
- {
- stripDL->mModeCount = modeCount;
- }
- if (triDL)
- {
- triDL->mModeCount = modeCount;
- }
- if (lineDL)
- {
- lineDL->mModeCount = modeCount;
- }
- }
-}
void DisplayListCache::FlushStale()
@@ -275,19 +250,16 @@
DisplayListVec::iterator startStale = std::stable_partition(
mDisplayLists.begin(), mDisplayLists.end(), IsNotStale() );
- // Make a copy of the records that will go away
- DisplayListVec doomedDLs( startStale, mDisplayLists.end() );
+ // Delete the stale display lists
+ DisplayListVec::iterator endIt = mDisplayLists.end();
+ for (DisplayListVec::iterator i = startStale; i != endIt; ++i)
+ {
+ glDeleteLists( i->mDisplayList, 1 );
+ i->mDisplayList = 0;
+ }
// Remove them from the normal array
mDisplayLists.erase( startStale, mDisplayLists.end() );
-
- // Delete the lists for the records that are going away
- for (DisplayListVec::iterator i = doomedDLs.begin(); i != doomedDLs.end(); ++i)
- {
- glDeleteLists( i->mDisplayList, 1 );
-
- UpdateModeCount( i->mGeomObject.get() );
- }
}
@@ -297,19 +269,16 @@
DisplayListVec::iterator startUnused = std::stable_partition(
mDisplayLists.begin(), mDisplayLists.end(), IsReferenced() );
- // Make a copy of the records that will go away
- DisplayListVec doomedDLs( startUnused, mDisplayLists.end() );
-
- // Remove them from the normal array
- mDisplayLists.erase( startUnused, mDisplayLists.end() );
-
- // Delete the lists for the records that are going away
- for (DisplayListVec::iterator i = doomedDLs.begin(); i != doomedDLs.end(); ++i)
+ // Delete the unused display lists
+ DisplayListVec::iterator endIt = mDisplayLists.end();
+ for (DisplayListVec::iterator i = startUnused; i != endIt; ++i)
{
glDeleteLists( i->mDisplayList, 1 );
-
- UpdateModeCount( i->mGeomObject.get() );
+ i->mDisplayList = 0;
}
+
+ // Remove them from the array
+ mDisplayLists.erase( startUnused, endIt );
}
Modified: trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.cpp 2016-08-09 23:32:15 UTC (rev 3345)
@@ -5,7 +5,7 @@
Quesa OpenGL shadow volume caching.
COPYRIGHT:
- Copyright (c) 2011-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 2011-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -46,7 +46,7 @@
//-----------------------------------------------------------------------------
#include "GLShadowVolumeManager.h"
#include "GLGPUSharing.h"
-#include "CQ3ObjectRef.h"
+#include "CQ3WeakObjectRef.h"
#include "GLUtils.h"
#include "E3Main.h"
#include "GLVBOManager.h"
@@ -55,6 +55,7 @@
#include <algorithm>
#include <cstddef>
#include <map>
+#include <utility>
//=============================================================================
// Internal constants
@@ -90,15 +91,16 @@
namespace
{
- typedef std::map< TQ3LightObject, class ShadowVBO* > LightToShadow;
- typedef std::map< TQ3GeometryObject, LightToShadow > GeomToLightToShadow;
+ typedef std::pair< TQ3GeometryObject, TQ3LightObject > GeomAndLight;
- typedef std::map< TQ3GeometryObject, class ShadowVBO* > GeomToShadow;
- typedef std::map< TQ3LightObject, GeomToShadow > LightToGeomToShadow;
+ typedef std::vector< class ShadowVBO* > ShadowVec;
+ typedef std::vector< GeomAndLight > GeomLightVec;
- typedef std::vector< CQ3ObjectRef > ObVec;
+ typedef std::map< GeomAndLight, ShadowVec > GeomLightToShadows;
const TQ3RationalPoint4D kDummyPoint = { 0.0f, 0.0f, 0.0f, 0.0f };
+
+ const float kMaxLightDistSq = 7.0e-6f;
/*!
@class ShadowVBO
@@ -107,20 +109,22 @@
class ShadowVBO
{
public:
- ShadowVBO();
+ ShadowVBO(); // used for linked list sentinels
ShadowVBO( TQ3GeometryObject inGeom,
TQ3LightObject inLight,
const TQ3RationalPoint4D& inLocalLightPos );
~ShadowVBO();
- bool IsStale( const TQ3RationalPoint4D& inLocalLightPos ) const;
+ bool IsStale() const;
- CQ3ObjectRef mGeomObject;
+ CQ3WeakObjectRef mGeomObject;
TQ3Uns32 mGeomEditIndex;
- CQ3ObjectRef mLightObject;
+ CQ3WeakObjectRef mLightObject;
TQ3RationalPoint4D mLocalLightPosition; // w is 0 or 1
+ GeomAndLight mMapKey;
+
TQ3Uns32 mNumTriIndices;
TQ3Uns32 mNumQuadIndices;
GLuint mGLBufferNames[2]; // 0 is array, 1 is index
@@ -150,25 +154,21 @@
~ShadowVolCache();
void DeleteVBO( ShadowVBO* inCachedVBO, const GLBufferFuncs& inFuncs );
- void DeleteFromLightToGeomMap( ShadowVBO* inCachedVBO );
- void DeleteFromGeomToLightMap( ShadowVBO* inCachedVBO );
ShadowVBO* FindVBO( TQ3GeometryObject inGeom,
TQ3LightObject inLight,
const TQ3RationalPoint4D& inLocalLightPos,
const GLBufferFuncs& inFuncs );
void RenderVBO( ShadowVBO* inCachedVBO, const GLBufferFuncs& inFuncs );
void AddVBO( ShadowVBO* inVBO );
- void FlushUnreferencedGeometries( const GLBufferFuncs& inFuncs );
- void FlushUnreferencedLights( const GLBufferFuncs& inFuncs );
+ void FlushStaleShadows( const GLBufferFuncs& inFuncs );
void MakeRoom( TQ3Uns32 inBytesNeeded, const GLBufferFuncs& inFuncs );
void AddBytes( TQ3Uns32 inBytes );
void PurgeDownToSize( long long inTargetSize, const GLBufferFuncs& inFuncs );
void SetMaxBufferSize( long long inBufferSize, const GLBufferFuncs& inFuncs );
- TQ3Uns32 CountVBOs( TQ3GeometryObject inGeom ) const;
private:
- GeomToLightToShadow mGeomToLightToShadow;
- LightToGeomToShadow mLightToGeomToShadow;
+
+ GeomLightToShadows mGeomLightToShadows;
ShadowVBO mListOldEnd;
ShadowVBO mListNewEnd;
long long mTotalBytes;
@@ -206,7 +206,21 @@
return theCache;
}
+static bool IsSameLightPosition( const TQ3RationalPoint4D& a,
+ const TQ3RationalPoint4D& b )
+{
+ TQ3RationalPoint4D d =
+ {
+ a.x - b.x,
+ a.y - b.y,
+ a.z - b.z,
+ a.w - b.w
+ };
+ float distSq = d.x * d.x + d.y * d.y + d.z * d.z + d.w * d.w;
+ return distSq < kMaxLightDistSq;
+}
+
#pragma mark -
ShadowVBO::ShadowVBO()
@@ -221,10 +235,11 @@
ShadowVBO::ShadowVBO( TQ3GeometryObject inGeom,
TQ3LightObject inLight,
const TQ3RationalPoint4D& inLocalLightPos )
- : mGeomObject( Q3Shared_GetReference( inGeom ) )
+ : mGeomObject( inGeom )
, mGeomEditIndex( Q3Shared_GetEditIndex( inGeom ) )
- , mLightObject( Q3Shared_GetReference( inLight ) )
+ , mLightObject( inLight )
, mLocalLightPosition( inLocalLightPos )
+ , mMapKey( inGeom, inLight )
, mBufferBytes( 0 )
, mPrev( NULL )
, mNext( NULL )
@@ -236,31 +251,19 @@
{
}
-bool ShadowVBO::IsStale( const TQ3RationalPoint4D& inLocalLightPos ) const
+bool ShadowVBO::IsStale() const
{
- bool stale = static_cast<E3Shared*>( mGeomObject.get() )->GetEditIndex() !=
- mGeomEditIndex;
- if (! stale)
+ bool stale = true;
+
+ if (mGeomObject.isvalid() && mLightObject.isvalid())
{
- TQ3RationalPoint4D posDelta =
+ TQ3Uns32 curEditIndex = static_cast<E3Shared*>( mGeomObject.get() )->GetEditIndex();
+ if (curEditIndex == mGeomEditIndex)
{
- inLocalLightPos.x - mLocalLightPosition.x,
- inLocalLightPos.y - mLocalLightPosition.y,
- inLocalLightPos.z - mLocalLightPosition.z,
- inLocalLightPos.w - mLocalLightPosition.w
- };
- float distSq = posDelta.x * posDelta.x + posDelta.y * posDelta.y +
- posDelta.z * posDelta.z + posDelta.w * posDelta.w;
- stale = (distSq > 7.0e-6f);
- if (stale)
- {
- //Q3_MESSAGE_FMT( "Stale shadow due to light position error %f", distSq );
+ stale = false;
}
}
- else
- {
- //Q3_MESSAGE_FMT( "Stale shadow due to geom edit index" );
- }
+
return stale;
}
@@ -280,14 +283,14 @@
// of its sharing group has gone away. Hopefully, this will automatically
// clear the VBOs from VRAM. Hence, we do not need or want to call DeleteVBO,
// but we do want to delete the ShadowVBO objects.
- for (GeomToLightToShadow::iterator i = mGeomToLightToShadow.begin();
- i != mGeomToLightToShadow.end(); ++i)
+ ShadowVBO* listItem = mListOldEnd.mNext;
+
+ while (listItem != &mListNewEnd)
{
- LightToShadow& lMap( i->second );
- for (LightToShadow::iterator j = lMap.begin(); j != lMap.end(); ++j)
- {
- delete j->second;
- }
+ listItem->mPrev->mNext = listItem->mNext;
+ listItem->mNext->mPrev = listItem->mPrev;
+ delete listItem;
+ listItem = mListOldEnd.mNext;
}
}
@@ -309,55 +312,21 @@
delete inCachedVBO;
}
-void ShadowVolCache::DeleteFromLightToGeomMap( ShadowVBO* inCachedVBO )
-{
- LightToGeomToShadow::iterator foundLight = mLightToGeomToShadow.find(
- inCachedVBO->mLightObject.get() );
- if (foundLight != mLightToGeomToShadow.end())
- {
- GeomToShadow& geomToShadowMap( foundLight->second );
- GeomToShadow::iterator foundGeom = geomToShadowMap.find(
- inCachedVBO->mGeomObject.get() );
- if (foundGeom != geomToShadowMap.end())
- {
- geomToShadowMap.erase( foundGeom );
-
- if (geomToShadowMap.empty())
- {
- mLightToGeomToShadow.erase( foundLight );
- }
- }
- }
-}
-void ShadowVolCache::DeleteFromGeomToLightMap( ShadowVBO* inCachedVBO )
+void ShadowVolCache::AddVBO( ShadowVBO* inVBO )
{
- GeomToLightToShadow::iterator foundGeom = mGeomToLightToShadow.find(
- inCachedVBO->mGeomObject.get() );
- if (foundGeom != mGeomToLightToShadow.end())
+ // Add the new record to our map
+ GeomAndLight key( inVBO->mGeomObject.get(), inVBO->mLightObject.get() );
+
+ GeomLightToShadows::iterator found = mGeomLightToShadows.find( key );
+
+ if (found == mGeomLightToShadows.end())
{
- LightToShadow& lightToShadowMap( foundGeom->second );
- LightToShadow::iterator foundLight = lightToShadowMap.find(
- inCachedVBO->mLightObject.get() );
- if (foundLight != lightToShadowMap.end())
- {
- lightToShadowMap.erase( foundLight );
-
- if (lightToShadowMap.empty())
- {
- mGeomToLightToShadow.erase( foundGeom );
- }
- }
+ mGeomLightToShadows[ key ] = ShadowVec();
+ found = mGeomLightToShadows.find( key );
}
-}
-
-void ShadowVolCache::AddVBO( ShadowVBO* inVBO )
-{
- mGeomToLightToShadow[ inVBO->mGeomObject.get() ][ inVBO->mLightObject.get() ] =
- inVBO;
- mLightToGeomToShadow[ inVBO->mLightObject.get() ][ inVBO->mGeomObject.get() ] =
- inVBO;
+ found->second.push_back( inVBO );
// Insert the new record at the new end of a doubly-linked list.
inVBO->mNext = &mListNewEnd;
@@ -366,8 +335,6 @@
mListNewEnd.mPrev = inVBO;
mTotalBytes += inVBO->mBufferBytes;
-
- //Q3_MESSAGE_FMT("Shadow cache %lld bytes", mTotalBytes );
}
@@ -378,28 +345,29 @@
{
ShadowVBO* cachedShadow = NULL;
- GeomToLightToShadow::iterator foundGeom = mGeomToLightToShadow.find( inGeom );
+ GeomAndLight key( inGeom, inLight );
- if (foundGeom != mGeomToLightToShadow.end())
+ GeomLightToShadows::iterator found = mGeomLightToShadows.find( key );
+
+ if (found != mGeomLightToShadows.end())
{
- LightToShadow& lightToShadowMap( foundGeom->second );
- LightToShadow::iterator foundLight = lightToShadowMap.find( inLight );
+ ShadowVec& theShadows( found->second );
- if (foundLight != lightToShadowMap.end())
+ // Linear search for a light position that is close enough.
+ ShadowVec::iterator endIt = theShadows.end();
+ for (ShadowVec::iterator i = theShadows.begin(); i != endIt; ++i)
{
- cachedShadow = foundLight->second;
-
- if (cachedShadow->IsStale( inLocalLightPos ))
+ if (IsSameLightPosition( (*i)->mLocalLightPosition, inLocalLightPos ))
{
- lightToShadowMap.erase( foundLight );
- if (lightToShadowMap.empty())
+ cachedShadow = *i;
+
+ if (cachedShadow->IsStale())
{
- mGeomToLightToShadow.erase( foundGeom );
+ DeleteVBO( cachedShadow, inFuncs );
+ theShadows.erase( i );
+ cachedShadow = NULL;
+ break;
}
-
- DeleteFromLightToGeomMap( cachedShadow );
- DeleteVBO( cachedShadow, inFuncs );
- cachedShadow = NULL;
}
}
}
@@ -445,86 +413,52 @@
mListNewEnd.mPrev = inCachedVBO;
}
-void ShadowVolCache::FlushUnreferencedGeometries( const GLBufferFuncs& inFuncs )
+void ShadowVolCache::FlushStaleShadows( const GLBufferFuncs& inFuncs )
{
- ObVec geomsToFlush;
- TQ3GeometryObject theGeom;
+ GeomLightVec toFlush;
+ ShadowVec staleShadows;
- for (GeomToLightToShadow::const_iterator geomIt = mGeomToLightToShadow.begin();
- geomIt != mGeomToLightToShadow.end(); ++geomIt)
+ GeomLightToShadows::iterator endMap = mGeomLightToShadows.end();
+ for (GeomLightToShadows::iterator i = mGeomLightToShadows.begin();
+ i != endMap; ++i)
{
- theGeom = geomIt->first;
- TQ3Uns32 vboRefs = ::CountVBOs( theGeom );
- TQ3Uns32 shadowRefs = ShadowVolMgr::CountVBOs( theGeom );
- TQ3Uns32 totalRefs = Q3Shared_GetReferenceCount( theGeom );
- if (vboRefs + shadowRefs == totalRefs)
+ ShadowVec& theShadows( i->second );
+ // Find the first stale shadow
+ ShadowVec::iterator endVec = theShadows.end();
+ ShadowVec::iterator first;
+ for (first = theShadows.begin(); first != endVec; ++first)
{
- const LightToShadow& ltos( geomIt->second );
- const ShadowVBO* aVBO = ltos.begin()->second;
- geomsToFlush.push_back( aVBO->mGeomObject );
- }
- }
-
- for (ObVec::const_iterator j = geomsToFlush.begin(); j != geomsToFlush.end(); ++j)
- {
- theGeom = j->get();
-
- GeomToLightToShadow::iterator foundGeom = mGeomToLightToShadow.find( theGeom );
- if (foundGeom != mGeomToLightToShadow.end())
- {
- LightToShadow& lightMap( foundGeom->second );
- for (LightToShadow::iterator k = lightMap.begin(); k != lightMap.end(); ++k)
+ if ((*first)->IsStale())
{
- DeleteFromLightToGeomMap( k->second );
- DeleteVBO( k->second, inFuncs );
+ break;
}
- mGeomToLightToShadow.erase( foundGeom );
}
- }
-}
-
-void ShadowVolCache::FlushUnreferencedLights( const GLBufferFuncs& inFuncs )
-{
- ObVec lightsToFlush;
- TQ3LightObject theLight;
-
- for (LightToGeomToShadow::const_iterator lightIt = mLightToGeomToShadow.begin();
- lightIt != mLightToGeomToShadow.end(); ++lightIt)
- {
- theLight = lightIt->first;
- TQ3Uns32 shadowRefs = static_cast<TQ3Uns32>(lightIt->second.size());
- TQ3Uns32 totalRefs = Q3Shared_GetReferenceCount( theLight );
- if (shadowRefs == totalRefs)
+ if (first != endVec)
{
- const GeomToShadow& gtos( lightIt->second );
- const ShadowVBO* aVBO = gtos.begin()->second;
- lightsToFlush.push_back( aVBO->mLightObject );
- }
- }
-
- for (ObVec::const_iterator j = lightsToFlush.begin(); j != lightsToFlush.end(); ++j)
- {
- theLight = j->get();
-
- GeomToLightToShadow::iterator foundLight = mLightToGeomToShadow.find( theLight );
- if (foundLight != mLightToGeomToShadow.end())
- {
- GeomToShadow& geomMap( foundLight->second );
- for (GeomToShadow::iterator k = geomMap.begin(); k != geomMap.end(); ++k)
+ // As we go, delete stale ones and move the good ones to the left.
+ // The algorithm is similar to std::remove_if.
+ DeleteVBO( *first, inFuncs );
+
+ ShadowVec::iterator j;
+
+ for (j = first, ++j; j != endVec; ++j)
{
- DeleteFromGeomToLightMap( k->second );
- DeleteVBO( k->second, inFuncs );
+ if ((*j)->IsStale())
+ {
+ DeleteVBO( *j, inFuncs );
+ }
+ else
+ {
+ *first = *j;
+ ++first;
+ }
}
- mLightToGeomToShadow.erase( foundLight );
+ theShadows.erase( first, endVec );
}
}
-
- if (not lightsToFlush.empty())
- {
- Q3_MESSAGE_FMT( "Flushed %d lights", (int)lightsToFlush.size() );
- }
}
+
void ShadowVolCache::MakeRoom( TQ3Uns32 inBytesNeeded, const GLBufferFuncs& inFuncs )
{
if ( (inBytesNeeded < mMaxBufferBytes) &&
@@ -538,14 +472,27 @@
void ShadowVolCache::PurgeDownToSize( long long inTargetSize, const GLBufferFuncs& inFuncs )
{
- while (mTotalBytes > inTargetSize)
+ while ( (mTotalBytes > inTargetSize) && (mListOldEnd.mNext != &mListNewEnd) )
{
// Find the least recently used VBO from the doubly-linked list
ShadowVBO* oldestVBO = mListOldEnd.mNext;
- // Remove it from the map indexes
- DeleteFromLightToGeomMap( oldestVBO );
- DeleteFromGeomToLightMap( oldestVBO );
+ // Remove it from the map index
+ GeomLightToShadows::iterator found = mGeomLightToShadows.find( oldestVBO->mMapKey );
+ if (found != mGeomLightToShadows.end())
+ {
+ ShadowVec& theShadows( found->second );
+ ShadowVec::iterator foundShadow = std::find( theShadows.begin(),
+ theShadows.end(), oldestVBO );
+ if (foundShadow != theShadows.end())
+ {
+ theShadows.erase( foundShadow );
+ if (theShadows.empty())
+ {
+ mGeomLightToShadows.erase( found );
+ }
+ }
+ }
// Remove it from the doubly linked list, remove the VBOs, update
// mTotalBytes, and delete the ShadowVBO record.
@@ -563,17 +510,6 @@
mMaxBufferBytes = inBufferSize;
}
-TQ3Uns32 ShadowVolCache::CountVBOs( TQ3GeometryObject inGeom ) const
-{
- TQ3Uns32 shadowRefs = 0;
- GeomToLightToShadow::const_iterator geomIt = mGeomToLightToShadow.find( inGeom );
- if (geomIt != mGeomToLightToShadow.end())
- {
- shadowRefs = (TQ3Uns32) geomIt->second.size();
- }
- return shadowRefs;
-}
-
#pragma mark -
/*!
@@ -717,34 +653,7 @@
if (theCache != NULL)
{
- theCache->FlushUnreferencedGeometries( inFuncs );
- theCache->FlushUnreferencedLights( inFuncs );
+ theCache->FlushStaleShadows( inFuncs );
}
}
-
-/*!
- @function CountVBOs
- @abstract Count how many references the shadow VBO manager holds for a given
- geometry, counting all GL contexts and all lights.
- @param inGeom A geometry object.
- @result Number of VBOs referencing the geometry.
-*/
-TQ3Uns32 ShadowVolMgr::CountVBOs( TQ3GeometryObject inGeom )
-{
- TQ3Uns32 refCount = 0;
- TQ3GLContext sharingBase = NULL;
-
- while ( (sharingBase = GLGPUSharing_GetNextSharingBase( sharingBase )) != NULL )
- {
- ShadowVolCache* theCache = GetShadowCache( sharingBase );
-
- if (theCache != NULL)
- {
- refCount += theCache->CountVBOs( inGeom );
- }
- }
-
- return refCount;
-}
-
Modified: trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.h
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.h 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Renderers/Common/GLShadowVolumeManager.h 2016-08-09 23:32:15 UTC (rev 3345)
@@ -10,7 +10,7 @@
GLUtils_CheckExtensions.
COPYRIGHT:
- Copyright (c) 2011-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 2011-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -134,14 +134,6 @@
const GLBufferFuncs& inFuncs,
TQ3RendererObject inRenderer );
-/*!
- @function CountVBOs
- @abstract Count how many references the shadow VBO manager holds for a given
- geometry, counting all GL contexts and all lights.
- @param inGeom A geometry object.
- @result Number of VBOs referencing the geometry.
-*/
-TQ3Uns32 CountVBOs( TQ3GeometryObject inGeom );
}
Modified: trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.cpp 2016-08-09 23:32:15 UTC (rev 3345)
@@ -5,7 +5,7 @@
Quesa OpenGL vertex buffer object caching.
COPYRIGHT:
- Copyright (c) 2007-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 2007-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -47,7 +47,7 @@
#include "GLVBOManager.h"
#include "GLShadowVolumeManager.h"
#include "GLGPUSharing.h"
-#include "CQ3ObjectRef.h"
+#include "CQ3WeakObjectRef.h"
#include "GLUtils.h"
#include "E3Main.h"
@@ -111,14 +111,15 @@
#pragma mark struct CachedVBO
struct CachedVBO
{
- CachedVBO();
+ CachedVBO(); // only for linked list sentinels
CachedVBO( TQ3GeometryObject inGeom, GLenum inMode );
~CachedVBO() {}
bool IsStale() const;
- CQ3ObjectRef mGeomObject;
+ CQ3WeakObjectRef mGeomObject;
+ TQ3Object mSortKey;
TQ3Uns32 mEditIndex;
GLenum mGLMode; // e.g., GL_TRIANGLES
TQ3Uns32 mNumIndices;
@@ -152,7 +153,6 @@
void FlushUnreferenced( const GLBufferFuncs& inFuncs );
void DeleteVBO( CachedVBO* inCachedVBO, const GLBufferFuncs& inFuncs );
void DeleteCachedVBOs( CachedVBOVec& inVBOs, const GLBufferFuncs& inFuncs );
- TQ3Uns32 CountVBOs( TQ3GeometryObject inGeom );
void PurgeDownToSize( long long inTargetSize, const GLBufferFuncs& inFuncs );
void SetMaxBufferSize( long long inBufferSize, const GLBufferFuncs& inFuncs );
void MakeRoom( TQ3Uns32 inBytesNeeded, const GLBufferFuncs& inFuncs );
@@ -185,7 +185,7 @@
{
bool operator()( const CachedVBO* inOne, const CachedVBO* inTwo ) const
{
- return (inOne->mGeomObject.get() < inTwo->mGeomObject.get());
+ return (inOne->mSortKey < inTwo->mSortKey);
}
};
@@ -194,12 +194,7 @@
{
bool operator()( const CachedVBO* inCachedVBO ) const
{
- TQ3GeometryObject geom =
- inCachedVBO->mGeomObject.get();
- TQ3Uns32 allRefs = Q3Shared_GetReferenceCount( geom );
- TQ3Uns32 vboRefs = CountVBOs( geom );
- TQ3Uns32 shadowRefs = ShadowVolMgr::CountVBOs( geom );
- return allRefs > vboRefs + shadowRefs;
+ return inCachedVBO->mGeomObject.isvalid();
}
};
}
@@ -259,7 +254,7 @@
{
CachedVBOVec::size_type mid = (lowIndex + highIndex) / 2;
- if (vboArray[ mid ]->mGeomObject.get() < inGeom)
+ if (vboArray[ mid ]->mSortKey < inGeom)
{
lowIndex = mid + 1;
}
@@ -269,7 +264,8 @@
}
}
- if ( (lowIndex == highIndex) && (vboArray[ lowIndex ]->mGeomObject.get() == inGeom) )
+ if ( (lowIndex == highIndex) &&
+ (vboArray[ lowIndex ]->mGeomObject.get() == inGeom) )
{
foundIt = inVBOs.begin() + lowIndex;
}
@@ -327,7 +323,8 @@
#pragma mark -
CachedVBO::CachedVBO( TQ3GeometryObject inGeom, GLenum inMode )
- : mGeomObject( Q3Shared_GetReference( inGeom ) )
+ : mGeomObject( inGeom )
+ , mSortKey( inGeom )
, mEditIndex( Q3Shared_GetEditIndex( inGeom ) )
, mGLMode( inMode )
, mBufferBytes( 0 )
@@ -339,6 +336,7 @@
CachedVBO::CachedVBO()
: mGeomObject()
+ , mSortKey( NULL )
, mBufferBytes( 0 )
, mPrev( NULL )
, mNext( NULL )
@@ -435,19 +433,6 @@
return theCachedVBO;
}
-TQ3Uns32 VBOCache::CountVBOs( TQ3GeometryObject inGeom )
-{
- TQ3Uns32 refCount = 0;
-
- CachedVBO* stripVBO = FindVBOInVec( inGeom, mCachedVBOs_strips );
- CachedVBO* triVBO = FindVBOInVec( inGeom, mCachedVBOs_triangles );
- CachedVBO* lineVBO = FindVBOInVec( inGeom, mCachedVBOs_lines );
-
- refCount = (stripVBO? 1 : 0) + (triVBO? 1 : 0) + (lineVBO? 1 : 0);
-
- return refCount;
-}
-
void VBOCache::AddToUsageList( CachedVBO* ioVBO )
{
// Insert the new record at the "new" end of a doubly-linked list.
@@ -587,7 +572,7 @@
CachedVBOVec::iterator foundIt = std::lower_bound( whichVec->begin(),
whichVec->end(), oldestVBO, VBOLess() );
if ( (foundIt != whichVec->end()) &&
- ((*foundIt)->mGeomObject.get() == oldestVBO->mGeomObject.get()) )
+ ((*foundIt)->mSortKey == oldestVBO->mSortKey) )
{
whichVec->erase( foundIt );
}
@@ -811,27 +796,3 @@
}
-/*!
- @function CountVBOs
- @abstract Count how many references the VBO manager holds for a given
- geometry, counting all GL contexts and all modes.
- @param inGeom A geometry object.
- @result Number of VBOs referencing the geometry.
-*/
-TQ3Uns32 CountVBOs( TQ3GeometryObject inGeom )
-{
- TQ3Uns32 refCount = 0;
- TQ3GLContext sharingBase = NULL;
-
- while ( (sharingBase = GLGPUSharing_GetNextSharingBase( sharingBase )) != NULL )
- {
- VBOCache* theCache = GetVBOCache( sharingBase );
-
- if (theCache != NULL)
- {
- refCount += theCache->CountVBOs( inGeom );
- }
- }
-
- return refCount;
-}
Modified: trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/Development/Source/Renderers/Common/GLVBOManager.h 2016-08-09 23:32:15 UTC (rev 3345)
@@ -10,7 +10,7 @@
GLUtils_CheckExtensions.
COPYRIGHT:
- Copyright (c) 2007-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 2007-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -205,15 +205,6 @@
const GLBufferFuncs& inFuncs );
-/*!
- @function CountVBOs
- @abstract Count how many references the VBO manager holds for a given
- geometry, counting all GL contexts and all modes.
- @param inGeom A geometry object.
- @result Number of VBOs referencing the geometry.
-*/
-TQ3Uns32 CountVBOs( TQ3GeometryObject inGeom );
-
//=============================================================================
// C++ postamble
//-----------------------------------------------------------------------------
Added: trunk/quesa/SDK/Includes/Quesa/CQ3WeakObjectRef.h
===================================================================
--- trunk/quesa/SDK/Includes/Quesa/CQ3WeakObjectRef.h (rev 0)
+++ trunk/quesa/SDK/Includes/Quesa/CQ3WeakObjectRef.h 2016-08-09 23:32:15 UTC (rev 3345)
@@ -0,0 +1,182 @@
+/*!
+ @header CQ3WeakObjectRef.h
+ Wrapper class for zeroing weak reference to a Quesa object.
+*/
+/* NAME:
+ CQ3WeakObjectRef.h
+
+ DESCRIPTION:
+ C++ wrapper class for zeroing weak reference to a Quesa object.
+
+ COPYRIGHT:
+ Copyright (c) 2016, Quesa Developers. All rights reserved.
+
+ For the current release of Quesa, please see:
+
+ <http://quesa.sourceforge.net/>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ o Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ o Neither the name of Quesa nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ ___________________________________________________________________________
+*/
+#ifndef CQ3WEAKOBJECTREF_HDR
+#define CQ3WEAKOBJECTREF_HDR
+
+//=============================================================================
+// Include files
+//-----------------------------------------------------------------------------
+#include "Quesa.h"
+
+
+//=============================================================================
+// Class declarations
+//-----------------------------------------------------------------------------
+class CQ3WeakObjectRef
+{
+public:
+ /*
+ @function CQ3WeakObjectRef
+ @abstract Default constructor.
+ */
+ CQ3WeakObjectRef()
+ : mObject( NULL ) {}
+
+ /*
+ @function CQ3WeakObjectRef
+ @abstract Copy constructor.
+ @param inOther Another CQ3WeakObjectRef.
+ */
+ CQ3WeakObjectRef( const CQ3WeakObjectRef& inOther );
+
+ /*!
+ @function CQ3WeakObjectRef
+ @abstract Constructor from a TQ3Object.
+ @param inObject A reference to a Quesa object,
+ or NULL.
+ */
+ explicit CQ3WeakObjectRef( TQ3Object inObject );
+
+ /*!
+ @function ~CQ3WeakObjectRef
+ @abstract Destructor.
+ @discussion Releases the weak reference if it is not NULL.
+ */
+ ~CQ3WeakObjectRef();
+
+ /*!
+ @function operator=
+ @abstract Assignment operator.
+ @discussion The previous reference held by this wrapper
+ is released, and a new reference replaces
+ it.
+ @param inOther Another CQ3WeakObjectRef.
+ */
+ CQ3WeakObjectRef& operator=( const CQ3WeakObjectRef& inOther );
+
+ /*!
+ @function isvalid
+ @abstract Test whether this object holds a Quesa object.
+ @result True if it holds a non-NULL Quesa object.
+ */
+ bool isvalid() const { return mObject != NULL; }
+
+ /*!
+ @function get
+ @abstract Get the value held by the wrapper.
+ @result A TQ3Object, or NULL.
+ */
+ TQ3SharedObject get() const { return mObject; }
+
+private:
+ TQ3Object mObject;
+};
+
+//=============================================================================
+// Inline method definitions
+//-----------------------------------------------------------------------------
+inline CQ3WeakObjectRef::CQ3WeakObjectRef( const CQ3WeakObjectRef& inOther )
+ : mObject( inOther.mObject )
+{
+ if (isvalid())
+ {
+ Q3Object_GetWeakReference( &mObject );
+ }
+}
+
+/*!
+ @function CQ3WeakObjectRef
+ @abstract Constructor from a TQ3Object.
+ @param inObject A reference to a Quesa object,
+ or NULL.
+*/
+inline CQ3WeakObjectRef::CQ3WeakObjectRef( TQ3Object inObject )
+ : mObject( inObject )
+{
+ if (isvalid())
+ {
+ Q3Object_GetWeakReference( &mObject );
+ }
+}
+
+/*!
+ @function ~CQ3WeakObjectRef
+ @abstract Destructor.
+ @discussion Releases the weak reference if it is not NULL.
+*/
+inline CQ3WeakObjectRef::~CQ3WeakObjectRef()
+{
+ if (isvalid())
+ {
+ Q3Object_ReleaseWeakReference( &mObject );
+ }
+}
+
+/*!
+ @function operator=
+ @abstract Assignment operator.
+ @discussion The previous reference held by this wrapper
+ is released, and a new reference replaces
+ it.
+ @param inOther Another CQ3WeakObjectRef.
+*/
+inline CQ3WeakObjectRef& CQ3WeakObjectRef::operator=( const CQ3WeakObjectRef& inOther )
+{
+ if (isvalid())
+ {
+ Q3Object_ReleaseWeakReference( &mObject );
+ }
+ mObject = inOther.mObject;
+ if (isvalid())
+ {
+ Q3Object_GetWeakReference( &mObject );
+ }
+ return *this;
+}
+
+
+#endif
Modified: trunk/quesa/SDK/Includes/Quesa/Quesa.h
===================================================================
--- trunk/quesa/SDK/Includes/Quesa/Quesa.h 2016-08-09 00:46:22 UTC (rev 3344)
+++ trunk/quesa/SDK/Includes/Quesa/Quesa.h 2016-08-09 23:32:15 UTC (rev 3345)
@@ -8,7 +8,7 @@
Quesa public header.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -1812,8 +1812,44 @@
#endif // QUESA_ALLOW_QD3D_EXTENSIONS
+/*!
+ * @function
+ * Q3Object_GetWeakReference
+ * @abstract
+ * Register a zeroing weak reference to a Quesa object.
+ * @discussion
+ * A reference that has been registered using this function
+ * will become zero after the object has been deleted.
+ *
+ * The object being referenced is not required to be a
+ * reference-counted object. If it is, getting a zeroing
+ * weak reference does not change the reference count.
+ *
+ * If you are going to deallocate or reuse the given memory
+ * location before it becomes zero, you MUST first
+ * use <code>Q3Object_ReleaseWeakReference</code>.
+ *
+ * @param theRefAddress Address of an object reference.
+*/
+Q3_EXTERN_API_C( void )
+Q3Object_GetWeakReference( TQ3Object* theRefAddress );
+
/*!
+ * @function Q3Object_ReleaseWeakReference
+ * @abstract Deregister a zeroing weak reference to a Quesa object.
+ * @discussion A reference that has been deregistered using this function
+ * will become no longer become zero after the object has been
+ * deleted.
+ *
+ * @param theRefAddress Address of an object reference.
+*/
+Q3_EXTERN_API_C( void )
+Q3Object_ReleaseWeakReference( TQ3Object* theRefAddress );
+
+
+
+/*!
* @function
* Q3Object_Duplicate
* @discussion
@@ -2383,6 +2419,7 @@
#endif // QUESA_ALLOW_QD3D_EXTENSIONS
+
/*!
@function
Q3Shared_StartLoggingRefs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2016-08-09 00:46:23
|
Revision: 3344
http://sourceforge.net/p/quesa/code/3344
Author: jwwalker
Date: 2016-08-09 00:46:22 +0000 (Tue, 09 Aug 2016)
Log Message:
-----------
Make a Mac system version check more compatible.
Modified Paths:
--------------
trunk/quesa/Development/Source/Renderers/Common/GLDrawContext.c
Modified: trunk/quesa/Development/Source/Renderers/Common/GLDrawContext.c
===================================================================
--- trunk/quesa/Development/Source/Renderers/Common/GLDrawContext.c 2016-05-02 21:05:52 UTC (rev 3343)
+++ trunk/quesa/Development/Source/Renderers/Common/GLDrawContext.c 2016-08-09 00:46:22 UTC (rev 3344)
@@ -47,6 +47,7 @@
#include "GLDrawContext.h"
#include "GLGPUSharing.h"
#include "GLUtils.h"
+#include "QuesaMath.h"
#if QUESA_OS_COCOA
#include "GLCocoaContext.h"
@@ -1563,10 +1564,16 @@
- // Find the OS version
- SInt32 sysMajor = 0, sysMinor = 0;
- Gestalt( gestaltSystemVersionMajor, &sysMajor );
- Gestalt( gestaltSystemVersionMinor, &sysMinor );
+ // Find the OS version. Apple's gestaltSystemVersion breaks at 10.10, so
+ // we construct something similar that should work through 10.15.
+ SInt32 sysMajor = 0, sysMinor = 0, sysBugfix = 0;
+ ::Gestalt( gestaltSystemVersionMajor, &sysMajor );
+ ::Gestalt( gestaltSystemVersionMinor, &sysMinor );
+ ::Gestalt( gestaltSystemVersionBugFix, &sysBugfix );
+ sysMajor = ((sysMajor / 10) << 4) | (sysMajor % 10); // convert to BCD
+ sysMinor = Q3Math_Min( sysMinor, 15 ); // limit to 15
+ sysBugfix = Q3Math_Min( sysBugfix, 15 ); // limit to 15
+ sysVersion = (sysMajor << 8) | (sysMinor << 4) | sysBugfix;
@@ -1574,11 +1581,7 @@
// software renderer. This, for instance, has a larger viewport limit
// and shows specular highlights on textured material.
if ( (drawContextType == kQ3DrawContextTypePixmap) &&
- (
- (sysMajor > 10) ||
- ((sysMajor == 10) && (sysMinor >= 4))
- )
- )
+ (sysVersion >= 0x1040) )
{
rendererID = 0x20400;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2016-05-02 21:05:54
|
Revision: 3343
http://sourceforge.net/p/quesa/code/3343
Author: jwwalker
Date: 2016-05-02 21:05:52 +0000 (Mon, 02 May 2016)
Log Message:
-----------
Transparent rendering: Fixed a bug in emissive color handing of transparent geometry, minor optimizations.
Modified Paths:
--------------
trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.cpp
trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.h
Modified: trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.cpp 2016-03-18 22:36:17 UTC (rev 3342)
+++ trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.cpp 2016-05-02 21:05:52 UTC (rev 3343)
@@ -5,7 +5,7 @@
Source for Quesa OpenGL renderer class.
COPYRIGHT:
- Copyright (c) 2007-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 2007-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -182,6 +182,23 @@
return theDepth;
}
+static TQ3ColorRGB EmissiveColor( const TransparentPrim& inPrim )
+{
+ TQ3ColorRGB theColor;
+
+ // We are not doing per-vertex emissive color. See comments in UpdateEmission.
+ if ((inPrim.mVerts[0].flags & kVertexHaveEmissive) != 0)
+ {
+ theColor = inPrim.mVerts[0].emissiveColor;
+ }
+ else
+ {
+ theColor = kBlackColor;
+ }
+
+ return theColor;
+}
+
static bool IsSameColor( const TQ3ColorRGB& inA, const TQ3ColorRGB& inB )
{
float absDiff = fabsf( inA.r - inB.r ) + fabsf( inA.g - inB.g ) +
@@ -189,6 +206,18 @@
return absDiff < kQ3RealZero * 3.0f;
}
+static bool IsSameStyle( const PrimStyleState& inA, const PrimStyleState& inB )
+{
+ return
+ (inA.mFillStyle == inB.mFillStyle) &&
+ (inA.mBackfacingStyle == inB.mBackfacingStyle) &&
+ (inA.mOrientationStyle == inB.mOrientationStyle) &&
+ (inA.mInterpolationStyle == inB.mInterpolationStyle) &&
+ (inA.mIlluminationType == inB.mIlluminationType) &&
+ (inA.mFogStyleIndex == inB.mFogStyleIndex) &&
+ (fabsf( inA.mLineWidthStyle - inB.mLineWidthStyle ) < kQ3RealZero);
+}
+
/*!
@function IsSameState
@abstract Test whether two primitives are of the same type, in the sense
@@ -198,16 +227,11 @@
{
bool isSame = (inA.mNumVerts == inB.mNumVerts) &&
(inA.mTextureName == inB.mTextureName) &&
- (inA.mIlluminationType == inB.mIlluminationType) &&
+ (inA.mStyleIndex == inB.mStyleIndex) &&
(inA.mCameraToFrustumIndex == inB.mCameraToFrustumIndex) &&
- (inA.mFillStyle == inB.mFillStyle) &&
- (inA.mBackfacingStyle == inB.mBackfacingStyle) &&
- (inA.mOrientationStyle == inB.mOrientationStyle) &&
- (inA.mInterpolationStyle == inB.mInterpolationStyle) &&
- (inA.mFogStyleIndex == inB.mFogStyleIndex) &&
(fabsf( inA.mSpecularControl - inB.mSpecularControl ) < kQ3RealZero) &&
IsSameColor( inA.mSpecularColor, inB.mSpecularColor ) &&
- (fabsf( inA.mLineWidthStyle - inB.mLineWidthStyle ) < kQ3RealZero);
+ IsSameColor( EmissiveColor( inA ), EmissiveColor( inB ) );
// UV transform and U, V boundary only matter if there is a texture.
if ( isSame && (inA.mTextureName != 0) )
@@ -254,11 +278,7 @@
bool isSame = (inA.mNumVerts == inB.mNumVerts) &&
(inA.mTextureName == inB.mTextureName) &&
(inA.mCameraToFrustumIndex == inB.mCameraToFrustumIndex) &&
- (inA.mFillStyle == inB.mFillStyle) &&
- (inA.mBackfacingStyle == inB.mBackfacingStyle) &&
- (inA.mOrientationStyle == inB.mOrientationStyle) &&
- (inA.mInterpolationStyle == inB.mInterpolationStyle) &&
- (fabsf( inA.mLineWidthStyle - inB.mLineWidthStyle ) < kQ3RealZero);
+ (inA.mStyleIndex == inB.mStyleIndex);
// UV transform and U, V boundary only matter if there is a texture.
if ( isSame && (inA.mTextureName != 0) )
@@ -466,15 +486,23 @@
thePrim.mCameraToFrustumIndex = static_cast<TQ3Uns32>(mCameraToFrustumMatrices.size() - 1);
// Record some style state.
- thePrim.mFillStyle = mRenderer.mStyleState.mFill;
- thePrim.mOrientationStyle = mRenderer.mStyleState.mOrientation;
- thePrim.mBackfacingStyle = mRenderer.mStyleState.mBackfacing;
+ PrimStyleState style;
+ style.mFillStyle = mRenderer.mStyleState.mFill;
+ style.mOrientationStyle = mRenderer.mStyleState.mOrientation;
+ style.mBackfacingStyle = mRenderer.mStyleState.mBackfacing;
+ style.mInterpolationStyle = mRenderer.mStyleState.mInterpolation;
+ style.mIlluminationType = mRenderer.mViewIllumination;
+ style.mFogStyleIndex = mRenderer.mStyleState.mCurFogStyleIndex;
+ style.mLineWidthStyle = mRenderer.mLineWidth;
+ if ( mStyles.empty() ||
+ (! IsSameStyle( style, mStyles[ mStyles.size() - 1 ])) )
+ {
+ mStyles.push_back( style );
+ }
+ thePrim.mStyleIndex = mStyles.size() - 1;
+
thePrim.mSpecularColor = *mRenderer.mGeomState.specularColor;
thePrim.mSpecularControl = mRenderer.mCurrentSpecularControl;
- thePrim.mIlluminationType = mRenderer.mViewIllumination;
- thePrim.mFogStyleIndex = mRenderer.mStyleState.mCurFogStyleIndex;
- thePrim.mLineWidthStyle = mRenderer.mLineWidth;
- thePrim.mInterpolationStyle = mRenderer.mStyleState.mInterpolation;
// Make a new block.
TransparentBlock* theBlock = new TransparentBlock;
@@ -722,6 +750,21 @@
E3BoundingBox_SetFromPoints3D( &theBlock->mFrustumBounds,
&mWorkFrustumPts[0], inGeomData.numPoints, sizeof(TQ3Point3D) );
+ PrimStyleState style;
+ style.mFillStyle = mRenderer.mStyleState.mFill;
+ style.mOrientationStyle = mRenderer.mStyleState.mOrientation;
+ style.mBackfacingStyle = mRenderer.mStyleState.mBackfacing;
+ style.mInterpolationStyle = mRenderer.mStyleState.mInterpolation;
+ style.mIlluminationType = mRenderer.mViewIllumination;
+ style.mFogStyleIndex = mRenderer.mStyleState.mCurFogStyleIndex;
+ style.mLineWidthStyle = mRenderer.mLineWidth;
+ if ( mStyles.empty() ||
+ (! IsSameStyle( style, mStyles[ mStyles.size() - 1 ])) )
+ {
+ mStyles.push_back( style );
+ }
+ TQ3Uns32 styleIndex = mStyles.size() - 1;
+
// We need to create a lot of primitives. First fill in the fields that do
// not change.
Vertex protoVert;
@@ -732,15 +775,9 @@
thePrim.mVerts[1] = protoVert;
thePrim.mVerts[2] = protoVert;
thePrim.mCameraToFrustumIndex = cameraToFrustumIndex;
- thePrim.mFillStyle = mRenderer.mStyleState.mFill;
- thePrim.mOrientationStyle = mRenderer.mStyleState.mOrientation;
- thePrim.mBackfacingStyle = mRenderer.mStyleState.mBackfacing;
thePrim.mSpecularColor = *mRenderer.mGeomState.specularColor;
thePrim.mSpecularControl = mRenderer.mCurrentSpecularControl;
- thePrim.mIlluminationType = mRenderer.mViewIllumination;
- thePrim.mFogStyleIndex = mRenderer.mStyleState.mCurFogStyleIndex;
- thePrim.mLineWidthStyle = mRenderer.mLineWidth;
- thePrim.mInterpolationStyle = mRenderer.mStyleState.mInterpolation;
+ thePrim.mStyleIndex = styleIndex;
const Texture::TextureState& textureState(
mRenderer.mTextures.GetTextureState() );
if (! textureState.mIsTextureActive)
@@ -879,6 +916,7 @@
mCameraToFrustumMatrices.clear();
mUVTransforms.clear();
mRenderGroup.clear();
+ mStyles.clear();
for (TQ3Uns32 i = 0; i < mBlocks.size(); ++i)
{
@@ -958,7 +996,8 @@
void TransBuffer::UpdateLightingEnable(
const TransparentPrim& inPrim )
{
- bool shouldLight = inPrim.mIlluminationType != kQ3IlluminationTypeNULL;
+ bool shouldLight = mStyles[ inPrim.mStyleIndex ].mIlluminationType !=
+ kQ3IlluminationTypeNULL;
if (shouldLight != mIsLightingEnabled)
{
@@ -1027,50 +1066,52 @@
void TransBuffer::UpdateFog( const TransparentPrim& inPrim )
{
- if (inPrim.mFogStyleIndex != mRenderer.mStyleState.mCurFogStyleIndex)
+ TQ3Uns32 fogIndex = mStyles[ inPrim.mStyleIndex ].mFogStyleIndex;
+
+ if (fogIndex != mRenderer.mStyleState.mCurFogStyleIndex)
{
mRenderer.UpdateFogStyle(
- &mRenderer.mStyleState.mFogStyles[ inPrim.mFogStyleIndex ] );
+ &mRenderer.mStyleState.mFogStyles[ fogIndex ] );
}
}
void TransBuffer::UpdateFill( const TransparentPrim& inPrim )
{
- if (inPrim.mFillStyle != mRenderer.mStyleState.mFill)
+ if (mStyles[ inPrim.mStyleIndex ].mFillStyle != mRenderer.mStyleState.mFill)
{
- mRenderer.UpdateFillStyle( &inPrim.mFillStyle );
+ mRenderer.UpdateFillStyle( &mStyles[ inPrim.mStyleIndex ].mFillStyle );
}
}
void TransBuffer::UpdateOrientation( const TransparentPrim& inPrim )
{
- if (inPrim.mOrientationStyle != mRenderer.mStyleState.mOrientation)
+ if (mStyles[ inPrim.mStyleIndex ].mOrientationStyle != mRenderer.mStyleState.mOrientation)
{
- mRenderer.UpdateOrientationStyle( &inPrim.mOrientationStyle );
+ mRenderer.UpdateOrientationStyle( &mStyles[ inPrim.mStyleIndex ].mOrientationStyle );
}
}
void TransBuffer::UpdateBackfacing( const TransparentPrim& inPrim )
{
- if (inPrim.mBackfacingStyle != mRenderer.mStyleState.mBackfacing)
+ if (mStyles[ inPrim.mStyleIndex ].mBackfacingStyle != mRenderer.mStyleState.mBackfacing)
{
- mRenderer.UpdateBackfacingStyle( &inPrim.mBackfacingStyle );
+ mRenderer.UpdateBackfacingStyle( &mStyles[ inPrim.mStyleIndex ].mBackfacingStyle );
}
}
void TransBuffer::UpdateInterpolation( const TransparentPrim& inPrim )
{
- if (inPrim.mInterpolationStyle != mRenderer.mStyleState.mInterpolation)
+ if (mStyles[ inPrim.mStyleIndex ].mInterpolationStyle != mRenderer.mStyleState.mInterpolation)
{
- mRenderer.UpdateInterpolationStyle( &inPrim.mInterpolationStyle );
+ mRenderer.UpdateInterpolationStyle( &mStyles[ inPrim.mStyleIndex ].mInterpolationStyle );
}
}
void TransBuffer::UpdateLineWidth( const TransparentPrim& inPrim )
{
- if (inPrim.mLineWidthStyle != mRenderer.mLineWidth)
+ if (mStyles[ inPrim.mStyleIndex ].mLineWidthStyle != mRenderer.mLineWidth)
{
- mRenderer.UpdateLineWidthStyle( inPrim.mLineWidthStyle );
+ mRenderer.UpdateLineWidthStyle( mStyles[ inPrim.mStyleIndex ].mLineWidthStyle );
}
}
@@ -1124,14 +1165,7 @@
// using per-pixel lighting.
// Setting the emissive color before glBegin fixes that problem, and I think
// we can live without per-vertex emissive color.
- if ((inPrim.mVerts[0].flags & kVertexHaveEmissive) != 0)
- {
- SetEmissiveColor( inPrim.mVerts[0].emissiveColor );
- }
- else
- {
- SetEmissiveColor( kBlackColor );
- }
+ SetEmissiveColor( EmissiveColor( inPrim ) );
}
@@ -1341,7 +1375,7 @@
void TransBuffer::UpdateSpecular( const TransparentPrim& inPrim )
{
- if (inPrim.mIlluminationType == kQ3IlluminationTypePhong)
+ if (mStyles[ inPrim.mStyleIndex ].mIlluminationType == kQ3IlluminationTypePhong)
{
UpdateSpecularColor( inPrim.mSpecularColor );
@@ -1374,7 +1408,7 @@
UpdateBackfacing( leader );
UpdateLineWidth( leader );
UpdateInterpolation( leader );
- mPerPixelLighting.UpdateIllumination( leader.mIlluminationType );
+ mPerPixelLighting.UpdateIllumination( mStyles[ leader.mStyleIndex ].mIlluminationType );
UpdateSpecular( leader );
UpdateEmission( leader );
@@ -1575,6 +1609,13 @@
glEnable( GL_DEPTH_TEST );
glDepthFunc( GL_LEQUAL );
+ // Even though we use GL_LEQUAL, and the depths produced by the depth pass
+ // should be the same as the depths produced by the transparency pass,
+ // I was getting the transparent stuff partially masked out in some cases.
+ // So move the depth a tad deeper.
+ glEnable( GL_POLYGON_OFFSET_FILL );
+ glPolygonOffset( 1.0f, 1.0f );
+
// Set up alpha test
glEnable( GL_ALPHA_TEST );
glAlphaFunc( GL_GREATER, inAlphaThreshold );
@@ -1645,6 +1686,7 @@
}
// Restore GL state
+ glDisable( GL_POLYGON_OFFSET_FILL );
glDisable( GL_ALPHA_TEST );
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
}
Modified: trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.h
===================================================================
--- trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.h 2016-03-18 22:36:17 UTC (rev 3342)
+++ trunk/quesa/Development/Source/Renderers/OpenGL/QOTransBuffer.h 2016-05-02 21:05:52 UTC (rev 3343)
@@ -5,7 +5,7 @@
Header for Quesa OpenGL renderer class.
COPYRIGHT:
- Copyright (c) 2007-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 2007-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -61,6 +61,17 @@
class PerPixelLighting;
struct MeshArrays;
+struct PrimStyleState
+{
+ TQ3FillStyle mFillStyle;
+ TQ3OrientationStyle mOrientationStyle;
+ TQ3BackfacingStyle mBackfacingStyle;
+ TQ3InterpolationStyle mInterpolationStyle;
+ TQ3ObjectType mIlluminationType;
+ TQ3Uns32 mFogStyleIndex;
+ float mLineWidthStyle;
+};
+
struct TransparentPrim
{
TQ3Uns32 mNumVerts;
@@ -73,16 +84,10 @@
TQ3ShaderUVBoundary mShaderVBoundary;
TQ3Uns32 mUVTransformIndex;
- TQ3FillStyle mFillStyle;
- TQ3OrientationStyle mOrientationStyle;
- TQ3BackfacingStyle mBackfacingStyle;
- TQ3InterpolationStyle mInterpolationStyle;
TQ3ColorRGB mSpecularColor;
float mSpecularControl;
- TQ3ObjectType mIlluminationType;
- TQ3Uns32 mFogStyleIndex;
TQ3Uns32 mCameraToFrustumIndex;
- float mLineWidthStyle;
+ TQ3Uns32 mStyleIndex;
};
/*!
@@ -231,6 +236,7 @@
E3FastArray<TQ3Vector3D> mWorkCameraNormals;
E3FastArray<bool> mWorkIsInFrontOfCamera;
E3FastArray<TransparentBlock*> mBlocks;
+ E3FastArray<PrimStyleState> mStyles;
// State used when flushing (drawing) primitives
bool mIsLightingEnabled;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2016-03-18 22:36:18
|
Revision: 3342
http://sourceforge.net/p/quesa/code/3342
Author: jwwalker
Date: 2016-03-18 22:36:17 +0000 (Fri, 18 Mar 2016)
Log Message:
-----------
Fragment shader: Fix incompatibility between fog and translucency with premultiplied alpha.
Modified Paths:
--------------
trunk/quesa/Development/Source/Renderers/OpenGL/QOGLShadingLanguage.cpp
Modified: trunk/quesa/Development/Source/Renderers/OpenGL/QOGLShadingLanguage.cpp
===================================================================
--- trunk/quesa/Development/Source/Renderers/OpenGL/QOGLShadingLanguage.cpp 2015-12-15 16:56:36 UTC (rev 3341)
+++ trunk/quesa/Development/Source/Renderers/OpenGL/QOGLShadingLanguage.cpp 2016-03-18 22:36:17 UTC (rev 3342)
@@ -5,7 +5,7 @@
Shading language functions for Quesa OpenGL renderer class.
COPYRIGHT:
- Copyright (c) 2007-2015, Quesa Developers. All rights reserved.
+ Copyright (c) 2007-2016, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -486,18 +486,33 @@
" color += spec * specMat;\n"
;
+ #pragma mark kAddFogLinear, kAddFogExp, kAddFogExp2
+ /*
+ Fog works by mixing the fog color with the fragment color.
+ This does not work well with premultiplied color, where
+ resultColor = 1 * premultipliedFragColor + (1 - alpha) * oldColor,
+ because if fog brightens the premultipliedFragColor, then the result
+ color will be bright no matter how small alpha is. Therefore we must
+ do the fog mixing with unpremultiplied color.
+ */
const char* kAddFogLinear =
" float dist = length( ECPos3 );\n"
" float fog = (gl_Fog.end - dist) * gl_Fog.scale;\n"
" fog = clamp( fog, 0.0, 1.0 );\n"
- " color = mix( gl_Fog.color.rgb, color, fog );\n"
+ " float unAlpha = 1.0 / (alpha + 0.0000001);\n"
+ " vec3 unPreColor = clamp( unAlpha * color, 0.0, 1.0 );\n"
+ " unPreColor = mix( gl_Fog.color.rgb, unPreColor, fog );\n"
+ " color = alpha * unPreColor;\n"
;
const char* kAddFogExp =
" float dist = length( ECPos3 );\n"
" float fog = exp( - gl_Fog.density * dist );\n"
" fog = clamp( fog, 0.0, 1.0 );\n"
- " color = mix( gl_Fog.color.rgb, color, fog );\n"
+ " float unAlpha = 1.0 / (alpha + 0.0000001);\n"
+ " vec3 unPreColor = clamp( unAlpha * color, 0.0, 1.0 );\n"
+ " unPreColor = mix( gl_Fog.color.rgb, unPreColor, fog );\n"
+ " color = alpha * unPreColor;\n"
;
const char* kAddFogExp2 =
@@ -505,7 +520,10 @@
" float fogProd = gl_Fog.density * dist;\n"
" float fog = exp( - fogProd * fogProd );\n"
" fog = clamp( fog, 0.0, 1.0 );\n"
- " color = mix( gl_Fog.color.rgb, color, fog );\n"
+ " float unAlpha = 1.0 / (alpha + 0.0000001);\n"
+ " vec3 unPreColor = clamp( unAlpha * color, 0.0, 1.0 );\n"
+ " unPreColor = mix( gl_Fog.color.rgb, unPreColor, fog );\n"
+ " color = alpha * unPreColor;\n"
;
#pragma mark kMainFragmentShaderEndSource
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2015-12-15 16:56:39
|
Revision: 3341
http://sourceforge.net/p/quesa/code/3341
Author: jwwalker
Date: 2015-12-15 16:56:36 +0000 (Tue, 15 Dec 2015)
Log Message:
-----------
Fix e3memGetSize to account for being able to feed NULL to realloc.
Modified Paths:
--------------
trunk/quesa/Development/Source/Core/System/E3Memory.c
Modified: trunk/quesa/Development/Source/Core/System/E3Memory.c
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Memory.c 2015-12-10 18:02:11 UTC (rev 3340)
+++ trunk/quesa/Development/Source/Core/System/E3Memory.c 2015-12-15 16:56:36 UTC (rev 3341)
@@ -246,12 +246,14 @@
static TQ3Uns32 e3memGetSize( const void* inMemBlock )
{
TQ3Uns32 theSize = 0;
+ if (inMemBlock != NULL)
+ {
#if QUESA_OS_MACINTOSH
- theSize = (TQ3Uns32) malloc_size( inMemBlock );
+ theSize = (TQ3Uns32) malloc_size( inMemBlock );
#elif QUESA_OS_WIN32
- theSize = (TQ3Uns32) _msize( (void*)inMemBlock );
+ theSize = (TQ3Uns32) _msize( (void*)inMemBlock );
#endif
-
+ }
return theSize;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2015-12-10 18:02:13
|
Revision: 3340
http://sourceforge.net/p/quesa/code/3340
Author: jwwalker
Date: 2015-12-10 18:02:11 +0000 (Thu, 10 Dec 2015)
Log Message:
-----------
Strip out Q3_MEMORY_DEBUG code that broke alignment rules, leaving the statistics functionality.
Modified Paths:
--------------
trunk/quesa/Development/Source/Core/System/E3Memory.c
Modified: trunk/quesa/Development/Source/Core/System/E3Memory.c
===================================================================
--- trunk/quesa/Development/Source/Core/System/E3Memory.c 2015-09-18 20:53:47 UTC (rev 3339)
+++ trunk/quesa/Development/Source/Core/System/E3Memory.c 2015-12-10 18:02:11 UTC (rev 3340)
@@ -5,7 +5,7 @@
Quesa memory manager.
COPYRIGHT:
- Copyright (c) 1999-2014, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -51,14 +51,17 @@
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
+#include <cstring>
#if QUESA_OS_MACINTOSH
#include <unistd.h>
+ #include <malloc/malloc.h>
#endif
#if QUESA_OS_WIN32
#include <ShlObj.h>
#include <direct.h>
+ #include <malloc.h>
#endif
@@ -76,22 +79,7 @@
#endif
#endif
-#if Q3_MEMORY_DEBUG
- #define Q3_MEMORY_HEADER static_cast<TQ3Uns32>(sizeof(TQ3Uns32) * 3)
- #define Q3_MEMORY_TRAILER 1
-#else
- #define Q3_MEMORY_HEADER 0
- #define Q3_MEMORY_TRAILER 0
-#endif
-
-// Memory values
-#define kMemoryUninitialised ((TQ3Uns8) 0xAB)
-#define kMemoryFreed ((TQ3Uns8) 0xCD)
-#define kMemoryHeaderMark1 ((TQ3Uns32) 0xFEEDFACE)
-#define kMemoryHeaderMark2 ((TQ3Uns32) 0xFADEBABE)
-
-
// Slab threshold
const TQ3Uns32 kSlabSmallItemSize = 256;
const TQ3Uns32 kSlabSmallGrowSize = 16 * 1024;
@@ -250,6 +238,27 @@
+//=============================================================================
+// e3memGetSize : Get the size of an allocated block.
+// On some platforms, this may return a value that is
+// somewhat bigger than the requested allocation.
+//-----------------------------------------------------------------------------
+static TQ3Uns32 e3memGetSize( const void* inMemBlock )
+{
+ TQ3Uns32 theSize = 0;
+#if QUESA_OS_MACINTOSH
+ theSize = (TQ3Uns32) malloc_size( inMemBlock );
+#elif QUESA_OS_WIN32
+ theSize = (TQ3Uns32) _msize( (void*)inMemBlock );
+#endif
+
+ return theSize;
+}
+
+
+
+
+
#if Q3_DEBUG
//=============================================================================
// SetDirectoryForDump : If a plain file name was passed to
@@ -368,36 +377,31 @@
else
{
// Allocate the memory and a header to hold the size
- thePtr = malloc(theSize + Q3_MEMORY_HEADER + Q3_MEMORY_TRAILER);
+ thePtr = malloc( theSize );
if (thePtr == NULL)
E3ErrorManager_PostError(kQ3ErrorOutOfMemory, kQ3False);
}
-
// If memory debugging is active, save the size and scrub the block
#if Q3_MEMORY_DEBUG
if (thePtr != NULL)
- {
- // Save the size
- ((TQ3Uns32 *) thePtr)[0] = kMemoryHeaderMark1;
- ((TQ3Uns32 *) thePtr)[1] = theSize;
- ((TQ3Uns32 *) thePtr)[2] = kMemoryHeaderMark2;
- thePtr = (void *) (((TQ3Uns8 *) thePtr) + Q3_MEMORY_HEADER);
-
-
- // Fill the block with rubbish
- Q3Memory_Initialize(thePtr, theSize + Q3_MEMORY_TRAILER, kMemoryUninitialised);
-
-
+ {
// Update statistics
sActiveAllocCount += 1;
sMaxAllocCount = E3Num_Max( sMaxAllocCount, sActiveAllocCount );
- Q3Int64_Uns32_Add( sActiveAllocBytes, theSize, sActiveAllocBytes );
+ Q3Int64_Uns32_Add( sActiveAllocBytes, e3memGetSize( thePtr ), sActiveAllocBytes );
sMaxAllocBytes = e3Int64_Max( sMaxAllocBytes, sActiveAllocBytes );
- }
+ }
#endif
+#if Q3_MEMORY_DEBUG
+ if (theSize > 5000000UL)
+ {
+ Q3_MESSAGE_FMT("Allocated ptr %p of size %lu", thePtr, (unsigned long)theSize );
+ }
+#endif
+
return(thePtr);
}
@@ -422,7 +426,7 @@
//
// These platforms can allocate pages in an uninitialised state, and only
// clear them to 0 if an application attempts to read before writing.
- thePtr = calloc(1, theSize + Q3_MEMORY_HEADER + Q3_MEMORY_TRAILER);
+ thePtr = calloc( 1, theSize );
if (thePtr == NULL)
E3ErrorManager_PostError(kQ3ErrorOutOfMemory, kQ3False);
@@ -432,26 +436,21 @@
#if Q3_MEMORY_DEBUG
if (thePtr != NULL)
{
- // Save the size
- ((TQ3Uns32 *) thePtr)[0] = kMemoryHeaderMark1;
- ((TQ3Uns32 *) thePtr)[1] = theSize;
- ((TQ3Uns32 *) thePtr)[2] = kMemoryHeaderMark2;
- thePtr = (void *) (((TQ3Uns8 *) thePtr) + Q3_MEMORY_HEADER);
-
-
- // Fill the trailer with rubbish
- Q3Memory_Initialize(((TQ3Uns8 *) thePtr) + theSize, Q3_MEMORY_TRAILER, kMemoryUninitialised);
-
-
-
// Update statistics
sActiveAllocCount += 1;
sMaxAllocCount = E3Num_Max( sMaxAllocCount, sActiveAllocCount );
- Q3Int64_Uns32_Add( sActiveAllocBytes, theSize, sActiveAllocBytes );
+ Q3Int64_Uns32_Add( sActiveAllocBytes, e3memGetSize( thePtr ), sActiveAllocBytes );
sMaxAllocBytes = e3Int64_Max( sMaxAllocBytes, sActiveAllocBytes );
}
#endif
+#if Q3_MEMORY_DEBUG
+ if (theSize > 5000000UL)
+ {
+ Q3_MESSAGE_FMT("AllocateCleared ptr %p of size %lu", thePtr, (unsigned long)theSize );
+ }
+#endif
+
return(thePtr);
}
@@ -465,53 +464,36 @@
void
E3Memory_Free(void **thePtr)
{ void *realPtr;
-#if Q3_MEMORY_DEBUG
- TQ3Uns32 theSize;
-#endif
// Fetch the pointer, and release it
realPtr = *thePtr;
if (realPtr != NULL)
- {
+ {
// Check it looks OK
Q3_ASSERT_VALID_PTR(realPtr);
// Q3_ASSERT ( ( TQ3Uns32 ( realPtr ) & 3 ) == 0 ) ;
- // If memory debugging is active, rewind past the header and scrub the block
+#if 0//Q3_MEMORY_DEBUG
+ TQ3Uns32 theSize = e3memGetSize( realPtr )
+ if (theSize > 5000000UL)
+ {
+ Q3_MESSAGE_FMT("Freed ptr %p of size %lu", *thePtr, (unsigned long)theSize );
+ }
+#endif
+
#if Q3_MEMORY_DEBUG
- // Back up the pointer and check that the header is undamaged
- realPtr = (void *) (((TQ3Uns8 *) realPtr) - Q3_MEMORY_HEADER);
- Q3_ASSERT( ((TQ3Uns32 *) realPtr)[0] == kMemoryHeaderMark1 );
- Q3_ASSERT( ((TQ3Uns32 *) realPtr)[2] == kMemoryHeaderMark2 );
-
-
- // Fetch the size
- theSize = ((TQ3Uns32 *) realPtr)[1];
-
-
- // Check that the trailer is undamaged
- Q3_ASSERT( *(((TQ3Uns8 *) realPtr) + Q3_MEMORY_HEADER + theSize) == kMemoryUninitialised );
-
-
- // Fill the block with rubbish
- Q3Memory_Initialize(realPtr, theSize + Q3_MEMORY_HEADER + Q3_MEMORY_TRAILER, kMemoryFreed);
+ // Update statistics
+ sActiveAllocCount -= 1;
+ Q3Int64_Uns32_Subtract( sActiveAllocBytes, e3memGetSize( realPtr ), sActiveAllocBytes );
#endif
-
// Free the pointer
free(realPtr);
*thePtr = NULL;
-
-
-#if Q3_MEMORY_DEBUG
- // Update statistics
- sActiveAllocCount -= 1;
- Q3Int64_Uns32_Subtract( sActiveAllocBytes, theSize, sActiveAllocBytes );
-#endif
- }
+ }
}
@@ -544,7 +526,7 @@
if (newSize == 0)
- {
+ {
if (realPtr != NULL)
{
// Not every implementation of realloc frees when called as
@@ -552,40 +534,43 @@
Q3Memory_Free( thePtr );
}
qd3dStatus = kQ3Success;
- }
+ }
else // newSize != 0
- {
- // Reallocate the block, and see if it worked
+ {
#if Q3_MEMORY_DEBUG
- // For debugging, we don't use realloc so that
- // 1. the block always moves rather than grows
- // 2. the freed block is scrubbed
- newPtr = Q3Memory_Allocate( newSize );
- if ( (newPtr != NULL) && (realPtr != NULL) ) // resize
- {
- TQ3Uns32 oldSize = ((TQ3Uns32*)(void*) (((TQ3Uns8 *) realPtr) - Q3_MEMORY_HEADER))[1];
- TQ3Uns32 copySize = E3Num_Min( oldSize, newSize );
- Q3Memory_Copy( realPtr, newPtr, copySize );
- Q3Memory_Free( thePtr );
- }
- #else
+ TQ3Uns32 oldSize = e3memGetSize( realPtr );
+ #endif
+ // Reallocate the block, and see if it worked
+ newPtr = realloc( realPtr, newSize );
- // Or just reallocate with realloc
- newPtr = realloc(realPtr, newSize);
- #endif
-
// Handle failure
qd3dStatus = (newPtr != NULL) ? kQ3Success : kQ3Failure;
if (qd3dStatus == kQ3Success)
+ {
*thePtr = newPtr;
+ #if Q3_MEMORY_DEBUG
+ // Update statistics
+ TQ3Uns32 actualNewSize = e3memGetSize( newPtr );
+ if (actualNewSize > oldSize)
+ {
+ Q3Int64_Uns32_Add( sActiveAllocBytes, actualNewSize - oldSize,
+ sActiveAllocBytes );
+ }
+ else
+ {
+ Q3Int64_Uns32_Subtract( sActiveAllocBytes,
+ oldSize - actualNewSize, sActiveAllocBytes );
+ }
+ #endif
+ }
else
E3ErrorManager_PostError(kQ3ErrorOutOfMemory, kQ3False);
- }
+ }
return(qd3dStatus);
}
@@ -603,25 +588,7 @@
#if Q3_DEBUG
TQ3Boolean E3Memory_IsValidBlock( void *thePtr )
{
-#if Q3_MEMORY_DEBUG
- TQ3Uns32 theSize;
- TQ3Uns32* headerPtr;
-
- // Back up the pointer and fetch the size
- headerPtr = (TQ3Uns32*)(void*) (((TQ3Uns8 *) thePtr) - Q3_MEMORY_HEADER);
- theSize = headerPtr[1];
-
-
- // Check that the header and trailer are undamaged
- if ( (headerPtr[0] == kMemoryHeaderMark1) &&
- (headerPtr[2] == kMemoryHeaderMark2) &&
- (*(((TQ3Uns8 *) thePtr) + theSize) == kMemoryUninitialised) )
- return kQ3True;
- else
- return kQ3False;
-#else
return kQ3True;
-#endif
}
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2015-09-18 20:53:50
|
Revision: 3339
http://sourceforge.net/p/quesa/code/3339
Author: jwwalker
Date: 2015-09-18 20:53:47 +0000 (Fri, 18 Sep 2015)
Log Message:
-----------
In Quesa Legacy project, mark QuesaMathOperators.hpp as a public header.
Modified Paths:
--------------
trunk/quesa/Development/Projects/Mac/Quesa (Legacy).xcodeproj/project.pbxproj
Modified: trunk/quesa/Development/Projects/Mac/Quesa (Legacy).xcodeproj/project.pbxproj
===================================================================
--- trunk/quesa/Development/Projects/Mac/Quesa (Legacy).xcodeproj/project.pbxproj 2015-07-28 01:08:05 UTC (rev 3338)
+++ trunk/quesa/Development/Projects/Mac/Quesa (Legacy).xcodeproj/project.pbxproj 2015-09-18 20:53:47 UTC (rev 3339)
@@ -250,7 +250,7 @@
B19A74350C3E7A7F0099C820 /* WFRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B19A74320C3E7A7F0099C820 /* WFRenderer.cpp */; };
B1BD22040BEBD81B00937A68 /* HiddenLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1BD22020BEBD81B00937A68 /* HiddenLine.cpp */; };
B1BD22080BEBD81B00937A68 /* HiddenLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1BD22020BEBD81B00937A68 /* HiddenLine.cpp */; };
- BE097F3B156DCE85009AACEF /* QuesaMathOperators.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE097F3A156DCE85009AACEF /* QuesaMathOperators.hpp */; };
+ BE097F3B156DCE85009AACEF /* QuesaMathOperators.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE097F3A156DCE85009AACEF /* QuesaMathOperators.hpp */; settings = {ATTRIBUTES = (Public, ); }; };
BE0D64FE0C0D0FFC00D3D79C /* QOCalcTriMeshEdges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0D64FA0C0D0FFC00D3D79C /* QOCalcTriMeshEdges.cpp */; };
BE0D65000C0D0FFC00D3D79C /* QOShadowMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0D64FC0C0D0FFC00D3D79C /* QOShadowMarker.cpp */; };
BE0D65050C0D0FFC00D3D79C /* QOCalcTriMeshEdges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0D64FA0C0D0FFC00D3D79C /* QOCalcTriMeshEdges.cpp */; };
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2015-07-28 01:08:08
|
Revision: 3338
http://sourceforge.net/p/quesa/code/3338
Author: jwwalker
Date: 2015-07-28 01:08:05 +0000 (Tue, 28 Jul 2015)
Log Message:
-----------
On Mac, make E3Assert call abort.
Modified Paths:
--------------
trunk/quesa/Development/Source/Core/Support/E3Debug.h
trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.c
Modified: trunk/quesa/Development/Source/Core/Support/E3Debug.h
===================================================================
--- trunk/quesa/Development/Source/Core/Support/E3Debug.h 2015-07-09 00:30:35 UTC (rev 3337)
+++ trunk/quesa/Development/Source/Core/Support/E3Debug.h 2015-07-28 01:08:05 UTC (rev 3338)
@@ -5,7 +5,7 @@
Debugging routines.
COPYRIGHT:
- Copyright (c) 1999-2011, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -49,15 +49,23 @@
extern "C" {
#endif
+#ifndef __has_attribute
+ #define __has_attribute(x) 0 // Compatibility with non-clang compilers.
+#endif
+#if __has_attribute(noreturn)
+ #define Q3_NORETURN __attribute__((noreturn))
+#else
+ #define Q3_NORETURN
+#endif
-
//=============================================================================
// Function prototypes
//-----------------------------------------------------------------------------
// Report failed assertions
-void E3Assert(const char *srcFile, TQ3Uns32 lineNum, const char *theAssertion);
+void E3Assert(const char *srcFile, TQ3Uns32 lineNum,
+ const char *theAssertion) Q3_NORETURN;
// Check a pointer for validity
Modified: trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.c
===================================================================
--- trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.c 2015-07-09 00:30:35 UTC (rev 3337)
+++ trunk/quesa/Development/Source/Platform/Mac/E3MacDebug.c 2015-07-28 01:08:05 UTC (rev 3338)
@@ -5,7 +5,7 @@
Mac debug implementation.
COPYRIGHT:
- Copyright (c) 1999-2012, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -47,17 +47,19 @@
#include "E3Debug.h"
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <dlfcn.h>
-
//=============================================================================
// E3Assert : Report failed assertions.
//-----------------------------------------------------------------------------
void
E3Assert(const char *srcFile, TQ3Uns32 lineNum, const char *theAssertion)
-{ Str255 theStr;
+{ unsigned char theStr[1500];
TQ3Uns32 n;
@@ -77,12 +79,21 @@
theAssertion, (unsigned long)lineNum, srcFile);
n = 1;
- while (theStr[n] != 0x00 && n < sizeof(theStr))
+ while (theStr[n] != 0x00 && n < 256)
n++;
theStr[0] = (n - 1);
DebugStr(theStr);
+
+ // Add the message to crash reports
+ char** reportStr = (char**) dlsym(RTLD_DEFAULT, "__crashreporter_info__");
+ if (reportStr != NULL)
+ {
+ *reportStr = strdup( (char *) &theStr[1] );
+ }
+
+ abort();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2015-07-09 00:30:38
|
Revision: 3337
http://sourceforge.net/p/quesa/code/3337
Author: jwwalker
Date: 2015-07-09 00:30:35 +0000 (Thu, 09 Jul 2015)
Log Message:
-----------
VRML-Reader: improve calculation of vertex normals of an IndexedFaceSet.
Modified Paths:
--------------
trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.cpp
trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.h
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.cpp
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.cpp 2015-07-09 00:25:06 UTC (rev 3336)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.cpp 2015-07-09 00:30:35 UTC (rev 3337)
@@ -5,7 +5,7 @@
Code to handle IndexedFaceSet nodes in both VRML 1 and 2.
COPYRIGHT:
- Copyright (c) 2005-2011, Quesa Developers. All rights reserved.
+ Copyright (c) 2005-2015, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -47,11 +47,13 @@
#if __MACH__
#include <Quesa/QuesaGroup.h>
#include <Quesa/QuesaMath.h>
+ #include <Quesa/QuesaMathOperators.hpp>
#include <Quesa/QuesaStyle.h>
#include <Quesa/QuesaCustomElements.h>
#else
#include <QuesaGroup.h>
#include <QuesaMath.h>
+ #include <QuesaMathOperators.hpp>
#include <QuesaStyle.h>
#include <QuesaCustomElements.h>
#endif
@@ -107,13 +109,13 @@
&mPositions[ mVertices[ faceVerts[1] ].mPosition ],
&mPositions[ mVertices[ faceVerts[2] ].mPosition ],
&theNormal );
- float lenSq = Q3FastVector3D_LengthSquared( &theNormal );
+ float lenSq = Q3LengthSquared3D( theNormal );
float len;
// If the face is degenerate, leave its normal at kNoIndex.
if (lenSq > kDegenerateLengthSquared)
{
len = sqrt( lenSq );
- Q3FastVector3D_Scale( &theNormal, 1.0f/len, &theNormal );
+ theNormal *= 1.0f/len;
i->mNormal = mFaceNormals.size();
mFaceNormals.push_back( theNormal );
}
@@ -121,22 +123,19 @@
{
// Maybe all the data is on a small scale...
TQ3Point3D scaledPts[3];
- Q3FastVector3D_Scale( (const TQ3Vector3D*)
- &mPositions[ mVertices[ faceVerts[0] ].mPosition ],
- kNormalRescale, (TQ3Vector3D*) &scaledPts[0] );
- Q3FastVector3D_Scale( (const TQ3Vector3D*)
- &mPositions[ mVertices[ faceVerts[1] ].mPosition ],
- kNormalRescale, (TQ3Vector3D*) &scaledPts[1] );
- Q3FastVector3D_Scale( (const TQ3Vector3D*)
- &mPositions[ mVertices[ faceVerts[2] ].mPosition ],
- kNormalRescale, (TQ3Vector3D*) &scaledPts[2] );
+ scaledPts[0] = kNormalRescale *
+ mPositions[ mVertices[ faceVerts[0] ].mPosition ];
+ scaledPts[1] = kNormalRescale *
+ mPositions[ mVertices[ faceVerts[1] ].mPosition ];
+ scaledPts[2] = kNormalRescale *
+ mPositions[ mVertices[ faceVerts[2] ].mPosition ];
Q3FastPoint3D_CrossProductTri( &scaledPts[0],
&scaledPts[1], &scaledPts[2], &theNormal );
- lenSq = Q3FastVector3D_LengthSquared( &theNormal );
+ lenSq = Q3LengthSquared3D( theNormal );
if (lenSq > kDegenerateLengthSquared)
{
len = sqrt( lenSq );
- Q3FastVector3D_Scale( &theNormal, 1.0f/len, &theNormal );
+ theNormal *= 1.0f/len;
i->mNormal = mFaceNormals.size();
mFaceNormals.push_back( theNormal );
}
@@ -158,11 +157,10 @@
VertIndex j, k;
for (j = 0; j < faceSize; ++j)
{
- Q3FastPoint3D_Subtract(
- &mPositions[ mVertices[ faceVerts[ (j + 1) % faceSize ] ].mPosition ],
- &mPositions[ mVertices[ faceVerts[ j ] ].mPosition ],
- &edgeVec );
- if (Q3FastVector3D_LengthSquared( &edgeVec ) > kDegenerateLengthSquared)
+ edgeVec =
+ mPositions[ mVertices[ faceVerts[ (j + 1) % faceSize ] ].mPosition ] -
+ mPositions[ mVertices[ faceVerts[ j ] ].mPosition ];
+ if (Q3LengthSquared3D( edgeVec ) > kDegenerateLengthSquared)
{
edges.push_back( edgeVec );
}
@@ -176,8 +174,8 @@
{
for (k = j + 1; k < kNumEdges; ++k)
{
- Q3FastVector3D_Cross( &edges[j], &edges[k], &oneCross );
- float oneLenSq = Q3FastVector3D_LengthSquared( &oneCross );
+ oneCross = Q3Cross3D( edges[j], edges[k] );
+ float oneLenSq = Q3LengthSquared3D( oneCross );
if (oneLenSq > bestCrossLenSq)
{
bestCrossLenSq = oneLenSq;
@@ -223,7 +221,7 @@
{
bestLen = -bestLen;
}
- Q3FastVector3D_Scale( &bestCross, 1.0f/bestLen, &theNormal );
+ theNormal = (1.0f/bestLen) * bestCross;
i->mNormal = mFaceNormals.size();
mFaceNormals.push_back( theNormal );
@@ -340,6 +338,45 @@
}
/*!
+ @function CalcAngleAtVertex
+ @abstract Compute the angle that a face makes at a vertex,
+ for use in weighing the face normals to compute
+ a vertex normal.
+ @param inVertIndex Index of a vertex.
+ @result An angle in radians.
+*/
+float CIndexedFaceSet::CalcAngleAtVertex( VertIndex inVertIndex ) const
+{
+ const SVertex& theVert( mVertices[ inVertIndex ] );
+ PositionIndex cornerPos = theVert.mPosition;
+ const SFace& theFace( mFaces[ theVert.mFace ] );
+ VertIndex legIndex1 = kNoIndex;
+ VertIndex legIndex2 = kNoIndex;
+ for (unsigned int i = 0; i < theFace.mVertices.size(); ++i)
+ {
+ if (theFace.mVertices[i] != inVertIndex)
+ {
+ if (legIndex1 == kNoIndex)
+ {
+ legIndex1 = theFace.mVertices[i];
+ }
+ else if (legIndex2 == kNoIndex)
+ {
+ legIndex2 = theFace.mVertices[i];
+ }
+ }
+ }
+ PositionIndex leg1pos = mVertices[ legIndex1 ].mPosition;
+ PositionIndex leg2pos = mVertices[ legIndex2 ].mPosition;
+ TQ3Vector3D leg1 = mPositions[ leg1pos ] - mPositions[ cornerPos ];
+ TQ3Vector3D leg2 = mPositions[ leg2pos ] - mPositions[ cornerPos ];
+ float angle = atan2f( Q3Length3D( Q3Cross3D( leg1, leg2 ) ),
+ Q3Dot3D( leg1, leg2 ) );
+ return angle;
+}
+
+
+/*!
@function CalcVertexNormals
@abstract If vertex normals were not provided,
calculate them, taking into account a given
@@ -374,15 +411,14 @@
if (w_faceNorm == kNoIndex)
continue;
- float dotProd = Q3FastVector3D_Dot(
- &mFaceNormals[ v_faceNorm ], &mFaceNormals[ w_faceNorm ] );
+ float dotProd = Q3Dot3D( mFaceNormals[ v_faceNorm ],
+ mFaceNormals[ w_faceNorm ] );
if (dotProd > inCreaseCosine)
{
mVertices[ v ].mNormal = mVertices[ w ].mNormal;
mNextVertSharingNormal[ v ] = w;
mFirstVertWithNormal[ mVertices[ v ].mNormal ] = v;
- break;
}
}
if (mVertices[ v ].mNormal == kNoIndex)
@@ -402,15 +438,15 @@
for (VertIndex j = mFirstVertWithNormal[i]; j != kNoIndex;
j = mNextVertSharingNormal[j])
{
- Q3FastVector3D_Add( &normSum, &mFaceNormals[ mVertices[j].mFace ],
- &normSum );
+ normSum += CalcAngleAtVertex( j ) * mFaceNormals[ mVertices[j].mFace ];
}
- Q3FastVector3D_Normalize( &normSum, &vertNorm );
+ vertNorm = Q3Normalize3D( normSum );
mVertexNormals.push_back( vertNorm );
}
}
}
+
/*!
@function IdentifyDistinctPoints
@abstract Determine the points of the final TriMesh.
@@ -523,7 +559,7 @@
&mPositions[ mVertices[ verts[ (i+1) % kNumVerts ] ].mPosition ],
&mPositions[ mVertices[ verts[ (i+2) % kNumVerts ] ].mPosition ],
&cornerCross );
- float crossDot = Q3FastVector3D_Dot( &cornerCross, &faceNormal );
+ float crossDot = Q3Dot3D( cornerCross, faceNormal );
if (crossDot > FLT_EPSILON)
{
// Oops, not good enough, we must make sure that no other
Modified: trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.h
===================================================================
--- trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.h 2015-07-09 00:25:06 UTC (rev 3336)
+++ trunk/quesa/SDK/Extras/VRML Reader/Source/Utilities/IndexedFaceSet.h 2015-07-09 00:30:35 UTC (rev 3337)
@@ -6,7 +6,7 @@
Header file for IndexedFaceSet.cpp.
COPYRIGHT:
- Copyright (c) 2005, Quesa Developers. All rights reserved.
+ Copyright (c) 2005-2015, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -264,4 +264,14 @@
TriangleVec& outTriangles ) const;
void TriangulateNonconvexFace( const SFace& inFace,
TriangleVec& outTriangles ) const;
+
+ /*!
+ @function CalcAngleAtVertex
+ @abstract Compute the angle that a face makes at a vertex,
+ for use in weighing the face normals to compute
+ a vertex normal.
+ @param inVertIndex Index of a vertex.
+ @result An angle in radians.
+ */
+ float CalcAngleAtVertex( VertIndex inVertIndex ) const;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jww...@us...> - 2015-07-09 00:25:08
|
Revision: 3336
http://sourceforge.net/p/quesa/code/3336
Author: jwwalker
Date: 2015-07-09 00:25:06 +0000 (Thu, 09 Jul 2015)
Log Message:
-----------
QuesaMathOperators.hpp: add convenience operators for scalar * point, point + point.
Modified Paths:
--------------
trunk/quesa/SDK/Includes/Quesa/QuesaMathOperators.hpp
Modified: trunk/quesa/SDK/Includes/Quesa/QuesaMathOperators.hpp
===================================================================
--- trunk/quesa/SDK/Includes/Quesa/QuesaMathOperators.hpp 2015-07-09 00:22:58 UTC (rev 3335)
+++ trunk/quesa/SDK/Includes/Quesa/QuesaMathOperators.hpp 2015-07-09 00:25:06 UTC (rev 3336)
@@ -9,7 +9,7 @@
Quesa public header.
COPYRIGHT:
- Copyright (c) 1999-2012, Quesa Developers. All rights reserved.
+ Copyright (c) 1999-2015, Quesa Developers. All rights reserved.
For the current release of Quesa, please see:
@@ -107,6 +107,23 @@
return ioA;
}
+// point = scalar * point (not usual in math, but useful in 3D computing)
+inline TQ3Point3D operator*( float inScalar, const TQ3Point3D& inVec )
+{
+ TQ3Point3D result;
+ Q3FastVector3D_Scale( (const TQ3Vector3D*)&inVec, inScalar, (TQ3Vector3D*)&result );
+ return result;
+}
+
+// point = scalar * point (not usual in math, but useful in 3D computing)
+inline TQ3Point2D operator*( float inScalar, const TQ3Point2D& inVec )
+{
+ TQ3Point2D result;
+ Q3FastVector2D_Scale( (const TQ3Vector2D*)&inVec, inScalar, (TQ3Vector2D*)&result );
+ return result;
+}
+
+
//=============================================================================
// Additive Operations
//-----------------------------------------------------------------------------
@@ -179,6 +196,23 @@
return ioA;
}
+// pt = pt + pt (useful for weighted averages)
+inline TQ3Point3D operator+( const TQ3Point3D& inA, const TQ3Point3D& inB )
+{
+ TQ3Point3D result;
+ Q3FastVector3D_Add( (TQ3Vector3D*)&inA, (TQ3Vector3D*)&inB, (TQ3Vector3D*)&result );
+ return result;
+}
+
+// pt = pt + pt (useful for weighted averages)
+inline TQ3Point2D operator+( const TQ3Point2D& inA, const TQ3Point2D& inB )
+{
+ TQ3Point2D result;
+ Q3FastVector2D_Add( (TQ3Vector2D*)&inA, (TQ3Vector2D*)&inB, (TQ3Vector2D*)&result );
+ return result;
+}
+
+
//=============================================================================
// Matrix Operations
//-----------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|