mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Merge branch 'release/1.9.x'
This commit is contained in:
commit
75978222a1
@ -70,7 +70,7 @@ inline int BaseIncomingSet<_INCLASS1,_IN_LISTEN,MESSAGE_READER_BUF,MESSAGE_READE
|
||||
template <class _INCLASS1,class _IN_LISTEN,typename MESSAGE_READER_BUF, typename MESSAGE_READER_UPPASS>
|
||||
inline void BaseIncomingSet<_INCLASS1,_IN_LISTEN,MESSAGE_READER_BUF,MESSAGE_READER_UPPASS>::AddAConection(_INCLASS1 * newt)
|
||||
{
|
||||
push_back(newt);
|
||||
this->push_back(newt);
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function name : BaseIncomingSet<_INCLASS1,_IN_LISTEN,MESSAGE_READER_BUF,MESSAGE_READER_UPPASS>::BaseIncomingSet
|
||||
|
@ -22,7 +22,7 @@
|
||||
cppSimpleType.h cppStructType.h cppTBDType.h \
|
||||
cppTemplateParameterList.h cppTemplateScope.h cppToken.h \
|
||||
cppType.h cppTypeDeclaration.h cppTypeParser.h \
|
||||
cppTypeProxy.h cppTypedef.h cppUsing.h cppVisibility.h
|
||||
cppTypeProxy.h cppTypedefType.h cppUsing.h cppVisibility.h
|
||||
|
||||
#define INCLUDED_SOURCES \
|
||||
cppArrayType.cxx cppClassTemplateParameter.cxx \
|
||||
@ -38,7 +38,7 @@
|
||||
cppStructType.cxx cppTBDType.cxx \
|
||||
cppTemplateParameterList.cxx cppTemplateScope.cxx \
|
||||
cppToken.cxx cppType.cxx cppTypeDeclaration.cxx \
|
||||
cppTypeParser.cxx cppTypeProxy.cxx cppTypedef.cxx \
|
||||
cppTypeParser.cxx cppTypeProxy.cxx cppTypedefType.cxx \
|
||||
cppUsing.cxx cppVisibility.cxx
|
||||
|
||||
#end static_lib_target
|
||||
|
@ -10,6 +10,7 @@
|
||||
addHash.I addHash.h \
|
||||
atomicAdjust.h \
|
||||
atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I \
|
||||
atomicAdjustGccImpl.h atomicAdjustGccImpl.I \
|
||||
atomicAdjustI386Impl.h atomicAdjustI386Impl.I \
|
||||
atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
|
||||
atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
|
||||
@ -30,7 +31,7 @@
|
||||
nearly_zero.h \
|
||||
neverFreeMemory.h neverFreeMemory.I \
|
||||
numeric_types.h \
|
||||
pstrtod.h \
|
||||
pdtoa.h pstrtod.h \
|
||||
register_type.I register_type.h \
|
||||
selectThreadImpl.h \
|
||||
stl_compares.I stl_compares.h \
|
||||
@ -47,6 +48,7 @@
|
||||
#define INCLUDED_SOURCES \
|
||||
addHash.cxx \
|
||||
atomicAdjustDummyImpl.cxx \
|
||||
atomicAdjustGccImpl.cxx \
|
||||
atomicAdjustI386Impl.cxx \
|
||||
atomicAdjustPosixImpl.cxx \
|
||||
atomicAdjustWin32Impl.cxx \
|
||||
@ -59,6 +61,7 @@
|
||||
mutexWin32Impl.cxx \
|
||||
mutexSpinlockImpl.cxx \
|
||||
neverFreeMemory.cxx \
|
||||
pdtoa.cxx \
|
||||
pstrtod.cxx \
|
||||
register_type.cxx \
|
||||
typeHandle.cxx \
|
||||
@ -69,6 +72,7 @@
|
||||
addHash.I addHash.h \
|
||||
atomicAdjust.h \
|
||||
atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I \
|
||||
atomicAdjustGccImpl.h atomicAdjustGccImpl.I \
|
||||
atomicAdjustI386Impl.h atomicAdjustI386Impl.I \
|
||||
atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
|
||||
atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
|
||||
@ -89,7 +93,7 @@
|
||||
nearly_zero.h \
|
||||
neverFreeMemory.h neverFreeMemory.I \
|
||||
numeric_types.h \
|
||||
pstrtod.h \
|
||||
pdtoa.h pstrtod.h \
|
||||
register_type.I register_type.h \
|
||||
selectThreadImpl.h \
|
||||
stl_compares.I stl_compares.h \
|
||||
|
@ -550,7 +550,7 @@ main(int argc, char **argv) {
|
||||
|
||||
output_include
|
||||
<< "/*\n"
|
||||
<< " * This file generated by:\n"
|
||||
<< " * This file was generated by:\n"
|
||||
<< " * " << command_line << "\n"
|
||||
<< " *\n"
|
||||
<< " */\n\n";
|
||||
@ -572,7 +572,7 @@ main(int argc, char **argv) {
|
||||
|
||||
output_code
|
||||
<< "/*\n"
|
||||
<< " * This file generated by:\n"
|
||||
<< " * This file was generated by:\n"
|
||||
<< " * " << command_line << "\n"
|
||||
<< " *\n"
|
||||
<< " */\n\n";
|
||||
|
@ -44,7 +44,5 @@ typedef unsigned char uchar;
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
|
||||
typedef int fd_set;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -79,6 +79,7 @@ MAYAVERSIONINFO = [("MAYA6", "6.0"),
|
||||
("MAYA20135","2013.5"),
|
||||
("MAYA2014","2014"),
|
||||
("MAYA2015","2015"),
|
||||
("MAYA2016","2016"),
|
||||
]
|
||||
|
||||
MAXVERSIONINFO = [("MAX6", "SOFTWARE\\Autodesk\\3DSMAX\\6.0", "installdir", "maxsdk\\cssdk\\include"),
|
||||
|
@ -23,7 +23,9 @@
|
||||
encrypt_string.h \
|
||||
error_utils.h \
|
||||
export_dtool.h \
|
||||
filename_ext.h \
|
||||
fileReference.h fileReference.I \
|
||||
globPattern_ext.h \
|
||||
hashGeneratorBase.I hashGeneratorBase.h \
|
||||
hashVal.I hashVal.h \
|
||||
indirectLess.I indirectLess.h \
|
||||
@ -45,6 +47,7 @@
|
||||
patchfile.I patchfile.h \
|
||||
pointerTo.I pointerTo.h \
|
||||
pointerToArray.I pointerToArray.h \
|
||||
pointerToArray_ext.h \
|
||||
pointerToArrayBase.I pointerToArrayBase.h \
|
||||
pointerToBase.I pointerToBase.h \
|
||||
pointerToVoid.I pointerToVoid.h \
|
||||
@ -61,6 +64,7 @@
|
||||
threadSafePointerTo.I threadSafePointerTo.h \
|
||||
threadSafePointerToBase.I threadSafePointerToBase.h \
|
||||
trueClock.I trueClock.h \
|
||||
typeHandle_ext.h \
|
||||
typedReferenceCount.I typedReferenceCount.h typedef.h \
|
||||
vector_uchar.h vector_double.h vector_float.h \
|
||||
vector_stdfloat.h \
|
||||
|
@ -50,9 +50,11 @@
|
||||
matrixLens.I matrixLens.h \
|
||||
occlusionQueryContext.I occlusionQueryContext.h \
|
||||
orthographicLens.I orthographicLens.h perspectiveLens.I \
|
||||
paramTexture.I paramTexture.h \
|
||||
perspectiveLens.h \
|
||||
preparedGraphicsObjects.I preparedGraphicsObjects.h \
|
||||
queryContext.I queryContext.h \
|
||||
samplerState.I samplerState.h \
|
||||
savedContext.I savedContext.h \
|
||||
shader.I shader.h \
|
||||
shaderContext.h shaderContext.I \
|
||||
@ -61,6 +63,7 @@
|
||||
sliderTable.I sliderTable.h \
|
||||
texture.I texture.h \
|
||||
textureCollection.I textureCollection.h \
|
||||
textureCollection_ext.h \
|
||||
textureContext.I textureContext.h \
|
||||
texturePeeker.I texturePeeker.h \
|
||||
texturePool.I texturePool.h \
|
||||
@ -123,9 +126,11 @@
|
||||
materialPool.cxx matrixLens.cxx \
|
||||
occlusionQueryContext.cxx \
|
||||
orthographicLens.cxx \
|
||||
paramTexture.cxx \
|
||||
perspectiveLens.cxx \
|
||||
preparedGraphicsObjects.cxx \
|
||||
queryContext.cxx \
|
||||
samplerState.cxx \
|
||||
savedContext.cxx \
|
||||
shader.cxx \
|
||||
shaderContext.cxx \
|
||||
@ -196,10 +201,12 @@
|
||||
material.I material.h \
|
||||
materialPool.I materialPool.h matrixLens.I matrixLens.h \
|
||||
occlusionQueryContext.I occlusionQueryContext.h \
|
||||
orthographicLens.I orthographicLens.h perspectiveLens.I \
|
||||
perspectiveLens.h \
|
||||
orthographicLens.I orthographicLens.h \
|
||||
paramTexture.I paramTexture.h \
|
||||
perspectiveLens.I perspectiveLens.h \
|
||||
preparedGraphicsObjects.I preparedGraphicsObjects.h \
|
||||
queryContext.I queryContext.h \
|
||||
samplerState.I samplerState.h \
|
||||
savedContext.I savedContext.h \
|
||||
shader.I shader.h \
|
||||
shaderContext.h shaderContext.I \
|
||||
|
@ -11,33 +11,19 @@
|
||||
#define SOURCES \
|
||||
aa_luse.h \
|
||||
compose_matrix.h compose_matrix_src.I \
|
||||
compose_matrix_src.cxx compose_matrix_src.h config_linmath.h \
|
||||
config_linmath.h \
|
||||
configVariableColor.h configVariableColor.I \
|
||||
coordinateSystem.h dbl2fltnames.h dblnames.h \
|
||||
deg_2_rad.h deg_2_rad.I \
|
||||
flt2dblnames.h fltnames.h intnames.h lcast_to.h lcast_to_src.h \
|
||||
lcast_to_src.I lmatrix.h lmatrix_ext.h lmatrix3_src.I \
|
||||
lmatrix3_src.cxx lmatrix3_src.h lmatrix4_src.I \
|
||||
lmatrix4_src.cxx lmatrix4_src.h lorientation.h \
|
||||
lorientation_src.I lorientation_src.cxx lorientation_src.h \
|
||||
lpoint2.h lpoint2_src.I lpoint2_src.cxx lpoint2_src.h \
|
||||
lpoint3.h lpoint3_src.I lpoint3_src.cxx lpoint3_src.h \
|
||||
lpoint4.h lpoint4_src.I lpoint4_src.cxx lpoint4_src.h \
|
||||
lquaternion.h lquaternion_src.I lquaternion_src.cxx \
|
||||
lquaternion_src.h lrotation.h lrotation_src.I \
|
||||
lrotation_src.cxx lrotation_src.h \
|
||||
flt2dblnames.h fltnames.h intnames.h lcast_to.h \
|
||||
lmatrix.h lmatrix_ext.h lorientation.h \
|
||||
lpoint2.h lpoint3.h lpoint4.h \
|
||||
lquaternion.h lrotation.h \
|
||||
lsimpleMatrix.h lsimpleMatrix.I \
|
||||
luse.I luse.N luse.h \
|
||||
lvec2_ops.h lvec2_ops_src.I lvec2_ops_src.h lvec3_ops.h \
|
||||
lvec3_ops_src.I lvec3_ops_src.h lvec4_ops.h lvec4_ops_src.I \
|
||||
lvec4_ops_src.h \
|
||||
lvecBase2.h lvecBase2_src.I lvecBase2_src.cxx lvecBase2_src.h \
|
||||
lvecBase3.h lvecBase3_src.I lvecBase3_src.cxx lvecBase3_src.h \
|
||||
lvecBase4.h lvecBase4_src.I lvecBase4_src.cxx lvecBase4_src.h \
|
||||
lvector2.h lvector2_src.I lvector2_src.cxx lvector2_src.h \
|
||||
lvector3.h lvector3_src.I lvector3_src.cxx lvector3_src.h \
|
||||
lvector4.h lvector4_src.I lvector4_src.cxx lvector4_src.h \
|
||||
lvector4.h lvector4_src.I lvector4_src.cxx lvector4_src.h \
|
||||
lvec2_ops.h lvec3_ops.h lvec4_ops.h \
|
||||
lvecBase2.h lvecBase3.h lvecBase4.h \
|
||||
lvector2.h lvector3.h lvector4.h \
|
||||
lvecBase2_ext.h lvecBase3_ext.h lvecBase4_ext.h \
|
||||
lpoint2_ext.h lpoint3_ext.h lpoint4_ext.h \
|
||||
lvector2_ext.h lvector3_ext.h lvector4_ext.h \
|
||||
|
@ -18,25 +18,23 @@
|
||||
boundingSphere.I boundingSphere.h \
|
||||
boundingVolume.I boundingVolume.h config_mathutil.h \
|
||||
fftCompressor.h finiteBoundingVolume.h frustum.h \
|
||||
frustum_src.I frustum_src.h geometricBoundingVolume.I \
|
||||
geometricBoundingVolume.h \
|
||||
geometricBoundingVolume.I geometricBoundingVolume.h \
|
||||
intersectionBoundingVolume.h intersectionBoundingVolume.I \
|
||||
linmath_events.h \
|
||||
look_at.h look_at_src.I \
|
||||
look_at_src.cxx look_at_src.h \
|
||||
look_at.h \
|
||||
linmath_events.h \
|
||||
mersenne.h \
|
||||
omniBoundingVolume.I \
|
||||
omniBoundingVolume.h \
|
||||
parabola.h parabola_src.I parabola_src.cxx parabola_src.h \
|
||||
parabola.h \
|
||||
perlinNoise.h perlinNoise.I \
|
||||
perlinNoise2.h perlinNoise2.I \
|
||||
perlinNoise3.h perlinNoise3.I \
|
||||
plane.h plane_src.I plane_src.cxx plane_src.h \
|
||||
plane.h \
|
||||
pta_LMatrix4.h pta_LMatrix3.h pta_LVecBase3.h \
|
||||
pta_LVecBase4.h pta_LVecBase2.h \
|
||||
randomizer.h randomizer.I \
|
||||
rotate_to.h rotate_to_src.cxx \
|
||||
rotate_to.h \
|
||||
stackedPerlinNoise2.h stackedPerlinNoise2.I \
|
||||
stackedPerlinNoise3.h stackedPerlinNoise3.I \
|
||||
triangulator.h triangulator.I \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef __SOCKET_FDSET_H__
|
||||
#define __SOCKET_FDSET_H__
|
||||
#define __SOCKET_FDSET_H__
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
//
|
||||
@ -16,27 +16,29 @@
|
||||
#include "time_base.h"
|
||||
#include "socket_ip.h"
|
||||
|
||||
class Socket_fdset
|
||||
{
|
||||
class Socket_fdset {
|
||||
PUBLISHED:
|
||||
|
||||
inline Socket_fdset();
|
||||
inline void setForSocket(const Socket_IP &incon);
|
||||
inline bool IsSetFor(const Socket_IP & incon) const;
|
||||
inline int WaitForRead(bool zeroFds, PN_uint32 sleep_time = 0xffffffff);
|
||||
inline int WaitForWrite(bool zeroFds, PN_uint32 sleep_time = 0xffffffff);
|
||||
inline int WaitForError(bool zeroFds, PN_uint32 sleep_time = 0xffffffff);
|
||||
|
||||
|
||||
inline int WaitForRead(bool zeroFds, const Time_Span & timeout);
|
||||
inline void clear();
|
||||
inline Socket_fdset();
|
||||
inline void setForSocket(const Socket_IP &incon);
|
||||
inline bool IsSetFor(const Socket_IP &incon) const;
|
||||
inline int WaitForRead(bool zeroFds, PN_uint32 sleep_time = 0xffffffff);
|
||||
inline int WaitForWrite(bool zeroFds, PN_uint32 sleep_time = 0xffffffff);
|
||||
inline int WaitForError(bool zeroFds, PN_uint32 sleep_time = 0xffffffff);
|
||||
|
||||
inline int WaitForRead(bool zeroFds, const Time_Span & timeout);
|
||||
inline void clear();
|
||||
|
||||
private:
|
||||
inline void setForSocketNative(const SOCKET inid);
|
||||
inline bool isSetForNative(const SOCKET inid) const;
|
||||
|
||||
friend struct Socket_Selector;
|
||||
SOCKET _maxid;
|
||||
mutable fd_set _the_set;
|
||||
inline void setForSocketNative(const SOCKET inid);
|
||||
inline bool isSetForNative(const SOCKET inid) const;
|
||||
|
||||
friend struct Socket_Selector;
|
||||
|
||||
SOCKET _maxid;
|
||||
|
||||
#ifndef CPPPARSER
|
||||
mutable fd_set _the_set;
|
||||
#endif
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -92,6 +92,7 @@ private:
|
||||
static CPT(RenderState) get_fake_view_frustum_cull_state();
|
||||
};
|
||||
|
||||
/* okcircular */
|
||||
#include "cullTraverser.h"
|
||||
|
||||
#include "cullTraverserData.I"
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
#define SOURCES \
|
||||
config_pnmimage.h \
|
||||
convert_srgb.I convert_srgb.h \
|
||||
convert_srgb_sse2.cxx \
|
||||
pfmFile.I pfmFile.h \
|
||||
pfmFile_ext.cxx pfmFile_ext.h \
|
||||
pnmbitio.h \
|
||||
@ -24,6 +26,7 @@
|
||||
|
||||
#define INCLUDED_SOURCES \
|
||||
config_pnmimage.cxx \
|
||||
convert_srgb.cxx \
|
||||
pfmFile.cxx \
|
||||
pnm-image-filter.cxx \
|
||||
pnmbitio.cxx \
|
||||
@ -36,6 +39,7 @@
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
config_pnmimage.h \
|
||||
convert_srgb.I convert_srgb.h \
|
||||
pfmFile.I pfmFile.h \
|
||||
pfmFile_ext.cxx pfmFile_ext.h \
|
||||
pnmBrush.h pnmBrush.I \
|
||||
|
@ -679,6 +679,63 @@ make_grayscale(float rc, float gc, float bc) {
|
||||
setup_rc();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PNMImage::premultiply_alpha
|
||||
// Access: Published
|
||||
// Description: Converts an image in-place to its "premultiplied"
|
||||
// form, where, for every pixel in the image, the
|
||||
// red, green, and blue components are multiplied by
|
||||
// that pixel's alpha value.
|
||||
//
|
||||
// This does not modify any alpha values.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PNMImage::
|
||||
premultiply_alpha() {
|
||||
if (!has_alpha()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int y = 0; y < get_y_size(); y++) {
|
||||
for (int x = 0; x < get_x_size(); x++) {
|
||||
float alpha = get_alpha(x, y);
|
||||
float r = get_red(x, y) * alpha;
|
||||
float g = get_green(x, y) * alpha;
|
||||
float b = get_blue(x, y) * alpha;
|
||||
set_xel(x, y, r, g, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PNMImage::unpremultiply_alpha
|
||||
// Access: Published
|
||||
// Description: Converts an image in-place to its "straight alpha"
|
||||
// form (presumably from a "premultiplied" form),
|
||||
// where, for every pixel in the image, the red,
|
||||
// green, and blue components are divided by that
|
||||
// pixel's alpha value.
|
||||
//
|
||||
// This does not modify any alpha values.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PNMImage::
|
||||
unpremultiply_alpha() {
|
||||
if (!has_alpha()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int y = 0; y < get_y_size(); y++) {
|
||||
for (int x = 0; x < get_x_size(); x++) {
|
||||
float alpha = get_alpha(x, y);
|
||||
if (alpha > 0) {
|
||||
float r = get_red(x, y) / alpha;
|
||||
float g = get_green(x, y) / alpha;
|
||||
float b = get_blue(x, y) / alpha;
|
||||
set_xel(x, y, r, g, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PNMImage::reverse_rows
|
||||
// Access: Published
|
||||
|
@ -134,6 +134,9 @@ PUBLISHED:
|
||||
void make_grayscale(float rc, float gc, float bc);
|
||||
INLINE void make_rgb();
|
||||
|
||||
void premultiply_alpha();
|
||||
void unpremultiply_alpha();
|
||||
|
||||
BLOCKING void reverse_rows();
|
||||
BLOCKING void flip(bool flip_x, bool flip_y, bool transpose);
|
||||
|
||||
|
@ -129,6 +129,7 @@ static TimeCollectorProperties time_properties[] = {
|
||||
{ 1, "Cull", { 0.21, 0.68, 0.37 }, 1.0 / 30.0 },
|
||||
{ 1, "Cull:Setup", { 0.7, 0.4, 0.5 } },
|
||||
{ 1, "Cull:Sort", { 0.3, 0.3, 0.6 } },
|
||||
{ 1, "*", { 0.1, 0.1, 0.5 } },
|
||||
{ 1, "*:Show fps", { 0.5, 0.8, 1.0 } },
|
||||
{ 0, "*:Munge", { 0.3, 0.3, 0.9 } },
|
||||
{ 1, "*:Munge:Geom", { 0.4, 0.2, 0.8 } },
|
||||
|
@ -29,7 +29,7 @@
|
||||
callbackObject.h callbackObject.I \
|
||||
callbackObject_ext.h callbackObject_ext.I \
|
||||
clockObject.h clockObject.I \
|
||||
collideMask.h \
|
||||
colorSpace.h collideMask.h \
|
||||
copyOnWriteObject.h copyOnWriteObject.I \
|
||||
copyOnWritePointer.h copyOnWritePointer.I \
|
||||
compareTo.I compareTo.h \
|
||||
@ -91,9 +91,10 @@
|
||||
callbackData.cxx \
|
||||
callbackObject.cxx \
|
||||
clockObject.cxx \
|
||||
colorSpace.cxx \
|
||||
config_util.cxx configurable.cxx \
|
||||
copyOnWriteObject.cxx \
|
||||
copyOnWritePointer.cxx \
|
||||
config_util.cxx configurable.cxx \
|
||||
cPointerCallbackObject.cxx \
|
||||
datagramInputFile.cxx datagramOutputFile.cxx \
|
||||
doubleBitMask.cxx \
|
||||
@ -141,7 +142,7 @@
|
||||
callbackObject.h callbackObject.I \
|
||||
callbackObject_ext.h callbackObject_ext.I \
|
||||
clockObject.h clockObject.I \
|
||||
collideMask.h \
|
||||
colorSpace.h collideMask.h \
|
||||
copyOnWriteObject.h copyOnWriteObject.I \
|
||||
copyOnWritePointer.h copyOnWritePointer.I \
|
||||
compareTo.I compareTo.h \
|
||||
|
@ -113,6 +113,22 @@ get_rocket_key(const ButtonHandle handle) {
|
||||
keymap[KeyboardButton::rshift().get_index()] = KI_RSHIFT;
|
||||
keymap[KeyboardButton::scroll_lock().get_index()] = KI_SCROLL;
|
||||
|
||||
// these "OEM" keys have standard mappings in Panda3D
|
||||
keymap[KeyboardButton::ascii_key(';').get_index()] = KI_OEM_1;
|
||||
keymap[KeyboardButton::ascii_key('=').get_index()] = KI_OEM_PLUS;
|
||||
keymap[KeyboardButton::ascii_key(',').get_index()] = KI_OEM_COMMA;
|
||||
keymap[KeyboardButton::ascii_key('-').get_index()] = KI_OEM_MINUS;
|
||||
keymap[KeyboardButton::ascii_key('.').get_index()] = KI_OEM_PERIOD;
|
||||
keymap[KeyboardButton::ascii_key('/').get_index()] = KI_OEM_2;
|
||||
keymap[KeyboardButton::ascii_key('`').get_index()] = KI_OEM_3;
|
||||
keymap[KeyboardButton::ascii_key('[').get_index()] = KI_OEM_4;
|
||||
keymap[KeyboardButton::ascii_key('\\').get_index()] = KI_OEM_5;
|
||||
keymap[KeyboardButton::ascii_key(']').get_index()] = KI_OEM_6;
|
||||
|
||||
// comment says this may either be "<>" or "\|", but "\" (unshifted) is handled already,
|
||||
// and "<" is only available "shifted" on 101-keyboards, so assume it's this one...
|
||||
keymap[KeyboardButton::ascii_key('<').get_index()] = KI_OEM_102;
|
||||
|
||||
for (char c = 'a'; c <= 'z'; ++c) {
|
||||
keymap[KeyboardButton::ascii_key(c).get_index()] = (c - 'a') + KI_A;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
mouseWatcher.cxx \
|
||||
mouseWatcherBase.cxx \
|
||||
mouseWatcherGroup.cxx \
|
||||
mouseWatcherParameter.cxx
|
||||
mouseWatcherParameter.cxx \
|
||||
mouseWatcherRegion.cxx \
|
||||
trackball.cxx \
|
||||
transform2sg.cxx
|
||||
|
@ -111,7 +111,7 @@ run() {
|
||||
|
||||
// First, get the average color of all the opaque pixels.
|
||||
int count = 0;
|
||||
LRGBColord color(0.0, 0.0, 0.0);
|
||||
LRGBColor color(0.0, 0.0, 0.0);
|
||||
int xi, yi;
|
||||
for (yi = 0; yi < _image.get_y_size(); ++yi) {
|
||||
for (xi = 0; xi < _image.get_x_size(); ++xi) {
|
||||
@ -127,7 +127,7 @@ run() {
|
||||
}
|
||||
color /= (double)count;
|
||||
nout << " average color of " << count << " opaque pixels is " << color << "\n";
|
||||
|
||||
|
||||
// Now, apply that wherever there are transparent pixels.
|
||||
count = 0;
|
||||
for (yi = 0; yi < _image.get_y_size(); ++yi) {
|
||||
@ -143,7 +143,7 @@ run() {
|
||||
exit(1);
|
||||
}
|
||||
nout << " applied to " << count << " transparent pixels.\n";
|
||||
|
||||
|
||||
write_image(_image);
|
||||
}
|
||||
|
||||
|
@ -477,19 +477,19 @@ process_image(PNMImage &image) {
|
||||
if (_hls) {
|
||||
for (int yi = 0; yi < image.get_y_size(); ++yi) {
|
||||
for (int xi = 0; xi < image.get_x_size(); ++xi) {
|
||||
LRGBColord rgb = image.get_xel(xi, yi);
|
||||
LRGBColord rgb = LCAST(double, image.get_xel(xi, yi));
|
||||
rgb = hls2rgb(_mat.xform_point(rgb2hls(rgb)));
|
||||
image.set_xel(xi, yi, rgb);
|
||||
image.set_xel(xi, yi, LCAST(float, rgb));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
for (int yi = 0; yi < image.get_y_size(); ++yi) {
|
||||
for (int xi = 0; xi < image.get_x_size(); ++xi) {
|
||||
LRGBColord rgb = image.get_xel(xi, yi);
|
||||
LRGBColord rgb = LCAST(double, image.get_xel(xi, yi));
|
||||
rgb = _mat.xform_point(rgb);
|
||||
image.set_xel(xi, yi, rgb);
|
||||
image.set_xel(xi, yi, LCAST(float, rgb));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,6 +101,7 @@ struct MayaVerInfo maya_versions[] = {
|
||||
{ "MAYA20135", "2013.5"},
|
||||
{ "MAYA2014", "2014"},
|
||||
{ "MAYA2015", "2015"},
|
||||
{ "MAYA2016", "2016"},
|
||||
{ 0, 0 },
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user