1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Fix MaxPlasmaMtls

This commit is contained in:
2012-12-21 20:53:01 -05:00
parent fa950cd846
commit 5ea652f906
61 changed files with 500 additions and 332 deletions

View File

@ -40,11 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "HeadSpin.h"
#include "plAngleAttenLayer.h"
#include "hsWindows.h"
#include "../resource.h"
#include "iparamb2.h"
#include "iparamm2.h"
#include "stdmat.h"
#include <iparamm2.h>
#include <stdmat.h>
#pragma hdrstop
#include "plAngleAttenLayer.h"
#include "../plBMSampler.h"
#include "MaxMain/plPlasmaRefMsgs.h"
@ -147,6 +150,11 @@ plAngleAttenLayer::~plAngleAttenLayer()
{
}
void plAngleAttenLayer::GetClassName(TSTR& s)
{
s = GetString(IDS_ANGLE_ATTEN_LAYER);
}
//From MtlBase
void plAngleAttenLayer::Reset()
{
@ -313,13 +321,13 @@ void plAngleAttenLayer::IChanged()
void plAngleAttenLayer::ICacheCosines()
{
fCosTransp0 = cosf(DegToRad(fParmsPB->GetFloat(kTranspAngle0)));
fCosOpaque0 = cosf(DegToRad(fParmsPB->GetFloat(kOpaqueAngle0)));
fCosTransp0 = cosf(hsDegreesToRadians(fParmsPB->GetFloat(kTranspAngle0)));
fCosOpaque0 = cosf(hsDegreesToRadians(fParmsPB->GetFloat(kOpaqueAngle0)));
if( fParmsPB->GetInt(kDoubleFade) )
{
fCosTransp1 = cosf(DegToRad(fParmsPB->GetFloat(kTranspAngle1)));
fCosOpaque1 = cosf(DegToRad(fParmsPB->GetFloat(kOpaqueAngle1)));
fCosTransp1 = cosf(hsDegreesToRadians(fParmsPB->GetFloat(kTranspAngle1)));
fCosOpaque1 = cosf(hsDegreesToRadians(fParmsPB->GetFloat(kOpaqueAngle1)));
}
else
{

View File

@ -43,12 +43,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plAngleAttenLayer_inc
#define plAngleAttenLayer_inc
#include "Max.h"
#include "../resource.h"
#include "plPlasmaMAXLayer.h"
class Box3;
class Class_ID;
class ClassDesc2;
class Interval;
class IParamBlock2;
class ParamDlg;
class TexHandleMaker;
ClassDesc2* GetAngleAttenLayerDesc();
@ -126,7 +129,7 @@ public:
//From Animatable
Class_ID ClassID() { return ANGLE_ATTEN_LAYER_CLASS_ID; }
SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; }
void GetClassName(TSTR& s) { s = GetString(IDS_ANGLE_ATTEN_LAYER); }
void GetClassName(TSTR& s);
RefTargetHandle Clone( RemapDir &remap );
RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget,

View File

@ -51,11 +51,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
///////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h"
#include "plDynamicEnvLayer.h"
#include "hsWindows.h"
#include "../resource.h"
#include "iparamb2.h"
#include "iparamm2.h"
#include "stdmat.h"
#include <iparamm2.h>
#include <stdmat.h>
#include <triobj.h>
#pragma hdrstop
#include "plDynamicEnvLayer.h"
#include "../plBMSampler.h"
#include "MaxMain/plPlasmaRefMsgs.h"

View File

@ -53,12 +53,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef _plDynamicEnvLayer_h
#define _plDynamicEnvLayer_h
#include "Max.h"
#include "plPlasmaMAXLayer.h"
#include "../resource.h"
class ClassDesc2;
class Interval;
class IMtlParams;
class IParamBlock2;
class TexHandle;
class UVGen;
ClassDesc2* GetDynamicEnvLayerDesc();

View File

@ -40,11 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "HeadSpin.h"
#include "plDynamicTextLayer.h"
#include "hsWindows.h"
#include "../resource.h"
#include "iparamb2.h"
#include "iparamm2.h"
#include "stdmat.h"
#include <iparamm2.h>
#include <stdmat.h>
#pragma hdrstop
#include "plDynamicTextLayer.h"
#include "../plBMSampler.h"
#include "MaxMain/plPlasmaRefMsgs.h"
@ -89,6 +92,11 @@ plDynamicTextLayer::~plDynamicTextLayer()
IDiscardTexHandle();
}
void plDynamicTextLayer::GetClassName(TSTR& s)
{
s = GetString(IDS_DYN_TEXT_LAYER);
}
//From MtlBase
void plDynamicTextLayer::Reset()
{

View File

@ -53,8 +53,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef _plDynamicTextLayer_h
#define _plDynamicTextLayer_h
#include "Max.h"
#include "../resource.h"
#include "plPlasmaMAXLayer.h"
class ClassDesc2;
@ -150,7 +148,7 @@ public:
//From Animatable
Class_ID ClassID() { return DYN_TEXT_LAYER_CLASS_ID; }
SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; }
void GetClassName(TSTR& s) { s = GetString(IDS_DYN_TEXT_LAYER); }
void GetClassName(TSTR& s);
RefTargetHandle Clone( RemapDir &remap );
RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget,

View File

@ -40,14 +40,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "HeadSpin.h"
#include "plLayerTex.h"
#include "hsWindows.h"
#include "../resource.h"
#include "iparamb2.h"
#include "iparamm2.h"
#include "stdmat.h"
#include <iparamm2.h>
#include <stdmat.h>
#pragma hdrstop
#include "../plBMSampler.h"
#include "../resource.h"
#include "plLayerTex.h"
#include "plLayerTexBitmapPB.h"
#include "MaxMain/plPlasmaRefMsgs.h"

View File

@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef __PLMAXLAYER__H
#define __PLMAXLAYER__H
#include "Max.h"
#include "plPlasmaMAXLayer.h"
class ClassDesc2;

View File

@ -40,13 +40,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "HeadSpin.h"
#include "hsWindows.h"
#include "../resource.h"
#include <iparamm2.h>
#include <stdmat.h>
#pragma hdrstop
#include "plMAXCameraLayer.h"
#include "iparamb2.h"
#include "iparamm2.h"
#include "stdmat.h"
#include "../plBMSampler.h"
#include "MaxMain/plPlasmaRefMsgs.h"
@ -183,6 +185,11 @@ plMAXCameraLayer::~plMAXCameraLayer()
{
}
void plMAXCameraLayer::GetClassName(TSTR& s)
{
s = GetString(IDS_MAX_CAMERA_LAYER);
}
//From MtlBase
void plMAXCameraLayer::Reset()
{

View File

@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plMAXCameraLayer_inc
#define plMAXCameraLayer_inc
#include "Max.h"
#include "../resource.h"
#include "plPlasmaMAXLayer.h"
class ClassDesc2;
@ -114,7 +112,7 @@ public:
//From Animatable
Class_ID ClassID() { return MAX_CAMERA_LAYER_CLASS_ID; }
SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; }
void GetClassName(TSTR& s) { s = GetString(IDS_MAX_CAMERA_LAYER); }
void GetClassName(TSTR& s);
RefTargetHandle Clone( RemapDir &remap );
RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget,

View File

@ -54,13 +54,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
///////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h"
#include "hsResMgr.h"
#include "hsWindows.h"
#include "../resource.h"
#include <iparamm2.h>
#include <istdplug.h>
#include <stdmat.h>
#pragma hdrstop
#include "plPlasmaMAXLayer.h"
#include "stdmat.h"
#include "istdplug.h"
#include "iparamb2.h"
#include "iparamm2.h"
#include "../resource.h"
#ifdef MAXASS_AVAILABLE
#include "../../AssetMan/PublicInterface/MaxAssInterface.h"
#endif
@ -69,7 +73,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnKeyedObject/hsKeyedObject.h"
#include "pnMessage/plRefMsg.h"
#include "plSurface/plLayerInterface.h"
#include "hsResMgr.h"
//// Derived Types List ///////////////////////////////////////////////////////

View File

@ -62,10 +62,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef _plPlasmaMAXLayer_h
#define _plPlasmaMAXLayer_h
#include "Max.h"
#include "iparamm2.h"
#include "HeadSpin.h"
//// Derived Type Class IDs ///////////////////////////////////////////////////
// If you create a new Plasma layer type, add a define for the class ID here
// and also add the ID to the list in plPlasmaMAXLayer.cpp.
@ -79,18 +75,22 @@ const Class_ID MAX_CAMERA_LAYER_CLASS_ID( 0xfaf5ec7, 0x13d90d3f );
//// Class Definition /////////////////////////////////////////////////////////
class plLayerInterface;
class plMaxNode;
class Bitmap;
class PBBitmap;
class plBitmapData;
class BitmapInfo;
class plBMSamplerData;
class plDynamicTextMap;
class plErrorMsg;
class plLayer;
class plDynamicTextMap;
class plBitmapData;
class plLocation;
class plLayerConverter;
class plLayerInterface;
class plBMSamplerData;
class jvUniqueId;
class plLayerTargetContainer;
class plLocation;
class plMaxNode;
class Texmap;
class jvUniqueId;
class plPlasmaMAXLayer : public Texmap
{
friend class plLayerConverter;

View File

@ -40,11 +40,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "HeadSpin.h"
#include "plStaticEnvLayer.h"
#include "hsWindows.h"
#include "../resource.h"
#include "iparamb2.h"
#include "iparamm2.h"
#include "stdmat.h"
#include <iparamm2.h>
#include <stdmat.h>
#pragma hdrstop
#include "plStaticEnvLayer.h"
#include "../plBMSampler.h"
#include "MaxMain/plPlasmaRefMsgs.h"
@ -98,6 +101,11 @@ plStaticEnvLayer::~plStaticEnvLayer()
IDiscardTexHandle();
}
void plStaticEnvLayer::GetClassName(TSTR& s)
{
s = GetString(IDS_STATIC_ENVMAP_LAYER);
}
//From MtlBase
void plStaticEnvLayer::Reset()
{
@ -553,24 +561,24 @@ Matrix3 plStaticEnvLayer::IGetViewTM( int i )
switch( i )
{
case kTopFace:
m.RotateX( -PI );
m.RotateX( -M_PI );
break;
case kBottomFace:
break;
case kLeftFace:
m.RotateX( -.5f * PI );
m.RotateY( -.5f * PI );
m.RotateX( -.5f * M_PI );
m.RotateY( -.5f * M_PI );
break;
case kRightFace:
m.RotateX( -.5f * PI );
m.RotateY( +.5f * PI );
m.RotateX( -.5f * M_PI );
m.RotateY( +.5f * M_PI );
break;
case kFrontFace:
m.RotateX( -.5f * PI );
m.RotateY( PI );
m.RotateX( -.5f * M_PI );
m.RotateY( M_PI );
break;
case kBackFace:
m.RotateX( -.5f * PI );
m.RotateX( -.5f * M_PI );
break;
}
return m;
@ -644,7 +652,7 @@ void plStaticEnvLayer::RenderCubicMap( INode *node )
vp.projType = PROJ_PERSPECTIVE;
vp.hither = .001f;
vp.yon = 1.0e30f;
vp.fov = PI/2.0f;
vp.fov = M_PI/2.0f;
if( fBitmapPB->GetInt( kBmpUseMAXAtmosphere ) )
{
vp.nearRange = 0;

View File

@ -53,9 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef _plStaticEnvLayer_h
#define _plStaticEnvLayer_h
#include "Max.h"
#include "plPlasmaMAXLayer.h"
#include "../resource.h"
class ClassDesc2;
class IParamBlock2;
@ -160,7 +158,7 @@ public:
//From Animatable
Class_ID ClassID() { return STATIC_ENV_LAYER_CLASS_ID; }
SClass_ID SuperClassID() { return TEXMAP_CLASS_ID; }
void GetClassName(TSTR& s) { s = GetString(IDS_STATIC_ENVMAP_LAYER); }
void GetClassName(TSTR& s);
RefTargetHandle Clone( RemapDir &remap );
RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget,